b2evolution

Multilingual multiuser multiblog engine

b2evolution Technical Documentation (0.9.x) [ class tree: evocore ] [ index: evocore ] [ all elements ]

Class: Item

Source Location: /blogs/b2evocore/_class_item.php

Class Item

Inherited Properties, Constants, and Methods
Inherited Properties Inherited Methods Inherited Constants

Inherited From DataObject

DataObject::$ID

Inherited From DataObject

DataObject::DataObject()
Constructor
DataObject::dbchange()
Records a change that will need to be updated in the db
DataObject::dbdelete()
DataObject::dbinsert()
DataObject::dbupdate()
DataObject::dget()
Get a ready-to-display member param by its name
DataObject::disp()
Display a member param by its name
DataObject::get()
Get a member param by its name
DataObject::ID()
Template function: Displays object ID
DataObject::set_param()
Set param value

[ Top ]
Property Summary
User   $Author  
boolean   $autobr  
integer   $blog_ID   Derived from $main_cat_ID
mixed   $comments  
mixed   $content  
mixed   $flags  
mixed   $issue_date  
string   $locale   locale code for the Item content
mixed   $main_cat_ID  
mixed   $mod_date  
mixed   $renderers  
mixed   $status  
mixed   $title  
mixed   $url  
mixed   $urltitle  
mixed   $wordcount  

[ Top ]
Method Summary
Item   Item()   Constructor
void   anchor()   Template function: display anchor for permalinks to refer to
boolean   can_comment()   Template function: Check if user can leave comment on this post or display error
void   can_see_comments()   Check if user can see comments on this post
void   categories()   Template function: list all the category names
void   content()   Template function: display content of item
void   delete_link()   Displays button for deleting the Item if user has proper rights
void   edit_link()   Provide link to edit a post if user has edit rights
void   feedback_link()   Template function: Displays link to feedback page (under some conditions)
void   gen_permalink()   generate permalink for item
void   issue_date()   Template function: display issue date (datetime) of Item
void   issue_time()   Template function: display issue time (datetime) of Item
void   lang()   Template function: display locale for item
void   language()   Template function: display language name for item
void   locale()   Template function: display locale for item
void   main_category()   Template function: display main category name
void   mod_date()   Template function: display last mod date (datetime) of Item
void   mod_time()   Template function: display last mod time (datetime) of Item
void   permalink()   Template function: display permalink for item
void   publish_link()   Provide link to publish a post if user has edit rights
void   status()   Template function: display status of item
void   title()   Template function: display title for item and link to related URL
void   trackback_rdf()   Template function: Displays trackback autodiscovery information
void   trackback_url()   Template function: displays url to use to trackback this item
void   url_link()   Template function: Display link to item related url
void   wordcount()   Template function: Display the number of words in the post

[ Top ]
Properties
User   $Author [line 29]
API Tags:
Access:  public


[ Top ]
boolean   $autobr = 0 [line 54]
API Tags:
Deprecated:  


[ Top ]
integer   $blog_ID [line 60]

Derived from $main_cat_ID


[ Top ]
mixed   $comments [line 48]

[ Top ]
mixed   $content [line 43]

[ Top ]
mixed   $flags [line 46]

[ Top ]
mixed   $issue_date [line 30]

[ Top ]
string   $locale [line 40]

locale code for the Item content

examples: en-US, zh-CN-utf-8


[ Top ]
mixed   $main_cat_ID = 0 [line 45]

[ Top ]
mixed   $mod_date [line 31]

[ Top ]
mixed   $renderers [line 47]

[ Top ]
mixed   $status [line 32]

[ Top ]
mixed   $title [line 41]

[ Top ]
mixed   $url [line 49]

[ Top ]
mixed   $urltitle [line 42]

[ Top ]
mixed   $wordcount = 0 [line 44]

[ Top ]
Methods
Constructor Item  [line 67]

  Item Item( [ $db_row = NULL]  )

Constructor

Parameters:
   $db_row: 


[ Top ]
anchor  [line 245]

  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

[ Top ]
can_comment  [line 390]

  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


[ Top ]
can_see_comments  [line 369]

  void can_see_comments( )

Check if user can see comments on this post



[ Top ]
categories  [line 288]

  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()


[ Top ]
content  [line 449]

  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

[ Top ]
delete_link  [line 817]

  void delete_link( [string $before = ' '], [string $after = ' '], [string $text = '#'], [string $title = '#'], [string $class = ''], [boolean $button = false], [string $glue = '&amp;']  )

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


[ Top ]
edit_link  [line 871]

  void edit_link( [string $before = ' '], [string $after = ' '], [string $text = '#'], [string $title = '#'], [string $class = ''], [string $glue = '&amp;']  )

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


[ Top ]
feedback_link  [line 704]

  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


[ Top ]
gen_permalink  [line 118]

  void gen_permalink( [string $mode = ''], [string $blogurl = ''], [boolean $force_single = false], [string $glue = '&amp;']  )

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

[ Top ]
issue_date  [line 578]

  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


[ Top ]
issue_time  [line 594]

  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


[ Top ]
lang  [line 608]

  void lang( )

Template function: display locale for item



[ Top ]
language  [line 632]

  void language( [string $format = 'htmlbody']  )

Template function: display language name for item

Parameters:
string   $format:  Output format, see format_to_output()


[ Top ]
locale  [line 618]

  void locale( )

Template function: display locale for item



[ Top ]
main_category  [line 358]

  void main_category( [string $format = 'htmlbody']  )

Template function: display main category name

Parameters:
string   $format:  Output format, see format_to_output()


[ Top ]
mod_date  [line 648]

  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


[ Top ]
mod_time  [line 664]

  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


[ Top ]
permalink  [line 681]

  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


[ Top ]
publish_link  [line 911]

  void publish_link( [string $before = ' '], [string $after = ' '], [string $text = '#'], [string $title = '#'], [string $class = ''], [string $glue = '&amp;']  )

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


[ Top ]
status  [line 951]

  void status( [string $format = 'htmlbody']  )

Template function: display status of item

Statuses:

  • published
  • deprecated
  • protected
  • private
  • draft

Parameters:
string   $format:  Output format, see format_to_output()


[ Top ]
title  [line 976]

  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()


[ Top ]
trackback_rdf  [line 1009]

  void trackback_rdf( )

Template function: Displays trackback autodiscovery information



[ Top ]
trackback_url  [line 1040]

  void trackback_url( )

Template function: displays url to use to trackback this item



[ Top ]
url_link  [line 1064]

  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()


[ Top ]
wordcount  [line 1080]

  void wordcount( )

Template function: Display the number of words in the post



[ Top ]

Documentation generated on Tue, 20 May 2008 01:53:08 +0200 by phpDocumentor 1.4.2