b2evolution

Multilingual multiuser multiblog engine

b2evolution Technical Documentation (CVS HEAD) [ class tree: evocore ] [ index: evocore ] [ all elements ]

Class: Item

Source Location: /blogs/inc/items/model/_item.class.php

Class Item

Class Overview

Item Class

Located in /blogs/inc/items/model/_item.class.php [line 49]

DataObject
   |
   --ItemLight
      |
      --Item
Author(s):
Information Tags:
Version:  beta

Properties

Methods

[ Top ]
Inherited Properties, Constants, and Methods
Inherited Properties Inherited Methods Inherited Constants

Inherited From ItemLight

ItemLight::$Blog
ItemLight::$blog_ID
ItemLight::$excerpt
ItemLight::$issue_date
ItemLight::$main_cat_ID
ItemLight::$main_Chapter
ItemLight::$mod_date
ItemLight::$ptyp_ID
ItemLight::$title
ItemLight::$url
ItemLight::$urltitle

Inherited From DataObject

DataObject::$allow_ID_insert
DataObject::$delete_cascades
DataObject::$delete_restrictions
DataObject::$ID

Inherited From ItemLight

ItemLight::ItemLight()
Constructor
ItemLight::categories()
Template function: list all the category names
ItemLight::get_archive_url()
Generate a link to the post in the archives
ItemLight::get_Blog()
Get the Blog object for the Item.
ItemLight::get_blog_ID()
Get the blog ID of this item (derived from main chapter).
ItemLight::get_Chapters()
Get list of Chapter objects.
ItemLight::get_chapter_url()
Generate a link to the post in the category
ItemLight::get_excerpt()
Template function: get excerpt
ItemLight::get_issue_date()
returns issue date (datetime) of Item
ItemLight::get_main_Chapter()
Get the main Chapter.
ItemLight::get_permanent_link()
Returns a permalink link to the Item
ItemLight::get_permanent_url()
Generate the permalink for the item.
ItemLight::get_single_url()
Generate a single post link for the item
ItemLight::get_title()
Get "nice" title of the Item
ItemLight::issue_date()
Template function: display issue date (datetime) of Item
ItemLight::issue_time()
Template function: display issue time (datetime) of Item
ItemLight::is_featured()
Is this a featured post (any intro post will return false even if it's checked as "featured")
ItemLight::is_intro()
Is this an Intro post
ItemLight::lang()
Template function: display locale for item
ItemLight::language()
Template function: display language name for item
ItemLight::load_Blog()
Load the Blog object for the Item, without returning it.
ItemLight::locale()
Template function: display locale for item
ItemLight::locale_flag()
Template tag
ItemLight::locale_temp_switch()
Template function: Temporarily switch to this post's locale
ItemLight::main_category()
Template function: display main category name
ItemLight::mod_date()
Template function: display last mod date (datetime) of Item
ItemLight::mod_time()
Template function: display last mod time (datetime) of Item
ItemLight::permanent_link()
Displays a permalink link to the Item
ItemLight::permanent_url()
Template function: display permalink for item
ItemLight::set()
Set param value
ItemLight::title()
Template function: display title for item and link to related URL
ItemLight::type()
Template function: display type of item

Inherited From DataObject

DataObject::DataObject()
Constructor
DataObject::action_icon()
Generate requested action icon depending on perm
DataObject::action_link()
Generate requested action link depending on perm
DataObject::check_delete()
Check relations for restrictions before deleting
DataObject::check_relations()
Check relations for restrictions or cascades.
DataObject::confirm_delete()
Displays form to confirm deletion of this object
DataObject::dbchange()
Records a change that will need to be updated in the db
DataObject::dbdelete()
Delete object from DB.
DataObject::dbexists()
Check existence of specified value in unique field.
DataObject::dbinsert()
Insert object into DB based on previously recorded changes.
DataObject::dbsave()
Inserts or Updates depending on object state.
DataObject::dbupdate()
Update the DB based on previously recorded changes
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::get_action_title()
Generate help title text for action
DataObject::history_info_icon()
Create icon with dataobject history
DataObject::ID()
Template function: Displays object ID.
DataObject::set()
Set param value
DataObject::set_from_Request()
Set a parameter from a Request form value.
DataObject::set_param()
Set param value.
DataObject::set_string_from_param()
Set a string parameter from a Request form value.

[ Top ]
Property Summary
User   $assigned_User   The assigned User to the item.
integer   $assigned_user_ID   ID of the user that created the item Can be NULL
User   $Author  
string   $comment_status   Comments status
mixed   $content  
mixed   $content_pages   Lazy filled, use split_page()
User   $creator_User   The User who has created the Item (lazy-filled).
integer   $creator_user_ID   ID of the user that created the item
string   $creator_user_login   Login of the user that created the item (lazy-filled)
mixed   $datedeadline  
integer   $dateset   Has the publish date been explicitely set?
mixed   $double1  
mixed   $double2  
mixed   $double3  
mixed   $double4  
mixed   $double5  
Plugin   $editor_code  
array   $extra_cat_IDs   array of IDs or NULL if we don't know...
boolean   $featured  
array   $Links   Array of Links attached to this item.
string   $locale   Locale code for the Item content.
mixed   $metadesc   Meta Description tag for this post
mixed   $metakeywords   Meta keywords for this post
integer   $notifications_ctsk_ID   Which cron task is responsible for handling notifications?
string   $notifications_status   Have post processing notifications been handled?
float   $order  
mixed   $priorities  
mixed   $priority  
mixed   $pst_ID  
string   $renderers   The list of renderers, imploded by '.'.
string   $status   The visibility status of the item.
array   $tags   Array of tags (strings)
mixed   $titletag  
mixed   $varchar1  
mixed   $varchar2  
mixed   $varchar3  
mixed   $wordcount  

[ Top ]
Method Summary
Item   Item()   Constructor
boolean   add_renderer()   Add a renderer (by code) to the Item.
void   anchor()   Template function: display anchor for permalinks to refer to.
void   anchor_id()   Template tag
void   assigned_to()   Template function: display assignee of item
void   assign_to()  
void   assign_to_first_cat_for_collection()   Assign the item to the first category we find in the requested collection
void   author()   Template function: display author/creator of 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
boolen   can_receive_pings()   Return true if trackbacks and pingbacks are allowed
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   content()   DEPRECATED
void   content_extension()   Display content teaser of item (will stop at "<!-- more -->"
void   content_teaser()   Display content teaser of item (will stop at "<!-- more -->"
void   count_view()   Increase view counter
void   custom()   Display custom field
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()   Displays button for deleting the Item if user has proper rights
void   delete_prerendered_content()   Unset any prerendered content for this item (in PHP cache).
void   deprecate_link()   Display link to deprecate a post if user has edit rights
void   div_classes()   Output classes for the Item <div>
void   edit_link()   Template tag
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()   Template function: Displays link to feedback page (under some conditions)
void   feedback_moderation()   Template function: Displays feeback moderation info
void   files()   Display the attachments/files linked to the current Item
boolean   footer()   Template tag: display footer for the current Item.
mixed   get()   Get a member param by its name
string   get_anchor_id()  
User|NULL   get_assigned_User()   Get the User who is assigned to the Item.
string   get_assigned_user_options()   Get list of assigned user options
DataObjectList2   get_attachment_FileList()   Get list of attached files
void   get_content_excerpt()   This is like a teaser with no HTML and a cropping.
string   get_content_extension()   Template function: get content extension of item (part after "<!-- more -->")
void   get_content_page()   Get a specific page to display (from the prerendered cache)
array   get_content_parts()   Get content parts (split by "<!--more-->").
string   get_content_teaser()   Template function: get content teaser of item (will stop at "<!-- more -->"
string   get_creator_login()   Get login of the User who created the Item.
User   &get_creator_User()   Get the User who created the Item.
void   get_delete_link()   Gets button for deleting the Item if user has proper rights
void   get_deprecate_link()   Provide link to deprecate a post if user has edit rights
void   get_edit_link()   Provide link to edit a post if user has edit rights
void   get_feedback_feed_url()   Get URL to display the post comments in an XML feed.
void   get_feedback_title()   Get text depending on number of comments
string   get_feedback_url()   Get URL to display the post comments.
string   get_files()   Get block of attachments/files linked to the current Item
void   get_images()   Get block of images linked to the current Item
void   &get_Links()   Get reference to array of Links
void   get_metadesc()   Get the meta description tag
void   get_metakeywords()   Get the meta keyword tag
void   get_more_link()   Display more link
string   get_player()   Get HTML code to display a flash audio player for playback of a given URL.
array   get_prefetch_itemlist_IDs()   Get a list of item IDs from $MainList and $ItemList, if they are loaded.
string   get_prerendered_content()   Get the prerendered content. If it has not been generated yet, it will.
void   get_publish_link()   Provide link to publish a post if user has edit rights
array   get_renderers()   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.
array   &get_tags()   Get array of tags.
void   get_titletag()   Get the title for the <title> tag
string   get_trackback_url()   Template function: get url to use to trackback this item
string   get_views()   Template function: Display the number of times the Item has been viewed
void   handle_post_processing()   Execute or schedule post(=after) processing tasks
boolean   has_content_parts()   Does the post have different content parts (teaser/extension, divided by "<!--more-->")? This is also true for posts that have images with "aftermore" position.
boolean   has_feedback()   Return true if there is any feedback of given type.
boolean   hidden_teaser()   Should the teaser get hidden when displaying full post ($more).
void   images()   Display the images linked to the current 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   insert_update_extracats()  
void   insert_update_tags()   Save tags to DB
void   linkcount()   Template function: display number of links attached to this Item
boolean   load_from_Request()   Load data from Request form fields.
void   load_links()   Load links if they were not loaded yet.
void   more_link()   Template tag
boolean   msgform_link()   Template function: Provide link to 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()  
void   priority()   Template function: display priority of item
void   priority_options()   Template function: display list of priority options
void   publish_link()  
boolean   remove_renderer()   Remove a renderer (by code) from the Item.
void   renderer_checkboxes()   Template function: display checkable list of renderers
void   replace_callback()   Callback user for footer()
void   send_email_notifications()   Send email notifications to subscribed users
void   send_outbound_pings()   Send outbound pings for a post
boolean   set()   Set param value
void   set_creator_by_login()   Set creator user
boolean   set_creator_User()   Set the Author of the Item.
boolean   set_renderers()   Set the renderers of the Item.
void   set_tags_from_string()   Split tags by comma or semicolon
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   status_raw()   Output raw status.
void   tags()   Display tags for Item
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".
boolean   update_renderers_from_Plugins()   Trigger Plugin::ItemApplyAsRenderer() event and adjust renderers according to return value.
void   url_link()   Template function: Display link to item related url.
integer   views()   Template function: Display a phrase about the number of Item views.
void   wordcount()   Template function: Display the number of words in the post

[ Top ]
Properties
User   $assigned_User [line 91]

The assigned User to the item.

Can be NULL

API Tags:
See:  Item::get_assigned_User()
See:  Item::assign_to()
Access:  protected


[ Top ]
integer   $assigned_user_ID [line 99]

ID of the user that created the item Can be NULL


[ Top ]
User   $Author [line 65]
API Tags:
Deprecated:  by $creator_User


[ Top ]
string   $comment_status [line 152]

Comments status

"open", "disabled" or "closed


[ Top ]
mixed   $content [line 118]

[ Top ]
mixed   $content_pages = NULL [line 135]

Lazy filled, use split_page()


[ Top ]
User   $creator_User [line 58]

The User who has created the Item (lazy-filled).

API Tags:
See:  Item::get_creator_User()
See:  Item::set_creator_User()
Access:  protected


[ Top ]
integer   $creator_user_ID [line 72]

ID of the user that created the item


[ Top ]
string   $creator_user_login [line 79]

Login of the user that created the item (lazy-filled)


[ Top ]
mixed   $datedeadline = '' [line 155]

[ Top ]
integer   $dateset = 1 [line 223]

Has the publish date been explicitely set?


[ Top ]
mixed   $double1 [line 167]

[ Top ]
mixed   $double2 [line 168]

[ Top ]
mixed   $double3 [line 169]

[ Top ]
mixed   $double4 [line 170]

[ Top ]
mixed   $double5 [line 171]

[ Top ]
Plugin   $editor_code = NULL [line 179]

[ Top ]
array   $extra_cat_IDs = NULL [line 197]

array of IDs or NULL if we don't know...


[ Top ]
boolean   $featured [line 165]

[ Top ]
array   $Links = NULL [line 216]

Array of Links attached to this item.

NULL when not initialized.

API Tags:
Access:  public


[ Top ]
string   $locale [line 116]

Locale code for the Item content.

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


[ Top ]
mixed   $metadesc [line 125]

Meta Description tag for this post


[ Top ]
mixed   $metakeywords [line 130]

Meta keywords for this post


[ Top ]
integer   $notifications_ctsk_ID [line 190]

Which cron task is responsible for handling notifications?


[ Top ]
string   $notifications_status [line 185]

Have post processing notifications been handled?


[ Top ]
float   $order [line 161]

[ Top ]
mixed   $priorities [line 225]

[ Top ]
mixed   $priority [line 156]

[ Top ]
mixed   $pst_ID [line 154]

[ Top ]
string   $renderers [line 144]

The list of renderers, imploded by '.'.

API Tags:
Access:  protected


[ Top ]
string   $status [line 108]

The visibility status of the item.

'published', 'deprecated', 'protected', 'private' or 'draft'


[ Top ]
array   $tags = NULL [line 206]

Array of tags (strings)

Lazy loaded.


[ Top ]
mixed   $titletag [line 120]

[ Top ]
mixed   $varchar1 [line 172]

[ Top ]
mixed   $varchar2 [line 173]

[ Top ]
mixed   $varchar3 [line 174]

[ Top ]
mixed   $wordcount [line 138]

[ Top ]
Methods
Constructor Item  [line 240]

  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


[ Top ]
add_renderer  [line 4083]

  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


[ Top ]
anchor  [line 584]

  void anchor( )

Template function: display anchor for permalinks to refer to.



[ Top ]
anchor_id  [line 607]

  void anchor_id( )

Template tag



[ Top ]
assigned_to  [line 620]

  void assigned_to( [string $before = ''], [string $after = ''], [string $format = 'htmlbody']  )

Template function: display assignee of item

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


[ Top ]
assign_to  [line 336]

  void assign_to( $user_ID, [ $dbupdate = true]  )

Parameters:
   $user_ID: 
   $dbupdate: 

Information Tags:
Todo:  use extended dbchange instead of set_param...
Todo:  Normalize to set_assigned_User!?

[ Top ]
assign_to_first_cat_for_collection  [line 4036]

  void assign_to_first_cat_for_collection( integer $collection_ID  )

Assign the item to the first category we find in the requested collection

Parameters:
integer   $collection_ID: 


[ Top ]
author  [line 374]

  void author( [ $params = array()]  )

Template function: display author/creator of item

Parameters:
   $params: 


[ Top ]
can_comment  [line 673]

  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


[ Top ]
can_rate  [line 759]

  boolean can_rate( )

Template function: Check if user can can rate this post


API Tags:
Return:  true if user can post, false if s/he cannot


[ Top ]
can_receive_pings  [line 2220]

  boolen can_receive_pings( )

Return true if trackbacks and pingbacks are allowed



[ Top ]
can_see_comments  [line 651]

  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.



[ Top ]
content  [line 1184]

  void content( )

DEPRECATED



[ Top ]
content_extension  [line 1199]

  void content_extension( $params  )

Display content teaser of item (will stop at "<!-- more -->"

Parameters:
   $params: 


[ Top ]
content_teaser  [line 1092]

  void content_teaser( $params  )

Display content teaser of item (will stop at "<!-- more -->"

Parameters:
   $params: 


[ Top ]
count_view  [line 1269]

  void count_view( [ $params = array()]  )

Increase view counter

Parameters:
   $params: 

Information Tags:
Todo:  merge with inc_viewcount

[ Top ]
custom  [line 1316]

  void custom( $params  )

Display custom field

Parameters:
   $params: 


[ Top ]
dbdelete  [line 3447]

  boolean dbdelete( )

Trigger event AfterItemDelete after calling parent method.


API Tags:
Return:  true on success

Information Tags:
Todo:  fp> delete related stuff: comments, cats, file links...

Redefinition of:
DataObject::dbdelete()
Delete object from DB.

[ Top ]
dbinsert  [line 3298]

  boolean dbinsert( )

Insert object into DB based on previously recorded changes


API Tags:
Return:  true on success


Redefinition of:
DataObject::dbinsert()
Insert object into DB based on previously recorded changes.

[ Top ]
dbupdate  [line 3362]

  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:
Return:  true on success


Redefinition of:
DataObject::dbupdate()
Update the DB based on previously recorded changes

[ Top ]
deadline_date  [line 1459]

  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


[ Top ]
deadline_time  [line 1474]

  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


[ Top ]
delete_link  [line 2478]

  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


[ Top ]
delete_prerendered_content  [line 915]

  void delete_prerendered_content( )

Unset any prerendered content for this item (in PHP cache).



[ Top ]
deprecate_link  [line 2653]

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

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


[ Top ]
div_classes  [line 2852]

  void div_classes( [ $params = array()]  )

Output classes for the Item <div>

Parameters:
   $params: 


[ Top ]
edit_link  [line 2548]

  void edit_link( [ $params = array()]  )

Template tag

Parameters:
   $params: 

API Tags:
See:  Item::get_edit_link()


[ Top ]
excerpt  [line 977]

  void excerpt( $params  )

Display excerpt of item

Parameters:
   $params: 


[ Top ]
extra_status  [line 2883]

  void extra_status( [string $before = ''], [string $after = ''], [string $format = 'htmlbody']  )

Template function: display extra status of item

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


[ Top ]
feedback_feed_link  [line 1991]

  void feedback_feed_link( [string $skin = '_rss2'], [string $before = ''], [string $after = ''], [string $title = '#']  )

Template function: Displays link to the feed for comments on this item

Parameters:
string   $skin:  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


[ Top ]
feedback_link  [line 2046]

  void feedback_link( array $params  )

Template function: Displays link to feedback page (under some conditions)

Parameters:
array   $params: 


[ Top ]
feedback_moderation  [line 2297]

  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/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   $params:  true to hide if no feedback


[ Top ]
files  [line 1856]

  void files( [array $params = array()], [string $format = 'htmlbody']  )

Display the attachments/files linked to the current Item

Parameters:
array   $params:  Array of params
string   $format:  Output format, see format_to_output()


[ Top ]
footer  [line 2354]

  boolean footer( array $params  )

Template tag: display footer for the current Item.

Parameters:
array   $params: 

API Tags:
Return:  true if something has been displayed


[ Top ]
get  [line 3977]

  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

[ Top ]
get_anchor_id  [line 595]

  string get_anchor_id( )



[ Top ]
get_assigned_User  [line 3638]

  User|NULL get_assigned_User( )

Get the User who is assigned to the Item.


API Tags:
Return:  NULL if no user is assigned.


[ Top ]
get_assigned_user_options  [line 637]

  string get_assigned_user_options( )

Get list of assigned user options


API Tags:
Return:  HTML select options list
Uses:  UserCache::get_blog_member_option_list()


[ Top ]
get_attachment_FileList  [line 1954]

  DataObjectList2 get_attachment_FileList( [integer $limit = 1000], [string $position = NULL], [string $order = 'link_ID']  )

Get list of attached files

INNER JOIN on files ensures we only get back file links

Parameters:
integer   $limit: 
string   $position:  Restrict to files/images linked to a specific position. Position can be 'teaser'|'aftermore'
string   $order: 

API Tags:
Access:  protected

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.

[ Top ]
get_content_excerpt  [line 1071]

  void get_content_excerpt( [int $crop_at = 200]  )

This is like a teaser with no HTML and a cropping.

Note: Excerpt and Teaser are TWO DIFFERENT THINGS.

Parameters:
int   $crop_at:  Max length of excerpt


[ Top ]
get_content_extension  [line 1229]

  string get_content_extension( [mixed $disppage = '#'], [boolean $force_more = false], [string $format = 'htmlbody']  )

Template function: get content extension of item (part after "<!-- more -->")

Parameters:
mixed   $disppage:  page number to display specific page, # for url parameter
boolean   $force_more: 
string   $format:  filename to use to display more


[ Top ]
get_content_page  [line 1039]

  void get_content_page( [integer $page = NULL], [string $format = 'htmlbody']  )

Get a specific page to display (from the prerendered cache)

Parameters:
integer   $page:  Page number, NULL/"#" for current
string   $format:  Format, used to retrieve the matching cache; see format_to_output()


[ Top ]
get_content_parts  [line 1163]

  array get_content_parts( array $params  )

Get content parts (split by "<!--more-->").

Parameters:
array   $params:  'disppage', 'format'

API Tags:
Return:  Array of content parts


[ Top ]
get_content_teaser  [line 1121]

  string get_content_teaser( [mixed $disppage = '#'], [boolean $stripteaser = '#'], [string $format = 'htmlbody']  )

Template function: get content teaser of item (will stop at "<!-- more -->"

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


[ Top ]
get_creator_login  [line 3673]

  string get_creator_login( )

Get login of the User who created the Item.


API Tags:
Return:  login


[ Top ]
get_creator_User  [line 3655]

  User &get_creator_User( )

Get the User who created the Item.



[ Top ]
get_delete_link  [line 2412]

  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


[ Top ]
get_deprecate_link  [line 2617]

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

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


[ Top ]
get_edit_link  [line 2495]

  void get_edit_link( [array $params = array()]  )

Provide link to edit a post if user has edit rights

Parameters:
array   $params:  Params:
  • 'before': to display before link
  • 'after': to display after link
  • 'text': link text
  • 'title': link title
  • 'class': CSS class name
  • 'save_context': redirect to current URL?


[ Top ]
get_feedback_feed_url  [line 2016]

  void get_feedback_feed_url( string $skin_folder_name  )

Get URL to display the post comments in an XML feed.

Parameters:
string   $skin_folder_name: 


[ Top ]
get_feedback_title  [line 2235]

  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/pingbacks)
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


[ Top ]
get_feedback_url  [line 2029]

  string get_feedback_url( [ $popup = false], [ $glue = '&amp;']  )

Get URL to display the post comments.

Parameters:
   $popup: 
   $glue: 


[ Top ]
get_files  [line 1869]

  string get_files( [array $params = array()], [string $format = 'htmlbody']  )

Get block of attachments/files linked to the current Item

Parameters:
array   $params:  Array of params
string   $format:  Output format, see format_to_output()

API Tags:
Return:  HTML


[ Top ]
get_images  [line 1792]

  void get_images( [array $params = array()], [string $format = 'htmlbody']  )

Get block of images linked to the current Item

Parameters:
array   $params:  of params
string   $format:  Output format, see format_to_output()


[ Top ]
get_Links  [line 1486]

  void &get_Links( )

Get reference to array of Links



[ Top ]
get_metadesc  [line 1587]

  void get_metadesc( )

Get the meta description tag



[ Top ]
get_metakeywords  [line 1596]

  void get_metakeywords( )

Get the meta keyword tag



[ Top ]
get_more_link  [line 1367]

  void get_more_link( [ $params = array()]  )

Display more link

Parameters:
   $params: 


[ Top ]
get_player  [line 3012]

  string get_player( string $url  )

Get HTML code to display a flash audio player for playback of a given URL.

Parameters:
string   $url:  The URL of a MP3 audio file.

API Tags:
Return:  The HTML code.


[ Top ]
get_prefetch_itemlist_IDs  [line 4130]

  array get_prefetch_itemlist_IDs( )

Get a list of item IDs from $MainList and $ItemList, if they are loaded.

This is used for prefetching item related data for the whole list(s). This will at least return the item's ID itself.



[ Top ]
get_prerendered_content  [line 782]

  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). (not for preview though)

Parameters:
string   $format:  Format, see format_to_output(). Only "htmlbody", "entityencoded", "xml" and "text" get cached.


[ Top ]
get_publish_link  [line 2566]

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

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
   $save_context: 


[ Top ]
get_renderers  [line 4057]

  array get_renderers( )

Get the list of renderers for this Item.



[ Top ]
get_renderers_validated  [line 4067]

  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


[ Top ]
get_tags  [line 1528]

  array &get_tags( )

Get array of tags.

Load from DB if necessary, prefetching any other tags from MainList/ItemList.



[ Top ]
get_titletag  [line 1573]

  void get_titletag( )

Get the title for the <title> tag

If it's not specifically entered, use the regular post title instead



[ Top ]
get_trackback_url  [line 2994]

  string get_trackback_url( )

Template function: get url to use to trackback this item



[ Top ]
get_views  [line 3113]

  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.


[ Top ]
handle_post_processing  [line 3691]

  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)


[ Top ]
has_content_parts  [line 1424]

  boolean has_content_parts( $params  )

Does the post have different content parts (teaser/extension, divided by "<!--more-->")? This is also true for posts that have images with "aftermore" position.

Parameters:
   $params: 

API Tags:
Access:  public


[ Top ]
has_feedback  [line 2190]

  boolean has_feedback( array $params  )

Return true if there is any feedback of given type.

Parameters:
array   $params: 


[ Top ]
hidden_teaser  [line 1445]

  boolean hidden_teaser( $params  )

Should the teaser get hidden when displaying full post ($more).

Parameters:
   $params: 

API Tags:
Access:  protected


[ Top ]
images  [line 1780]

  void images( [array $params = array()], [string $format = 'htmlbody']  )

Display the images linked to the current Item

Parameters:
array   $params:  of params
string   $format:  Output format, see format_to_output()


[ Top ]
inc_viewcount  [line 3611]

  boolean inc_viewcount( )

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?


[ Top ]
insert  [line 3238]

  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:  Use set() + dbinsert() instead


[ Top ]
insert_update_extracats  [line 3514]

  void insert_update_extracats( string $mode  )

Parameters:
string   $mode:  'insert' | 'update'


[ Top ]
insert_update_tags  [line 3549]

  void insert_update_tags( string $mode  )

Save tags to DB

Parameters:
string   $mode:  'insert' | 'update'


[ Top ]
linkcount  [line 1498]

  void linkcount( )

Template function: display number of links attached to this Item



[ Top ]
load_from_Request  [line 406]

  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.


[ Top ]
load_links  [line 1511]

  void load_links( )

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

[ Top ]
more_link  [line 1358]

  void more_link( [ $params = array()]  )

Template tag

Parameters:
   $params: 


[ Top ]
msgform_link  [line 1641]

  boolean msgform_link( [string $params = array()], string 1, string 2, string 3, string 4, string 5  )

Template function: Provide link to message form for this Item's author.

Parameters:
string   1:  to display before link
string   2:  to display after link
string   3:  link text
string   4:  link title
string   5:  class name
string   $params:  url of the message form

API Tags:
Return:  true, if a link was displayed; false if there's no email address for the Item's author.


[ Top ]
msgform_link_assigned  [line 1693]

  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.


[ Top ]
page_links  [line 1719]

  void page_links( [ $before = '#'], [ $after = '#'], [ $separator = ' '], [ $single = ''], [ $current_page = '#'], [ $pagelink = '%d'], [ $url = '']  )

Parameters:
   $before: 
   $after: 
   $separator: 
   $single: 
   $current_page: 
   $pagelink: 
   $url: 


[ Top ]
priority  [line 2665]

  void priority( [string $before = ''], [string $after = '']  )

Template function: display priority of item

Parameters:
string   $before: 
string   $after: 


[ Top ]
priority_options  [line 2679]

  void priority_options( $field_value, $allow_none  )

Template function: display list of priority options

Parameters:
   $field_value: 
   $allow_none: 


[ Top ]
publish_link  [line 2601]

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

Parameters:
   $before: 
   $after: 
   $text: 
   $title: 
   $class: 
   $glue: 
   $save_context: 


[ Top ]
remove_renderer  [line 4104]

  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


[ Top ]
renderer_checkboxes  [line 2708]

  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.


[ Top ]
replace_callback  [line 3956]

  void replace_callback( $matches  )

Callback user for footer()

Parameters:
   $matches: 


[ Top ]
send_email_notifications  [line 3797]

  void send_email_notifications( [ $display = true]  )

Send email notifications to subscribed users

Parameters:
   $display: 

Information Tags:
Todo:  fp>> shall we notify suscribers of blog were this is in extra-cat? blueyed>> IMHO yes.

[ Top ]
send_outbound_pings  [line 3903]

  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)


[ Top ]
set  [line 3160]

  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

[ Top ]
set_creator_by_login  [line 322]

  void set_creator_by_login( string $login  )

Set creator user

Parameters:
string   $login:  login


[ Top ]
set_creator_User  [line 3223]

  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


[ Top ]
set_renderers  [line 3211]

  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


[ Top ]
set_tags_from_string  [line 1607]

  void set_tags_from_string( string $tags  )

Split tags by comma or semicolon

Parameters:
string   $tags:  The tags, separated by comma or semicolon


[ Top ]
split_pages  [line 1020]

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

Make sure, the pages have been obtained (and split up_ from prerendered cache.

Parameters:
string   $format:  Format, used to retrieve the matching cache; see format_to_output()


[ Top ]
status  [line 2823]

  void status( [string $params = array()]  )

Template function: display status of item

Statuses:

  • published
  • deprecated
  • protected
  • private
  • draft

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


[ Top ]
status_raw  [line 2870]

  void status_raw( )

Output raw status.



[ Top ]
tags  [line 2902]

  void tags( [array $params = array()], string 1  )

Display tags for Item

Parameters:
string   1:  Output format, see format_to_output()
array   $params:  of params


[ Top ]
trackback_rdf  [line 2950]

  void trackback_rdf( )

Template function: Displays trackback autodiscovery information

TODO: build into headers



[ Top ]
trackback_url  [line 2984]

  void trackback_url( )

Template function: displays url to use to trackback this item



[ Top ]
update_excerpt  [line 3486]

  boolean update_excerpt( [ $crop_length = 254], [ $suffix = '&hellip;']  )

Quick and dirty "excerpts should not stay empty".

Parameters:
   $crop_length: 
   $suffix: 

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.

[ Top ]
update_renderers_from_Plugins  [line 939]

  boolean update_renderers_from_Plugins( )

Trigger Plugin::ItemApplyAsRenderer() event and adjust renderers according to return value.


API Tags:
Return:  True if renderers got changed.


[ Top ]
url_link  [line 3026]

  void url_link( [ $params = array()]  )

Template function: Display link to item related url.

By default the link is displayed as a link. Optionally some smart stuff may happen.

Parameters:
   $params: 


[ Top ]
views  [line 3140]

  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:
Return:  Number of views.


[ Top ]
wordcount  [line 3092]

  void wordcount( )

Template function: Display the number of words in the post



[ Top ]

Documentation generated on Sat, 06 Mar 2010 04:15:09 +0100 by phpDocumentor 1.4.2. This site is hosted and maintained by Daniel HAHLER (Contact).