Item Item(
[
$db_row = NULL]
)
|
|
Constructor
Parameters:
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 |
boolean can_comment(
[string
$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 |
$before_error: |
string to display before any error message |
|
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 |
Check if user can see comments on this post
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
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, 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 |
void delete_link(
[string
$before = ' '], [string
$after = ' '], [string
$text = '#'], [string
$title = '#'], [string
$class = ''], [boolean
$button = false], [string
$glue = '&']
)
|
|
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 |
$glue: |
glue between url params |
void edit_link(
[string
$before = ' '], [string
$after = ' '], [string
$text = '#'], [string
$title = '#'], [string
$class = ''], [string
$glue = '&']
)
|
|
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 |
$glue: |
glue between url params |
void feedback_link(
[string
$type = 'feedbacks'], [string
$before = ''], [string
$after = ''], [string
$zero = '#'], [string
$one = '#'], [string
$more = '#'], [string
$title = '#'], [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 |
|
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' |
|
string |
$blogurl: |
url to use |
void gen_permalink(
[string
$mode = ''], [string
$blogurl = ''], [boolean
$force_single = false], [string
$glue = '&']
)
|
|
generate permalink for item
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 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 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 |
void permalink(
[string
$mode = ''], [string
$blogurl = '']
)
|
|
Template function: display permalink for item
Parameters:
|
string |
$mode: |
'post', 'archive#id' or 'archive#title' |
|
string |
$blogurl: |
url to use |
void 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 |
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 URL |
|
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 url_link(
[string
$before = ''], [string
$after = ''], [string
$format = 'htmlbody']
)
|
|
Template function: Display link to item related url
Parameters:
|
string |
$before: |
string to display before the url (if exists) |
|
string |
$after: |
string to display after the url (if exists) |
|
string |
$format: |
Output format, see format_to_output() |
Template function: Display the number of words in the post