Class: Item
Source Location: /qp_inc/items/model/_item.class.php
Class Item
Inherited Properties, Constants, and Methods
Method Summary
| boolean |
add_renderer() |
Add a renderer (by code) to the Item. |
| void |
anchor() |
T-Tag: Display the item's ID as an anchor for permalinks to refer to. |
| void |
anchor_id() |
T-Tag: Display the item's ID as "item_NNN" |
| void |
assigned_to() |
Template function: display assignee of item |
| void |
author() |
T-Tag: Display the author/creator of an item |
| boolean |
can_comment() |
Template function: Check if user can leave comment on this post or display error |
| boolean |
can_rate() |
Template function: Check if user can can rate this post |
| boolean |
can_see_comments() |
Check if user can see comments on this post, which he cannot if they are disabled for the Item or never allowed for the blog. |
| boolean |
can_view() |
Check whether an User can view this Item. |
| void |
count_view() |
T-Tag: Increment view counter (excluding author's views) of first post on page |
| boolean |
dbdelete() |
Trigger event AfterItemDelete after calling parent method. |
| boolean |
dbinsert() |
Insert object into DB based on previously recorded changes |
| boolean |
dbupdate() |
Update the DB based on previously recorded changes |
| void |
deadline_date() |
Template function: display deadline date (datetime) of Item |
| void |
deadline_time() |
Template function: display deadline time (datetime) of Item |
| void |
delete_link() |
T-Tag: Display a link to delete an item if current user has permission |
| void |
deprecate_link() |
T-Tag: Display a link to deprecate an item if current user has permission |
| void |
div_classes() |
T-Tag: Display classes for an item (<div> typically) |
| void |
edit_link() |
T-Tag: Display a link to edit an item if current user has permission |
| void |
excerpt() |
Display excerpt of item |
| void |
extra_status() |
Template function: display extra status of item |
| void |
feedback_feed_link() |
Template function: Displays link to the feed for comments on this item |
| void |
feedback_link() |
T-Tag: displays link to feedback page (under some conditions) |
| void |
files() |
Display the attachments/files linked to the current Item |
| void |
footer() |
T-Tag: Display the current item's footer text |
| mixed |
get() |
Get a member param by its name |
| void |
get_content_page() |
Get a specific page to display (from the prerendered cache) |
| void |
get_delete_link() |
T-Tag: Return a link to delete an item if current user has permission |
| void |
get_deprecate_link() |
T-Tag: Return a link to deprecate an item if current user has permission |
| void |
get_edit_link() |
T-Tag: Return a link to edit an item if current user has permission |
| string |
get_files() |
Get block of attachments/files linked to the current Item |
| void |
get_images() |
T-Tag: Get the images linked to an item |
| void |
get_publish_link() |
T-Tag: Get a link to 'publish NOW' a post if current user has permission |
| array |
get_renderers_validated() |
Get the list of validated renderers for this Item. This includes stealth plugins etc. |
| string |
get_views() |
Template function: Display the number of times the Item has been viewed |
| void |
images() |
T-Tag: Display the images linked to an item |
| boolean |
inc_viewcount() |
Increment the view count of the item directly in DB (if the item's Author is not $current_User). |
| void |
insert() |
Create a new Item/Post and insert it into the DB |
| void |
linkcount() |
Template function: display number of links attached to this Item |
| void |
load_links() |
Load links if they were not loaded yet. |
| void |
more_link() |
T-Tag: Display an item's "more" link if in use |
| void |
msgform_link() |
T-Tag: Display a link to the message form for this item's author. |
| boolean |
msgform_link_assigned() |
Template function: Provide link to message form for this Item's assigned User. |
| void |
page_links() |
T-Tag: Display a link to pages for multi-page items |
| void |
priority() |
Template function: display priority of item |
| void |
publish_link() |
T-Tag: Display a link to 'publish NOW' an item if current user has permission |
| boolean |
set() |
Set param value |
| void |
split_pages() |
Make sure, the pages have been obtained (and split up_ from prerendered cache. |
| void |
status() |
Template function: display status of item |
| void |
tags() |
T-Tag: Display an item's tags |
| void |
trackback_rdf() |
Template function: Displays trackback autodiscovery information |
| void |
trackback_url() |
Template function: displays url to use to trackback this item |
| boolean |
update_excerpt() |
Quick and dirty "excerpts should not stay empty". |
| void |
url_link() |
T-Tag: Display link to item related url. |
| void |
views() |
T-Tag: Display a phrase about the number of Item views. |
| void |
wordcount() |
T-Tag: Display the number of words in the post |
Properties
The assigned User to the item.
Can be NULL API Tags:
The User who has created the Item (lazy-filled).
API Tags:
Methods
Item Item(
[object table
$db_row = NULL], [string
$dbtable = 'T_items__item'], [string
$dbprefix = 'post_'], [string
$dbIDname = 'post_ID'], [string
$objtype = 'Item'], [string
$datecreated_field = 'datecreated'], [string
$datemodified_field = 'datemodified'], [string
$creator_field = 'creator_user_ID'], [string
$lasteditor_field = 'lastedit_user_ID']
)
|
|
Constructor
Parameters:
|
object table |
$db_row: |
Database row |
|
string |
$dbtable: |
|
|
string |
$dbprefix: |
|
|
string |
$dbIDname: |
|
|
string |
$objtype: |
for derived classes |
|
string |
$datecreated_field: |
datetime field name |
|
string |
$datemodified_field: |
datetime field name |
|
string |
$creator_field: |
User ID field name |
|
string |
$lasteditor_field: |
User ID field name |
boolean add_renderer(
string
$renderer_code
)
|
|
Add a renderer (by code) to the Item.
Parameters:
|
string |
$renderer_code: |
Renderer code to add for this item |
API Tags:
| Return: | True if renderers have changed |
T-Tag: Display the item's ID as an anchor for permalinks to refer to.
API Tags:
T-Tag: Display the item's ID as "item_NNN"
API Tags:
void assigned_to(
[string
$before = ''], [string
$after = ''], [string
$format = 'htmlbody']
)
|
|
Template function: display assignee of item
Parameters:
void assign_to(
$user_ID, [
$dbupdate = true]
)
|
|
Parameters:
Information Tags:
| Todo: | use extended dbchange instead of set_param... |
| Todo: | Normalize to set_assigned_User!? |
void assign_to_first_cat_for_collection(
integer
$collection_ID
)
|
|
Assign the item to the first category we find in the requested collection
Parameters:
void author(
[
$params = array()]
)
|
|
T-Tag: Display the author/creator of an item
'before' => '',
'after' => ' ',
'format' => 'htmlbody',
'link_to' => 'userpage', // or 'userurl'
'link_text' => 'preferredname',
'link_rel' => '',
'link_class' => '',
), $params );
Parameters:
boolean can_comment(
[string|NULL
$before_error = '<p><em>'], [string
$after_error = '</em></p>'], [string
$non_published_msg = '#'], [string
$closed_msg = '#']
)
|
|
Template function: Check if user can leave comment on this post or display error
Parameters:
|
string|NULL |
$before_error: |
string to display before any error message; NULL to not display anything, but just return boolean |
|
string |
$after_error: |
string to display after any error message |
|
string |
$non_published_msg: |
error message for non published posts, '#' for default |
|
string |
$closed_msg: |
error message for closed comments posts, '#' for default |
API Tags:
| Return: | true if user can post, false if s/he cannot |
Template function: Check if user can can rate this post
API Tags:
| Return: | true if user can post, false if s/he cannot |
boolean can_see_comments(
)
|
|
Check if user can see comments on this post, which he cannot if they are disabled for the Item or never allowed for the blog.
boolean can_view(
[object|NULL
$User = NULL]
)
|
|
Check whether an User can view this Item.
Parameters:
|
object|NULL |
$User: |
The User (NULL for current user). |
API Tags:
| Return: | True if permission granted, false otherwise. |
| Access: | public |
void content_extension(
$params
)
|
|
T-Tag: Display an item's content extension
Displays the part after "<!--more-->" or "<!--noteaser-->
'before' => '',
'after' => '',
'disppage' => '#', // '#' = (global) $page
'format' => 'htmlbody',
'force_more' => false,
), $params );
Parameters:
API Tags:
void content_teaser(
$params
)
|
|
T-Tag: Display an item's teaser content
Will stop at "<!--more-->" or "<!--noteaser-->"
'before' => '',
'after' => '',
'disppage' => '#', // '#' = (global) $page
'stripteaser' => '#', // '#' = remove the "teaser" part of multi-part items
'format' => 'htmlbody',
), $params );
Parameters:
API Tags:
void count_view(
[
$params = array()]
)
|
|
T-Tag: Increment view counter (excluding author's views) of first post on page
'allow_multiple_counts_per_page' => false,
), $params );
Parameters:
API Tags:
Information Tags:
| Todo: | (legacy): merge with inc_viewcount |
Trigger event AfterItemDelete after calling parent method.
API Tags:
Information Tags:
| Todo: | fp> delete related stuff: comments, cats, file links... |
Redefinition of:
- DataObject::dbdelete()
- Delete object from DB.
Insert object into DB based on previously recorded changes
API Tags:
Redefinition of:
- DataObject::dbinsert()
- Insert object into DB based on previously recorded changes.
boolean dbupdate(
[boolean
$auto_track_modification = true]
)
|
|
Update the DB based on previously recorded changes
Parameters:
|
boolean |
$auto_track_modification: |
do we want to auto track the mod date? |
API Tags:
Redefinition of:
- DataObject::dbupdate()
- Update the DB based on previously recorded changes
void deadline_date(
[string
$format = ''], [boolean
$useGM = false]
)
|
|
Template function: display deadline date (datetime) of Item
Parameters:
|
string |
$format: |
date/time format: leave empty to use locale default date format |
|
boolean |
$useGM: |
true if you want GMT |
void deadline_time(
[string
$format = ''], [boolean
$useGM = false]
)
|
|
Template function: display deadline time (datetime) of Item
Parameters:
|
string |
$format: |
date/time format: leave empty to use locale default time format |
|
boolean |
$useGM: |
true if you want GMT |
void delete_link(
[
$params = array()]
)
|
|
T-Tag: Display a link to delete an item if current user has permission
Parameters:
API Tags:
void delete_prerendered_content(
)
|
|
Unset any prerendered content for this item (in PHP cache).
void deprecate_link(
$params
)
|
|
T-Tag: Display a link to deprecate an item if current user has permission
Parameters:
API Tags:
void div_classes(
[
$params = array()]
)
|
|
T-Tag: Display classes for an item (<div> typically)
'item_class' => 'bPost',
'item_type_class' => 'bPost_ptyp',
'item_status_class' => 'bPost',
), $params );
Parameters:
Information Tags:
| Todo: | EdB: we should make a div_id_class_lang() function that does it all :) |
void edit_link(
[
$params = array()]
)
|
|
T-Tag: Display a link to edit an item if current user has permission
Parameters:
API Tags:
Display excerpt of item
Parameters:
void extra_status(
[string
$before = ''], [string
$after = ''], [string
$format = 'htmlbody']
)
|
|
Template function: display extra status of item
Parameters:
void feedback_feed_link(
[string
$template = '_rss2'], [string
$before = ''], [string
$after = ''], [string
$title = '#']
)
|
|
Template function: Displays link to the feed for comments on this item
Parameters:
|
string |
$template: |
Type of feedback to link to (rss2/atom) |
|
string |
$before: |
String to display before the link (if comments are to be displayed) |
|
string |
$after: |
String to display after the link (if comments are to be displayed) |
|
string |
$title: |
Link title |
void feedback_link(
[
$params = array()]
)
|
|
T-Tag: displays link to feedback page (under some conditions)
'type' => 'feedbacks', // can be 'feedbacks' or 'comments' or 'trackbacks'
'status' => 'published',
'link_before' => '',
'link_after' => '',
'link_title' => '#', // depends on value of 'type' - read the code for details
'link_text_zero' => '#', // same as above
'link_text_one' => '#', // same as above
'link_text_more' => '#', // same as above
'link_anchor_zero' => '#', // same as above
'link_anchor_one' => '#', // same as above
'link_anchor_more' => '#', // same as above
'use_popup' => false,
'url' => '#', // '#' = $this->get_feedback_url(), will link to single post
), $params );
Parameters:
void feedback_moderation(
[string
$type = 'feedbacks'], [string
$before = ''], [string
$after = ''], [string
$zero = ''], [string
$one = '#'], [string
$more = '#'], [string
$edit_comments_link = '#'], [boolean
$params = array()]
)
|
|
Template function: Displays feeback moderation info
Parameters:
|
string |
$type: |
Type of feedback to link to (feedbacks (all)/comments/trackbacks) |
|
string |
$before: |
String to display before the link (if comments are to be displayed) |
|
string |
$after: |
String to display after the link (if comments are to be displayed) |
|
string |
$zero: |
Link text to display when there are 0 comments |
|
string |
$one: |
Link text to display when there is 1 comment |
|
string |
$more: |
Link text to display when there are >1 comments (include %d for # of comments) |
|
string |
$edit_comments_link: |
Link |
|
boolean |
$params: |
true to hide if no feedback |
void files(
[array
$params = array()], [string
$format = 'htmlbody']
)
|
|
Display the attachments/files linked to the current Item
Parameters:
T-Tag: Display the current item's footer text
'mode' => '#', // will detect 'single' from $disp automatically
'block_start' => '<div class="item_footer">',
'block_end' => '</div>',
'format' => 'htmlbody',
), $params );
Parameters:
mixed get(
mixed
$parname
)
|
|
Get a member param by its name
Parameters:
|
mixed |
$parname: |
Name of parameter |
API Tags:
| Return: | Value of parameter |
Redefinition of:
- DataObject::get()
- Get a member param by its name
T-Tag: Return the item ID as "item_NNN"
API Tags:
User|NULL get_assigned_User(
)
|
|
Get the User who is assigned to the Item.
API Tags:
| Return: | NULL if no user is assigned. |
string get_assigned_user_options(
)
|
|
Get list of assigned user options
API Tags:
Get list of attached files
INNER JOIN on files ensures we only get back file links
Parameters:
Information Tags:
| Todo: | dh> Add prefetching for MainList/ItemList (get_prefetch_itemlist_IDs) The $limit param and DataObjectList2 makes this quite difficult though. Would save (N-1) queries on a blog list page for N items. |
void get_content_excerpt(
[
$crop_at = 200]
)
|
|
This is like a teaser with no HTML and a cropping.
Parameters:
Information Tags:
| Todo: | fp> allow user to submit his own excerpt in expert editing mode |
string get_content_extension(
[mixed
$disppage = '#'], [boolean
$force_more = false], [string
$format = 'htmlbody']
)
|
|
T-Tag: Get an item's content extension
Extension is any part after a <!--more--> or <!--noteaser-->
Parameters:
|
mixed |
$disppage: |
page number to display specific page, # for url parameter |
|
boolean |
$force_more: |
|
|
string |
$format: |
filename to use to display more |
API Tags:
void get_content_page(
integer
$page, [string
$format = 'htmlbody']
)
|
|
Get a specific page to display (from the prerendered cache)
Parameters:
|
integer |
$page: |
Page number |
|
string |
$format: |
Format, used to retrieve the matching cache; see format_to_output() |
string get_content_teaser(
[mixed
$disppage = '#'], [boolean
$stripteaser = '#'], [string
$format = 'htmlbody']
)
|
|
T-Tag: Get an item's teaser content
Stops at <!--more--> or <!--noteaser-->
Parameters:
|
mixed |
$disppage: |
page number to display specific page, # for url parameter |
|
boolean |
$stripteaser: |
# if you don't want to repeat teaser after more link was pressed and <--noteaser--> has been found |
|
string |
$format: |
filename to use to display more |
API Tags:
User &get_creator_User(
)
|
|
Get the User who created the Item.
void get_delete_link(
[
$params = array()]
)
|
|
T-Tag: Return a link to delete an item if current user has permission
'before' => ' ',
'after' => ' ',
'text' => '#',
'title' => T_('Delete this post'),
'class' => '',
'button' => false,
'action_url' => '#',
), $params );
Parameters:
API Tags:
void get_deprecate_link(
[
$params = array()]
)
|
|
T-Tag: Return a link to deprecate an item if current user has permission
'before' => ' ',
'after' => ' ',
'text' => get_icon( 'deprecate', 'imgtag' ). ' '. T_('Deprecate!'),
'title' => T_('Deprecate this post!'),
'class' => '',
'glue' => '&',
), $params );
Parameters:
API Tags:
void get_edit_link(
[
$params = array()]
)
|
|
T-Tag: Return a link to edit an item if current user has permission
'before' => ' ',
'after' => ' ',
'title' => T_('Edit this post...'),
'class' => '',
'save_context' => true,
), $params );
Parameters:
API Tags:
void get_feedback_feed_url(
string
$template_folder_name
)
|
|
Return the URL to display the post comments in an XML feed.
Parameters:
|
string |
$template_folder_name: |
|
void get_feedback_title(
[string
$type = 'feedbacks'], [string
$zero = '#'], [string
$one = '#'], [string
$more = '#'], [string
$status = 'published']
)
|
|
Get text depending on number of comments
Parameters:
|
string |
$type: |
Type of feedback to link to (feedbacks (all)/comments/trackbacks) |
|
string |
$zero: |
Link text to display when there are 0 comments |
|
string |
$one: |
Link text to display when there is 1 comment |
|
string |
$more: |
Link text to display when there are >1 comments (include %d for # of comments) |
|
string |
$status: |
Status of feedbacks to count |
string get_feedback_url(
[
$popup = false], [
$glue = '&']
)
|
|
Get URL to display the post comments.
Parameters:
string get_files(
[array
$params = array()], [string
$format = 'htmlbody']
)
|
|
Get block of attachments/files linked to the current Item
Parameters:
API Tags:
void get_images(
[
$params = array()], [
$format = 'htmlbody']
)
|
|
T-Tag: Get the images linked to an item
'before' => '<div>',
'after' => '</div>',
'before_image' => '<div class="image_block">',
'after_image' => '</div>',
'before_image_legend' => '<div class="image_legend">',
'after_image_legend' => '</div>',
'image_size' => 'fit-400',
'image_link_to' => 'original', // 'or single' or 'fit-NNN'
'limit' => 1000,
), $params );
Parameters:
API Tags:
Get reference to array of Links
Get the meta description tag
void get_more_link(
[
$params = array()]
)
|
|
T-Tag: Get an item's "more" link if in use
'force_more' => false,
'before' => '<p class="bMore">',
'after' => '</p>',
'link_text' => T_('Read more'). ' »',
'anchor_text' => '<p class="bMore">'. T_('Follow up:'). '</p>',
'disppage' => '#', // page number to display specific page, # for url parameter
'format' => 'htmlbody',
), $params );
Parameters:
API Tags:
string get_prerendered_content(
string
$format
)
|
|
Get the prerendered content. If it has not been generated yet, it will.
NOTE: This calls Item::dbupdate(), if renderers get changed (from Plugin hook).
Parameters:
|
string |
$format: |
Format, see format_to_output(). Only "htmlbody", "entityencoded", "xml" and "text" get cached. |
void get_publish_link(
[
$params = array()]
)
|
|
T-Tag: Get a link to 'publish NOW' a post if current user has permission
Note: publishing date will be updated
'before' => ' ',
'after' => ' ',
'text' => get_icon( 'publish', 'imgtag' ). ' '. T_('Publish NOW!'),
'title' => T_('Publish now using current date and time.'),
'class' => '',
'glue' => '&',
'save_context' => true,
), $params );
Parameters:
API Tags:
Get the list of renderers for this Item.
array get_renderers_validated(
)
|
|
Get the list of validated renderers for this Item. This includes stealth plugins etc.
API Tags:
| Return: | List of validated renderer codes |
Get array of tags.
Load from DB if necessary, prefetching any other tags from MainList/ItemList.
Get the title for the <title> tag
If it's not specifically entered, use the regular post title instead
string get_trackback_url(
)
|
|
Template function: get url to use to trackback this item
string get_views(
[string
$zero = '#'], [string
$one = '#'], [string
$more = '#']
)
|
|
Template function: Display the number of times the Item has been viewed
Note: viewcount is incremented whenever the Item's content is displayed with "MORE" (i-e full content), see Item::content(). Viewcount is NOT incremented on page reloads and other special cases, see Hit::is_new_view() %d gets replaced in all params by the number of views.
Parameters:
|
string |
$zero: |
Link text to display when there are 0 views |
|
string |
$one: |
Link text to display when there is 1 views |
|
string |
$more: |
Link text to display when there are >1 views |
API Tags:
| Return: | The phrase about the number of views. |
| Usedby: | Item::views() |
void handle_post_processing(
[boolean
$verbose = true]
)
|
|
Execute or schedule post(=after) processing tasks
Includes notifications & pings
Parameters:
|
boolean |
$verbose: |
give more info messages (we want to avoid that when we save & continue editing) |
void images(
[
$params = array()], [
$format = 'htmlbody']
)
|
|
T-Tag: Display the images linked to an item
Parameters:
API Tags:
Increment the view count of the item directly in DB (if the item's Author is not $current_User).
This method serves TWO purposes (that would break if we used dbupdate() ) : - Increment the viewcount WITHOUT affecting the lastmodified date and user.
- Increment the viewcount in an ATOMIC manner (even if several hits on the same Item occur simultaneously).
This also triggers the plugin event 'ItemViewsIncreased' if the view count has been increased.
API Tags:
void insert(
$author_user_ID,
$post_title,
$post_content,
$post_timestamp, [
$main_cat_ID = 1], [
$extra_cat_IDs = array()], [
$post_status = 'published'], [
$post_locale = '#'], [
$post_urltitle = ''], [
$post_url = ''], [
$post_comment_status = 'open'], [
$post_renderers = array('default')], [
$item_typ_ID = 1], [
$item_st_ID = NULL]
)
|
|
Create a new Item/Post and insert it into the DB
This function has to handle all needed DB dependencies!
Parameters:
|
|
$author_user_ID: |
|
|
|
$post_title: |
|
|
|
$post_content: |
|
|
|
$post_timestamp: |
|
|
|
$main_cat_ID: |
|
|
|
$extra_cat_IDs: |
|
|
|
$post_status: |
|
|
|
$post_locale: |
|
|
|
$post_urltitle: |
|
|
|
$post_url: |
|
|
|
$post_comment_status: |
|
|
|
$post_renderers: |
|
|
|
$item_typ_ID: |
|
|
|
$item_st_ID: |
|
API Tags:
| Deprecated: | since EVO_NEXT_VERSION. Use set() + dbinsert() instead |
Information Tags:
| Todo: | EdB: this is used by qp_install/_functions_create.php in v0.0.0 (EdB) |
void insert_update_extracats(
string
$mode
)
|
|
Parameters:
|
string |
$mode: |
'insert' | 'update' |
void insert_update_tags(
string
$mode
)
|
|
Save tags to DB
Parameters:
|
string |
$mode: |
'insert' | 'update' |
Template function: display number of links attached to this Item
boolean load_from_Request(
[boolean
$editing = false]
)
|
|
Load data from Request form fields.
This requires the blog (e.g. $blog_ID or $main_cat_ID to be set).
Parameters:
|
boolean |
$editing: |
true if we are returning to edit mode (new, switchtab...) |
API Tags:
| Return: | true if loaded data seems valid. |
Load links if they were not loaded yet.
Information Tags:
| Todo: | dh> gets not used anywhere?! and is the only user of LinkCache::get_by_item_ID(). |
void more_link(
[
$params = array()]
)
|
|
T-Tag: Display an item's "more" link if in use
Parameters:
API Tags:
void msgform_link(
[
$params = array()]
)
|
|
T-Tag: Display a link to the message form for this item's author.
'before' => ' ',
'after' => ' ',
'text' => '#', // get_icon( 'email', 'imgtag', array( 'class' => 'middle', 'title' => $params['title'] ) )
'title' => T_('Send email to post author'),
'class' => '',
'format' => 'htmlbody',
'form_url' => '#current_blog#', // $Blog->get('msgformurl')
), $params );
Parameters:
API Tags:
boolean msgform_link_assigned(
string
$form_url, [string
$before = ' '], [string
$after = ' '], [string
$text = '#'], [string
$title = '#'], [string
$class = '']
)
|
|
Template function: Provide link to message form for this Item's assigned User.
Parameters:
|
string |
$form_url: |
url of the message form |
|
string |
$before: |
to display before link |
|
string |
$after: |
to display after link |
|
string |
$text: |
link text |
|
string |
$title: |
link title |
|
string |
$class: |
class name |
API Tags:
| Return: | true, if a link was displayed; false if there's no email address for the assigned User. |
void page_links(
[
$params = array()]
)
|
|
T-Tag: Display a link to pages for multi-page items
'before' => '<p>'. T_('Pages:'). ' ',
'after' => '</p>',
'separator' => ' ',
'single' => '',
'current_page' => '#', // global $page
'pagelink' => '%d',
'url' => '',
), $params );
Parameters:
void priority(
[string
$before = ''], [string
$after = '']
)
|
|
Template function: display priority of item
Parameters:
|
string |
$before: |
|
|
string |
$after: |
|
void priority_options(
$field_value,
$allow_none
)
|
|
Template function: display list of priority options
Parameters:
|
|
$field_value: |
|
|
|
$allow_none: |
|
void publish_link(
[
$params = array()]
)
|
|
T-Tag: Display a link to 'publish NOW' an item if current user has permission
Parameters:
API Tags:
boolean remove_renderer(
string
$renderer_code
)
|
|
Remove a renderer (by code) from the Item.
Parameters:
|
string |
$renderer_code: |
Renderer code to remove for this item |
API Tags:
| Return: | True if renderers have changed |
void renderer_checkboxes(
[array|NULL
$item_renderers = NULL]
)
|
|
Template function: display checkable list of renderers
Parameters:
|
array|NULL |
$item_renderers: |
If given, assume these renderers to be checked. |
void replace_callback(
$matches
)
|
|
Callback user for footer()
Parameters:
void send_email_notifications(
[
$display = true]
)
|
|
Send email notifications to subscribed users
Parameters:
Information Tags:
| Todo: | fp>> shall we notify suscribers of blog were this is in extra-cat? blueyed>> IMHO yes. |
void send_outbound_pings(
[boolean
$verbose = true]
)
|
|
Send outbound pings for a post
Parameters:
|
boolean |
$verbose: |
give more info messages (we want to avoid that when we save & continue editing) |
boolean set(
string
$parname, mixed
$parvalue, [boolean
$make_null = false]
)
|
|
Set param value
By default, all values will be considered strings
Parameters:
|
string |
$parname: |
parameter name |
|
mixed |
$parvalue: |
parameter value |
|
boolean |
$make_null: |
true to set to NULL if empty value |
API Tags:
| Return: | true, if a value has been set; false if it has not changed |
Information Tags:
| Todo: | extra_cat_IDs recording |
Redefinition of:
- ItemLight::set()
- Set param value
boolean set_creator_User(
User
&$creator_User
)
|
|
Set the Author of the Item.
Parameters:
|
User |
&$creator_User: |
(Do NOT set to NULL or you may kill the current_User) |
API Tags:
| Return: | true, if it has been set; false if it has not changed |
boolean set_renderers(
array
$renderers
)
|
|
Set the renderers of the Item.
Parameters:
|
array |
$renderers: |
List of renderer codes. |
API Tags:
| Return: | true, if it has been set; false if it has not changed |
boolean set_tags_from_string(
string
$tags
)
|
|
Split tags by comma or semicolon
Parameters:
|
string |
$tags: |
The tags, separated by comma or semicolon |
API Tags:
| Return: | True if the tags have been changed, false otherwise. |
Information Tags:
| Todo: | Tblue> Check whether a change should invalidate the ItemTagsCache for this Item. |
void split_pages(
[string
$format = 'htmlbody']
)
|
|
Make sure, the pages have been obtained (and split up_ from prerendered cache.
Parameters:
void status(
[string
$params = array()]
)
|
|
Template function: display status of item
Statuses: - published
- deprecated
- protected
- private
- draft
Parameters:
void tags(
[
$params = array()]
)
|
|
T-Tag: Display an item's tags
'before' => '<div>'. T_('Tags'). ': ',
'after' => '</div>',
'separator' => ', ',
'links' => true,
), $params );
Parameters:
Template function: Displays trackback autodiscovery information
TODO: build into headers
Template function: displays url to use to trackback this item
boolean update_excerpt(
[
$crop_length = 254], [
$suffix = '…']
)
|
|
Quick and dirty "excerpts should not stay empty".
Parameters:
API Tags:
| Return: | true if excerpt has been changed |
Information Tags:
| Todo: | have a maxlength param for excerpts in blog properties |
| Todo: | crop at word boundary, maybe even sentence boundary. |
boolean update_renderers_from_Plugins(
)
|
|
Trigger Plugin::ItemApplyAsRenderer() event and adjust renderers according to return value.
API Tags:
| Return: | True if renderers got changed. |
void url_link(
[
$params = array()]
)
|
|
T-Tag: Display link to item related url.
By default the link is displayed as a link. Optionally some smart stuff may happen.
'before' => ' ',
'after' => ' ',
'text_template' => '$url$',
'url_template' => '$url$',
'target' => '',
'format' => 'htmlbody',
'podcast' => '#',
'before_podplayer' => '<div class="podplayer">',
'after_podplayer' => '</div>',
), $params );
'text_template' => '$url$': If evaluates to empty, nothing will be displayed (except player if podcast) 'podcast' => '#': handle as podcast (depending on post type), false to disable
Parameters:
void views(
[
$params = array()]
)
|
|
T-Tag: Display a phrase about the number of Item views.
'before' => '',
'after' => '',
'zero_views' => '#',
'one_view' => '#',
'more_views' => '#',
), $params );
Parameters:
API Tags:
void wordcount(
[
$params = array()]
)
|
|
T-Tag: Display the number of words in the post
'before' => '',
'after' => '',
), $params );
Parameters:
|
|