Item Item(
[object table
$db_row = NULL], [string
$dbtable = 'T_posts'], [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 |
void add_renderer(
string
$renderer_code
)
|
|
Add a renderer (by code) to the Item.
Parameters:
|
string |
$renderer_code: |
Renderer code to add for this item |
void anchor(
[string
$mode = '']
)
|
|
Template function: display anchor for permalinks to refer to
Parameters:
|
string |
$mode: |
'id' or 'title' |
Information Tags:
| Todo: | archives modes in clean mode |
void assigned_to(
[string
$before = ''], [string
$after = ''], [string
$format = 'htmlbody']
)
|
|
Template function: display assignee of item
Parameters:
void assigned_user_options(
)
|
|
Template function: display list of assigned user options
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(
[string
$before = ''], [string
$after = ''], [string
$format = 'htmlbody']
)
|
|
Template function: display author/creator of item
Parameters:
|
string |
$before: |
String to display before author name |
|
string |
$after: |
String to display after author name |
|
string |
$format: |
Output format, see format_to_output() |
void blog_name(
[string
$format = 'htmlbody']
)
|
|
Template function: Display the main blog name.
Parameters:
API Tags:
Information Tags:
| Todo: | is it possible to use {$Item->get_Blog()}->name() instead? (we can't possibly duplicate all sub-object functions here!!!) blueyed>> not with PHP4 and {$Item->get_Blog()}->name() (with curly brackets) not even in PHP5! |
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 |
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.
void categories(
[string
$link_title = '#'], [string
$before_main = '<strong>'], [string
$after_main = '</strong>'], [string
$before_other = ''], [string
$after_other = ''], [string
$before_external = '<em>'], [string
$after_external = '</em>'], [string
$separator = ', '], [string
$format = 'htmlbody']
)
|
|
Template function: list all the category names
Parameters:
|
string |
$link_title: |
link title, '#' for default, false if you want no links |
|
string |
$before_main: |
string fo display before the MAIN category, 'hide' to ignore main cat |
|
string |
$after_main: |
string fo display after the MAIN category, 'hide' to ignore main cat |
|
string |
$before_other: |
string fo display before OTHER categories, 'hide' to ignore other cats |
|
string |
$after_other: |
string fo display after OTHER categories, 'hide' to ignore other cats |
|
string |
$before_external: |
string fo display before EXTERNAL categories, 'hide' to ignore external cats |
|
string |
$after_external: |
string fo display after EXTERNAL categories, 'hide' to ignore external cats |
|
string |
$separator: |
separator string |
|
string |
$format: |
Output format for each cat, see format_to_output() |
void content(
[mixed
$disppage = '#'], [mixed
$dispmore = '#'], [string
$more_link_text = '#'], [string
$more_anchor = '#'], [string
$before_more = '#'], [string
$after_more = '#'], [string
$format = 'htmlbody'], [integer
$cut = 0], [boolean
$stripteaser = false], [string
$more_file = '']
)
|
|
Template function: display content of item
Calling this with "MORE" (i-e displaying full content) will increase the view counter, except on special occasions, see Hit::is_new_view().
WARNING: parameter order is different from deprecated the_content(...)
Parameters:
|
mixed |
$disppage: |
page number to display specific page, # for url parameter |
|
mixed |
$dispmore: |
true to display 'more' text (which means "full post"), false not to display, # for url parameter |
|
string |
$more_link_text: |
text to display as the more link |
|
string |
$more_anchor: |
text to display as the more anchor (once the more link has been clicked) |
|
string |
$before_more: |
string to display before more link/anchor |
|
string |
$after_more: |
string to display after more link/anchor |
|
string |
$format: |
Output format, see format_to_output() |
|
integer |
$cut: |
max number of words |
|
boolean |
$stripteaser: |
true if you don't want to repeat teaser after more link was pressed |
|
string |
$more_file: |
filename to use to display more |
Information Tags:
| Todo: | Param order and cleanup |
Trigger event AfterItemDelete after calling parent method.
API Tags:
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.
Update the DB based on previously recorded changes
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(
[string
$before = ' '], [string
$after = ' '], [string
$text = '#'], [string
$title = '#'], [string
$class = ''], [boolean
$button = false], [string
$actionurl = '#']
)
|
|
Displays button for deleting the Item if user has proper rights
Parameters:
|
string |
$before: |
to display before link |
|
string |
$after: |
to display after link |
|
string |
$text: |
link text |
|
string |
$title: |
link title |
|
string |
$class: |
class name |
|
boolean |
$button: |
true to make this a button instead of a link |
|
string |
$actionurl: |
page url for the delete action |
void deprecate_link(
[string
$before = ' '], [string
$after = ' '], [string
$text = '#'], [string
$title = '#'], [string
$class = ''], [string
$glue = '&']
)
|
|
Display link to deprecate a post if user has edit rights
Parameters:
|
string |
$before: |
to display before link |
|
string |
$after: |
to display after link |
|
string |
$text: |
link text |
|
string |
$title: |
link title |
|
string |
$class: |
class name |
|
string |
$glue: |
glue between url params |
void edit_link(
[
$before = ' '], [
$after = ' '], [
$text = '#'], [
$title = '#'], [
$class = ''], [
$actionurl = '#']
)
|
|
Parameters:
|
|
$before: |
|
|
|
$after: |
|
|
|
$text: |
|
|
|
$title: |
|
|
|
$class: |
|
|
|
$actionurl: |
|
API Tags:
void extra_status(
[string
$before = ''], [string
$after = ''], [string
$format = 'htmlbody']
)
|
|
Template function: display extra status of item
Parameters:
void feedback_link(
[string
$type = 'feedbacks'], [string
$before = ''], [string
$after = ''], [string
$zero = '#'], [string
$one = '#'], [string
$more = '#'], [string
$title = '#'], [string
$status = 'published'], [boolean
$use_popup = '#'], [boolean
$hideifnone = '#'], [string
$mode = ''], [string
$blogurl = '']
)
|
|
Template function: Displays link to feedback page (under some conditions)
Parameters:
|
string |
$type: |
Type of feedback to link to (feedbacks (all)/comments/trackbacks/pingbacks) |
|
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 |
$title: |
Link title |
|
string |
$status: |
Status of feedbacks to count |
|
boolean |
$use_popup: |
true to use a popup windows ('#' to use if comments_popup_windows() is there) |
|
boolean |
$hideifnone: |
true to hide if no feedback ('#' for default) |
|
string |
$mode: |
'pid' or 'title'; 'none' for NO LINK |
|
string |
$blogurl: |
url to use |
void feedback_moderation(
[string
$type = 'feedbacks'], [string
$before = ''], [string
$after = ''], [string
$zero = '#'], [string
$one = '#'], [string
$more = '#'], [string
$edit_comments_link = '#'], [boolean
$hideifnone = true]
)
|
|
Template function: Displays feeback moderation info
Parameters:
|
string |
$type: |
Type of feedback to link to (feedbacks (all)/comments/trackbacks/pingbacks) |
|
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 |
$hideifnone: |
true to hide if no feedback |
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
User|NULL get_assigned_User(
)
|
|
Get the User who is assigned to the Item.
API Tags:
| Return: | NULL if no user is assigned. |
void get_assigned_user_options(
)
|
|
Template function: get list of assigned user options
Get the Blog object for the Item.
User &get_creator_User(
)
|
|
Get the User who created the Item.
void get_delete_link(
[string
$before = ' '], [string
$after = ' '], [string
$text = '#'], [string
$title = '#'], [string
$class = ''], [boolean
$button = false], [string
$actionurl = '#']
)
|
|
Gets button for deleting the Item if user has proper rights
Parameters:
|
string |
$before: |
to display before link |
|
string |
$after: |
to display after link |
|
string |
$text: |
link text |
|
string |
$title: |
link title |
|
string |
$class: |
class name |
|
boolean |
$button: |
true to make this a button instead of a link |
|
string |
$actionurl: |
page url for the delete action |
void get_deprecate_link(
[string
$before = ' '], [string
$after = ' '], [string
$text = '#'], [string
$title = '#'], [string
$class = ''], [string
$glue = '&']
)
|
|
Provide link to deprecate a post if user has edit rights
Parameters:
|
string |
$before: |
to display before link |
|
string |
$after: |
to display after link |
|
string |
$text: |
link text |
|
string |
$title: |
link title |
|
string |
$class: |
class name |
|
string |
$glue: |
glue between url params |
void get_edit_link(
[string
$before = ' '], [string
$after = ' '], [string
$text = '#'], [string
$title = '#'], [string
$class = ''], [string
$actionurl = '#']
)
|
|
Provide link to edit a post if user has edit rights
Parameters:
|
string |
$before: |
to display before link |
|
string |
$after: |
to display after link |
|
string |
$text: |
link text |
|
string |
$title: |
link title |
|
string |
$class: |
class name |
|
string |
$actionurl: |
page url for the delete action |
void get_issue_date(
[string
$format = ''], [boolean
$useGM = false]
)
|
|
returns issue 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 |
Get reference to array of Links
void get_permanent_link(
[string
$text = '#'], [string
$title = '#'], [string
$class = '']
)
|
|
Returns a permalink link to the Item
Note: If you only want the permalink URL, use Item::get_permanent_url()
Parameters:
|
string |
$text: |
link text or special value: '#', '#icon#', '#text#', '#title#' |
|
string |
$title: |
link title |
|
string |
$class: |
class name |
void get_permanent_url(
[string
$mode = ''], [string
$blogurl = ''], [boolean
$force_single = false], [string
$glue = '&']
)
|
|
Generate the permalink for the item.
Note: This actually only returns the URL, to get a real link, use Item::get_permanent_link()
Parameters:
|
string |
$mode: |
'urltitle', 'pid', 'archive#id' or 'archive#title' |
|
string |
$blogurl: |
url to use |
|
boolean |
$force_single: |
true to force single post on destination page |
|
string |
$glue: |
glue between url params |
Information Tags:
| Todo: | archives modes in clean mode |
void get_publish_link(
[string
$before = ' '], [string
$after = ' '], [string
$text = '#'], [string
$title = '#'], [string
$class = ''], [string
$glue = '&']
)
|
|
Provide link to publish a post if user has edit rights
Note: publishing date will be updated
Parameters:
|
string |
$before: |
to display before link |
|
string |
$after: |
to display after link |
|
string |
$text: |
link text |
|
string |
$title: |
link title |
|
string |
$class: |
class name |
|
string |
$glue: |
glue between url params |
Get the list of renderers for this Item.
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. |
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:
| Return: | Did we increase view count? |
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_trackbacks = ''], [
$autobr = 0], [
$pingsdone = true], [
$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_trackbacks: |
|
|
|
$autobr: |
|
|
|
$pingsdone: |
|
|
|
$post_urltitle: |
|
|
|
$post_url: |
|
|
|
$post_comment_status: |
|
|
|
$post_renderers: |
|
|
|
$item_typ_ID: |
|
|
|
$item_st_ID: |
|
Information Tags:
| Todo: | cleanup the set() calls |
void insert_update_extracats(
string
$mode
)
|
|
Parameters:
|
string |
$mode: |
'insert' | 'update' |
void issue_date(
[string
$format = ''], [boolean
$useGM = false]
)
|
|
Template function: display issue 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 issue_time(
[string
$format = ''], [boolean
$useGM = false]
)
|
|
Template function: display issue 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 |
Template function: display locale for item
void language(
[string
$format = 'htmlbody']
)
|
|
Template function: display language name for item
Parameters:
Template function: display number of links attached to this Item
Load the Blog object for the Item, without returning it.
This is needed for Results object callbacks.
boolean load_from_Request(
[boolean
$force_edit_date = false]
)
|
|
Load data from Request form fields.
Parameters:
|
boolean |
$force_edit_date: |
true to force edit date (as long as perms permit) |
API Tags:
| Return: | true if loaded data seems valid. |
Load links if they were not loaded yet.
Template function: display locale for item
void main_category(
[string
$format = 'htmlbody']
)
|
|
Template function: display main category name
Parameters:
void mod_date(
[string
$format = ''], [boolean
$useGM = false]
)
|
|
Template function: display last mod 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 mod_time(
[string
$format = ''], [boolean
$useGM = false]
)
|
|
Template function: display last mod 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 |
boolean msgform_link(
string
$form_url, [string
$before = ' '], [string
$after = ' '], [string
$text = '#'], [string
$title = '#'], [string
$class = '']
)
|
|
Template function: Provide link to message form for this Item's author.
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 Item's author. |
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 permanent_link(
[string
$text = '#'], [string
$title = '#'], [string
$class = '']
)
|
|
Displays a permalink link to the Item
Note: If you only want the permalink URL, use Item::permanent_url()
Parameters:
|
string |
$text: |
link text or special value: '#', '#icon#', '#text#', '#title#' |
|
string |
$title: |
link title |
|
string |
$class: |
class name |
void permanent_url(
[string
$mode = ''], [string
$blogurl = '']
)
|
|
Template function: display permalink for item
Note: This actually only outputs the URL, to display a real link, use Item::permanent_link()
Parameters:
|
string |
$mode: |
'post', 'archive#id' or 'archive#title' |
|
string |
$blogurl: |
url to use |
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(
[
$before = ' '], [
$after = ' '], [
$text = '#'], [
$title = '#'], [
$class = ''], [
$glue = '&']
)
|
|
Parameters:
|
|
$before: |
|
|
|
$after: |
|
|
|
$text: |
|
|
|
$title: |
|
|
|
$class: |
|
|
|
$glue: |
|
void remove_renderer(
string
$renderer_code
)
|
|
Remove a renderer (by code) from the Item.
Parameters:
|
string |
$renderer_code: |
Renderer code to remove for this item |
void renderer_checkboxes(
)
|
|
Template function: display checkable list of renderers
void send_email_notifications(
[
$display = true]
)
|
|
Send email notifications to subscribed users
Parameters:
Information Tags:
| Todo: | shall we notify suscribers of blog were this is in extra-cat? blueyed>> IMHO yes. fp>>why not but is this important? blueyed>> Not really, just have answered.. :) |
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:
- DataObject::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 |
void status(
[string
$format = 'htmlbody']
)
|
|
Template function: display status of item
Statuses:
- published
- deprecated
- protected
- private
- draft
Parameters:
void title(
[string
$before = ''], [string
$after = ''], [boolean
$add_link = true], [string
$format = 'htmlbody']
)
|
|
Template function: display title for item and link to related URL
Parameters:
|
string |
$before: |
String to display before the title if there is something to display |
|
string |
$after: |
String to display after the title if there is something to display |
|
boolean |
$add_link: |
false if you don't want to link to related URL (if applicable) |
|
string |
$format: |
Output format, see format_to_output() |
Template function: Displays trackback autodiscovery information
Template function: displays url to use to trackback this item
void type(
[string
$before = ''], [string
$after = ''], [string
$format = 'htmlbody']
)
|
|
Template function: display type of item
Parameters:
void update(
$post_title,
$post_content, [
$post_timestamp = ''], [
$main_cat_ID = 1], [
$extra_cat_IDs = array()], [
$post_status = 'published'], [
$post_locale = '#'], [
$post_trackbacks = ''], [
$autobr = 0], [
$pingsdone = true], [
$post_urltitle = ''], [
$post_url = ''], [
$post_comment_status = 'open'], [
$post_renderers = array()], [
$item_typ_ID = 0], [
$item_st_ID = 0]
)
|
|
Update a post and save to DB
This function has to handle all needed DB dependencies!
Parameters:
|
|
$post_title: |
|
|
|
$post_content: |
|
|
|
$post_timestamp: |
|
|
|
$main_cat_ID: |
|
|
|
$extra_cat_IDs: |
|
|
|
$post_status: |
|
|
|
$post_locale: |
|
|
|
$post_trackbacks: |
|
|
|
$autobr: |
|
|
|
$pingsdone: |
|
|
|
$post_urltitle: |
|
|
|
$post_url: |
|
|
|
$post_comment_status: |
|
|
|
$post_renderers: |
|
|
|
$item_typ_ID: |
|
|
|
$item_st_ID: |
|
API Tags:
| Deprecated: | since 1.9 - not used in the core anymore |
void url_link(
[string
$before = ''], [string
$after = ''], [string
$text = '%s'], [array
$attribs = array()], [string
$format = 'htmlbody']
)
|
|
Template function: Display link to item related url
Parameters:
|
string |
$before: |
string to display before the link (if exists) |
|
string |
$after: |
string to display after the link (if exists) |
|
string |
$text: |
Link text to use (%s gets replaced by the URL). |
|
array |
$attribs: |
Attributes for the <a> tag (if the href attribute is set, %s gets replaced by the URL). |
|
string |
$format: |
Output format, see format_to_output() |
integer views(
[string
$zero = '#'], [string
$one = '#'], [string
$more = '#']
)
|
|
Template function: Display a phrase about the number of Item 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 (include %d for # of views) |
API Tags:
Template function: Display the number of words in the post