phpDocumentor items
[ class tree: items ] [ index: items ] [ all elements ]

Class: Item

Source Location: /qp_inc/items/model/_item.class.php

Class Item

Class Overview

Item Class

Located in /qp_inc/items/model/_item.class.php [line 48]

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::$extra_cat_IDs
ItemLight::$extra_cat_IDs_changed
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::$delete_cascades
DataObject::$delete_restrictions
DataObject::$ID

Inherited From ItemLight

ItemLight::ItemLight()
Constructor
ItemLight::categories()
T-Tag: 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_IDs()
Get the chapter (category) IDs for this item.
ItemLight::get_chapter_url()
Generate a link to the post in the category
ItemLight::get_excerpt()
Template function: get excerpt
ItemLight::get_issue_date()
T-Tag: returns formatted issue date or time (datetime) of Item
ItemLight::get_main_Chapter()
Get the main Chapter.
ItemLight::get_permanent_link()
T-Tag: Get the linked permanent url (permalink) for the item
ItemLight::get_permanent_url()
Generate the permalink for the item.
ItemLight::get_prefetch_itemlist_IDs()
Get a list of item IDs from $MainList and $ItemList, if they are loaded.
ItemLight::get_single_url()
Generate a single post link for the item
ItemLight::get_title()
Get "nice" title of the Item
ItemLight::issue_date()
T-Tag: Display issue date/time of an item
ItemLight::issue_time()
T-Tag: Display issue date/time of an item
ItemLight::is_featured()
T-Tag: Is this a 'featured' post?
ItemLight::is_intro()
T-Tag: 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()
T-Tag: Displays or returns an author's locale flag
ItemLight::locale_temp_switch()
T-Tag: Temporarily switch to this item'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()
T-Tag: Display the linked permanent url (permalink) for the item
ItemLight::permanent_url()
Template function: display permalink for item
ItemLight::set()
Set param value
ItemLight::set_extracats()
Set the extra categories for this item.
ItemLight::title()
T-Tag: Display title for item and link to related URL
ItemLight::type()
Template function: display type of item

Inherited From DataObject

DataObject::DataObject()
Constructor
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::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::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.

[ Top ]
Property Summary
User   $assigned_User   The assigned User to the item.
mixed   $assigned_user_ID  
User   $Author  
mixed   $comment_status  
mixed   $content  
mixed   $content_pages  
User   $creator_User   The User who has created the Item (lazy-filled).
mixed   $creator_user_ID  
mixed   $datedeadline  
mixed   $editor_code  
mixed   $featured  
mixed   $Links  
mixed   $locale  
mixed   $metadesc  
mixed   $metakeywords  
mixed   $notifications_ctsk_ID  
mixed   $notifications_status  
mixed   $order  
mixed   $parent_ID  
mixed   $priorities  
mixed   $priority  
mixed   $pst_ID  
mixed   $renderers  
mixed   $status  
mixed   $tags  
mixed   $tags_changed  
mixed   $titletag  
mixed   $wordcount  

[ Top ]
Method Summary
Item   Item()   Constructor
boolean   add_renderer()   Add a renderer (by code) to the Item.
void   anchor()   T-Tag: Display the item's ID as an anchor for permalinks to refer to.
void   anchor_id()   T-Tag: Display the item's ID as "item_NNN"
void   assigned_to()   Template function: display assignee of item
void   assign_to()  
void   assign_to_first_cat_for_collection()   Assign the item to the first category we find in the requested collection
void   author()   T-Tag: Display the author/creator of an item
boolean   can_comment()   Template function: Check if user can leave comment on this post or display error
boolean   can_rate()   Template function: Check if user can can rate this post
boolean   can_see_comments()   Check if user can see comments on this post, which he cannot if they are disabled for the Item or never allowed for the blog.
boolean   can_view()   Check whether an User can view this Item.
void   content_extension()   T-Tag: Display an item's content extension
void   content_teaser()   T-Tag: Display an item's teaser content
void   count_view()   T-Tag: Increment view counter (excluding author's views) of first post on page
boolean   dbdelete()   Trigger event AfterItemDelete after calling parent method.
boolean   dbinsert()   Insert object into DB based on previously recorded changes
boolean   dbupdate()   Update the DB based on previously recorded changes
void   deadline_date()   Template function: display deadline date (datetime) of Item
void   deadline_time()   Template function: display deadline time (datetime) of Item
void   delete_link()   T-Tag: Display a link to delete an item if current user has permission
void   delete_prerendered_content()   Unset any prerendered content for this item (in PHP cache).
void   deprecate_link()   T-Tag: Display a link to deprecate an item if current user has permission
void   div_classes()   T-Tag: Display classes for an item (<div> typically)
void   edit_link()   T-Tag: Display a link to edit an item if current user has permission
void   excerpt()   Display excerpt of item
void   extra_status()   Template function: display extra status of item
void   feedback_feed_link()   Template function: Displays link to the feed for comments on this item
void   feedback_link()   T-Tag: displays link to feedback page (under some conditions)
void   feedback_moderation()   Template function: Displays feeback moderation info
void   files()   Display the attachments/files linked to the current Item
void   footer()   T-Tag: Display the current item's footer text
mixed   get()   Get a member param by its name
string   get_anchor_id()   T-Tag: Return the item ID as "item_NNN"
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()   T-Tag: Get an item's content extension
void   get_content_page()   Get a specific page to display (from the prerendered cache)
string   get_content_teaser()   T-Tag: Get an item's teaser content
User   &get_creator_User()   Get the User who created the Item.
void   get_delete_link()   T-Tag: Return a link to delete an item if current user has permission
void   get_deprecate_link()   T-Tag: Return a link to deprecate an item if current user has permission
void   get_edit_link()   T-Tag: Return a link to edit an item if current user has permission
void   get_feedback_feed_url()   Return the 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()   T-Tag: Get the images linked to an 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()   T-Tag: Get an item's "more" link if in use
string   get_prerendered_content()   Get the prerendered content. If it has not been generated yet, it will.
void   get_publish_link()   T-Tag: Get a link to 'publish NOW' a post if current user has permission
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
void   images()   T-Tag: Display the images linked to an item
boolean   inc_viewcount()   Increment the view count of the item directly in DB (if the item's Author is not $current_User).
void   insert()   Create a new Item/Post and insert it into the DB
void   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()   T-Tag: Display an item's "more" link if in use
void   msgform_link()   T-Tag: Display a link to the message form for this item's author.
boolean   msgform_link_assigned()   Template function: Provide link to message form for this Item's assigned User.
void   page_links()   T-Tag: Display a link to pages for multi-page items
void   priority()   Template function: display priority of item
void   priority_options()   Template function: display list of priority options
void   publish_link()   T-Tag: Display a link to 'publish NOW' an item if current user has permission
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
boolean   set_creator_User()   Set the Author of the Item.
boolean   set_renderers()   Set the renderers of the Item.
boolean   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()   T-Tag: Output raw status
void   tags()   T-Tag: Display an item's tags
void   trackback_rdf()   Template function: Displays trackback autodiscovery information
void   trackback_url()   Template function: displays url to use to trackback this item
boolean   update_excerpt()   Quick and dirty "excerpts should not stay empty".
boolean   update_renderers_from_Plugins()   Trigger Plugin::ItemApplyAsRenderer() event and adjust renderers according to return value.
void   url_link()   T-Tag: Display link to item related url.
void   views()   T-Tag: Display a phrase about the number of Item views.
void   wordcount()   T-Tag: Display the number of words in the post

[ Top ]
Properties
User   $assigned_User [line 63]

The assigned User to the item.

Can be NULL

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


[ Top ]
mixed   $assigned_user_ID [line 75]

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


[ Top ]
mixed   $comment_status [line 85]

[ Top ]
mixed   $content [line 78]

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

[ Top ]
User   $creator_User [line 71]

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

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


[ Top ]
mixed   $creator_user_ID [line 73]

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

[ Top ]
mixed   $editor_code = NULL [line 91]

[ Top ]
mixed   $featured [line 90]

[ Top ]
mixed   $Links = NULL [line 96]

[ Top ]
mixed   $locale [line 77]

[ Top ]
mixed   $metadesc [line 80]

[ Top ]
mixed   $metakeywords [line 81]

[ Top ]
mixed   $notifications_ctsk_ID [line 93]

[ Top ]
mixed   $notifications_status [line 92]

[ Top ]
mixed   $order [line 89]

[ Top ]
mixed   $parent_ID [line 74]

[ Top ]
mixed   $priorities [line 97]

[ Top ]
mixed   $priority [line 88]

[ Top ]
mixed   $pst_ID [line 86]

[ Top ]
mixed   $renderers [line 84]

[ Top ]
mixed   $status [line 76]

[ Top ]
mixed   $tags = NULL [line 94]

[ Top ]
mixed   $tags_changed = false [line 95]

[ Top ]
mixed   $titletag [line 79]

[ Top ]
mixed   $wordcount [line 83]

[ Top ]
Methods
Constructor Item  [line 112]

  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 257]

  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 277]

  void anchor( )

T-Tag: Display the item's ID as an anchor for permalinks to refer to.


API Tags:
Uses:  Item::get_anchor_id()


[ Top ]
anchor_id  [line 290]

  void anchor_id( )

T-Tag: Display the item's ID as "item_NNN"


API Tags:
Uses:  Item::get_anchor_id()


[ Top ]
assigned_to  [line 362]

  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 300]

  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 338]

  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 388]

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

T-Tag: Display the author/creator of an item

  1.  $params array_mergearray(
  2.    'before'      => '',
  3.    'after'       => ' ',
  4.    'format'      => 'htmlbody',
  5.    'link_to'     => 'userpage'// or 'userurl'
  6.    'link_text'   => 'preferredname',
  7.    'link_rel'    => '',
  8.    'link_class'  => '',
  9.  )$params );

Parameters:
   $params: 


[ Top ]
can_comment  [line 449]

  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 535]

  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_see_comments  [line 593]

  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 ]
can_view  [line 554]

  boolean can_view( [object|NULL $User = NULL]  )

Check whether an User can view this Item.

Parameters:
object|NULL   $User:  The User (NULL for current user).

API Tags:
Return:  True if permission granted, false otherwise.
Access:  public


[ Top ]
content_extension  [line 623]

  void content_extension( $params  )

T-Tag: Display an item's content extension

Displays the part after "<!--more-->" or "<!--noteaser-->

  1.  $params array_mergearray(
  2.    'before'     => '',
  3.    'after'      => '',
  4.    'disppage'   => '#'// '#' = (global) $page
  5.    'format'     => 'htmlbody',
  6.    'force_more' => false,
  7.  )$params );

Parameters:
   $params: 

API Tags:
Uses:  Item::get_content_extension()


[ Top ]
content_teaser  [line 662]

  void content_teaser( $params  )

T-Tag: Display an item's teaser content

Will stop at "<!--more-->" or "<!--noteaser-->"

  1.  $params array_mergearray(
  2.    'before'      => '',
  3.    'after'       => '',
  4.    'disppage'    => '#'// '#' = (global) $page
  5.    'stripteaser' => '#'// '#' = remove the "teaser" part of multi-part items
  6.    'format'      => 'htmlbody',
  7.  )$params );

Parameters:
   $params: 

API Tags:
Uses:  Item::get_content_teaser()


[ Top ]
count_view  [line 696]

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

T-Tag: Increment view counter (excluding author's views) of first post on page

  1.  $params array_mergearray(
  2.    'allow_multiple_counts_per_page' => false,
  3.  )$params );

Parameters:
   $params: 

API Tags:
Uses:  Item::inc_viewcount()

Information Tags:
Todo:  (legacy): merge with inc_viewcount

[ Top ]
dbdelete  [line 742]

  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 778]

  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 829]

  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 895]

  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 910]

  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 924]

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

T-Tag: Display a link to delete an item if current user has permission

Parameters:
   $params: 

API Tags:
Uses:  Item::get_delete_link()


[ Top ]
delete_prerendered_content  [line 933]

  void delete_prerendered_content( )

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



[ Top ]
deprecate_link  [line 957]

  void deprecate_link( $params  )

T-Tag: Display a link to deprecate an item if current user has permission

Parameters:
   $params: 

API Tags:
Uses:  Item::get_deprecate_link()


[ Top ]
div_classes  [line 976]

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

T-Tag: Display classes for an item (<div> typically)

  1.  $params array_mergearray(
  2.    'item_class' => 'bPost',
  3.    'item_type_class' => 'bPost_ptyp',
  4.    'item_status_class' => 'bPost',
  5.  )$params );

Parameters:
   $params: 

Information Tags:
Todo:  EdB: we should make a div_id_class_lang() function that does it all :)

[ Top ]
edit_link  [line 996]

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

T-Tag: Display a link to edit an item if current user has permission

Parameters:
   $params: 

API Tags:
Uses:  Item::get_edit_link()


[ Top ]
excerpt  [line 1005]

  void excerpt( $params  )

Display excerpt of item

Parameters:
   $params: 


[ Top ]
extra_status  [line 1050]

  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 1329]

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

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

Parameters:
string   $template:  Type of feedback to link to (rss2/atom)
string   $before:  String to display before the link (if comments are to be displayed)
string   $after:  String to display after the link (if comments are to be displayed)
string   $title:  Link title


[ Top ]
feedback_link  [line 1203]

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

T-Tag: displays link to feedback page (under some conditions)

  1.  $params array_mergearray(
  2.    'type'             => 'feedbacks'// can be 'feedbacks' or 'comments' or 'trackbacks'
  3.    'status'           => 'published',
  4.    'link_before'      => '',
  5.    'link_after'       => '',
  6.    'link_title'       => '#'// depends on value of 'type' - read the code for details
  7.    'link_text_zero'   => '#'// same as above
  8.    'link_text_one'    => '#'// same as above
  9.    'link_text_more'   => '#'// same as above
  10.    'link_anchor_zero' => '#'// same as above
  11.    'link_anchor_one'  => '#'// same as above
  12.    'link_anchor_more' => '#'// same as above
  13.    'use_popup'        => false,
  14.    'url'              => '#'// '#' = $this->get_feedback_url(), will link to single post
  15.  )$params );

Parameters:
   $params: 


[ Top ]
feedback_moderation  [line 1132]

  void feedback_moderation( [string $type = 'feedbacks'], [string $before = ''], [string $after = ''], [string $zero = ''], [string $one = '#'], [string $more = '#'], [string $edit_comments_link = '#'], [boolean $params = array()]  )

Template function: Displays feeback moderation info

Parameters:
string   $type:  Type of feedback to link to (feedbacks (all)/comments/trackbacks)
string   $before:  String to display before the link (if comments are to be displayed)
string   $after:  String to display after the link (if comments are to be displayed)
string   $zero:  Link text to display when there are 0 comments
string   $one:  Link text to display when there is 1 comment
string   $more:  Link text to display when there are >1 comments (include %d for # of comments)
string   $edit_comments_link:  Link
boolean   $params:  true to hide if no feedback


[ Top ]
files  [line 1355]

  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 1075]

  void footer( $params  )

T-Tag: Display the current item's footer text

  1.  $params array_mergearray(
  2.    'mode'        => '#'// will detect 'single' from $disp automatically
  3.    'block_start' => '<div class="item_footer">',
  4.    'block_end'   => '</div>',
  5.    'format'      => 'htmlbody',
  6.  )$params );

Parameters:
   $params: 


[ Top ]
get  [line 1367]

  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 1426]

  string get_anchor_id( )

T-Tag: Return the item ID as "item_NNN"


API Tags:
Usedby:  Item::anchor_id()
Usedby:  Item::anchor()


[ Top ]
get_assigned_User  [line 1437]

  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 1455]

  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 1474]

  DataObjectList2 get_attachment_FileList( [ $limit = 1000]  )

Get list of attached files

INNER JOIN on files ensures we only get back file links

Parameters:
   $limit: 

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 1502]

  void get_content_excerpt( [ $crop_at = 200]  )

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

Parameters:
   $crop_at: 

Information Tags:
Todo:  fp> allow user to submit his own excerpt in expert editing mode

[ Top ]
get_content_extension  [line 1533]

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

T-Tag: Get an item's content extension

Extension is any part after a <!--more--> or <!--noteaser-->

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

API Tags:
Usedby:  Item::content_extension()


[ Top ]
get_content_page  [line 1589]

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

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

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


[ Top ]
get_content_teaser  [line 1618]

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

T-Tag: Get an item's teaser content

Stops at <!--more--> or <!--noteaser-->

Parameters:
mixed   $disppage:  page number to display specific page, # for url parameter
boolean   $stripteaser:  # if you don't want to repeat teaser after more link was pressed and <--noteaser--> has been found
string   $format:  filename to use to display more

API Tags:
Usedby:  Item::content_teaser()


[ Top ]
get_creator_User  [line 181]

  User &get_creator_User( )

Get the User who created the Item.



[ Top ]
get_delete_link  [line 1686]

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

T-Tag: Return a link to delete an item if current user has permission

  1.  $params array_mergearray(
  2.    'before'     => ' ',
  3.    'after'      => ' ',
  4.    'text'       => '#',
  5.    'title'      => T_('Delete this post'),
  6.    'class'      => '',
  7.    'button'     => false,
  8.    'action_url' => '#',
  9.  )$params );

Parameters:
   $params: 

API Tags:
Usedby:  Item::delete_link()


[ Top ]
get_deprecate_link  [line 1766]

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

T-Tag: Return a link to deprecate an item if current user has permission

  1.  $params array_mergearray(
  2.    'before' => ' ',
  3.    'after'  => ' ',
  4.    'text'   => get_icon'deprecate''imgtag' ).' '.T_('Deprecate!'),
  5.    'title'  => T_('Deprecate this post!'),
  6.    'class'  => '',
  7.    'glue'   => '&amp;',
  8.  )$params );

Parameters:
   $params: 

API Tags:
Usedby:  Item::deprecate_link()


[ Top ]
get_edit_link  [line 1812]

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

T-Tag: Return a link to edit an item if current user has permission

  1.  $params array_mergearray(
  2.    'before'       => ' ',
  3.    'after'        => ' ',
  4.    'text'         => get_icon'edit' ).' '.T_('Edit...'),
  5.    'title'        => T_('Edit this post...'),
  6.    'class'        => '',
  7.    'save_context' => true,
  8.  )$params );

Parameters:
   $params: 

API Tags:
Usedby:  Item::edit_link()


[ Top ]
get_feedback_feed_url  [line 1860]

  void get_feedback_feed_url( string $template_folder_name  )

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

Parameters:
string   $template_folder_name: 


[ Top ]
get_feedback_title  [line 1877]

  void get_feedback_title( [string $type = 'feedbacks'], [string $zero = '#'], [string $one = '#'], [string $more = '#'], [string $status = 'published']  )

Get text depending on number of comments

Parameters:
string   $type:  Type of feedback to link to (feedbacks (all)/comments/trackbacks)
string   $zero:  Link text to display when there are 0 comments
string   $one:  Link text to display when there is 1 comment
string   $more:  Link text to display when there are >1 comments (include %d for # of comments)
string   $status:  Status of feedbacks to count


[ Top ]
get_feedback_url  [line 1925]

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

Get URL to display the post comments.

Parameters:
   $popup: 
   $glue: 


[ Top ]
get_files  [line 1944]

  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 2020]

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

T-Tag: Get the images linked to an item

  1.  $params array_mergearray(
  2.    'before'              => '<div>',
  3.    'after'               => '</div>',
  4.    'before_image'        => '<div class="image_block">',
  5.    'after_image'         => '</div>',
  6.    'before_image_legend' => '<div class="image_legend">',
  7.    'after_image_legend'  => '</div>',
  8.    'image_size'          => 'fit-400',
  9.    'image_link_to'       => 'original'// 'or single' or 'fit-NNN'
  10.    'limit'               => 1000,
  11.  )$params );

Parameters:
   $params: 
   $format: 

API Tags:
Usedby:  Item::images()


[ Top ]
get_Links  [line 197]

  void &get_Links( )

Get reference to array of Links



[ Top ]
get_metadesc  [line 2118]

  void get_metadesc( )

Get the meta description tag



[ Top ]
get_metakeywords  [line 2127]

  void get_metakeywords( )

Get the meta keyword tag



[ Top ]
get_more_link  [line 2148]

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

T-Tag: Get an item's "more" link if in use

  1.  $params array_mergearray(
  2.    'force_more'  => false,
  3.    'before'      => '<p class="bMore">',
  4.    'after'       => '</p>',
  5.    'link_text'   => T_('Read more').' &raquo;',
  6.    'anchor_text' => '<p class="bMore">'.T_('Follow up:').'</p>',
  7.    'disppage'    => '#'// page number to display specific page, # for url parameter
  8.    'format'      => 'htmlbody',
  9.  )$params );

Parameters:
   $params: 

API Tags:
Usedby:  Item::more_link()


[ Top ]
get_prerendered_content  [line 2210]

  string get_prerendered_content( string $format  )

Get the prerendered content. If it has not been generated yet, it will.

NOTE: This calls Item::dbupdate(), if renderers get changed (from Plugin hook).

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


[ Top ]
get_publish_link  [line 2340]

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

T-Tag: Get a link to 'publish NOW' a post if current user has permission

Note: publishing date will be updated

  1.  $params array_mergearray(
  2.  'before'       => ' ',
  3.  'after'        => ' ',
  4.  'text'         => get_icon'publish''imgtag' ).' '.T_('Publish NOW!'),
  5.  'title'        => T_('Publish now using current date and time.'),
  6.  'class'        => '',
  7.  'glue'         => '&amp;',
  8.  'save_context' => true,
  9.  )$params );

Parameters:
   $params: 

API Tags:
Usedby:  Item::publish_link()


[ Top ]
get_renderers  [line 2386]

  array get_renderers( )

Get the list of renderers for this Item.



[ Top ]
get_renderers_validated  [line 2396]

  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 213]

  array &get_tags( )

Get array of tags.

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



[ Top ]
get_titletag  [line 2412]

  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 2427]

  string get_trackback_url( )

Template function: get url to use to trackback this item



[ Top ]
get_views  [line 2453]

  string get_views( [string $zero = '#'], [string $one = '#'], [string $more = '#']  )

Template function: Display the number of times the Item has been viewed

Note: viewcount is incremented whenever the Item's content is displayed with "MORE" (i-e full content), see Item::content().

Viewcount is NOT incremented on page reloads and other special cases, see Hit::is_new_view()

%d gets replaced in all params by the number of views.

Parameters:
string   $zero:  Link text to display when there are 0 views
string   $one:  Link text to display when there is 1 views
string   $more:  Link text to display when there are >1 views

API Tags:
Return:  The phrase about the number of views.
Usedby:  Item::views()


[ Top ]
handle_post_processing  [line 2479]

  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 ]
images  [line 2585]

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

T-Tag: Display the images linked to an item

Parameters:
   $params: 
   $format: 

API Tags:
Uses:  Item::get_images()


[ Top ]
inc_viewcount  [line 2602]

  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?
Usedby:  Item::count_view()


[ Top ]
insert  [line 2632]

  void insert( $author_user_ID, $post_title, $post_content, $post_timestamp, [ $main_cat_ID = 1], [ $extra_cat_IDs = array()], [ $post_status = 'published'], [ $post_locale = '#'], [ $post_urltitle = ''], [ $post_url = ''], [ $post_comment_status = 'open'], [ $post_renderers = array('default')], [ $item_typ_ID = 1], [ $item_st_ID = NULL]  )

Create a new Item/Post and insert it into the DB

This function has to handle all needed DB dependencies!

Parameters:
   $author_user_ID: 
   $post_title: 
   $post_content: 
   $post_timestamp: 
   $main_cat_ID: 
   $extra_cat_IDs: 
   $post_status: 
   $post_locale: 
   $post_urltitle: 
   $post_url: 
   $post_comment_status: 
   $post_renderers: 
   $item_typ_ID: 
   $item_st_ID: 

API Tags:
Deprecated:  since EVO_NEXT_VERSION. Use set() + dbinsert() instead

Information Tags:
Todo:  EdB: this is used by qp_install/_functions_create.php in v0.0.0 (EdB)

[ Top ]
insert_update_extracats  [line 2688]

  void insert_update_extracats( string $mode  )

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


[ Top ]
insert_update_tags  [line 2732]

  void insert_update_tags( string $mode  )

Save tags to DB

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


[ Top ]
linkcount  [line 2798]

  void linkcount( )

Template function: display number of links attached to this Item



[ Top ]
load_from_Request  [line 2815]

  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 2973]

  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 2988]

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

T-Tag: Display an item's "more" link if in use

Parameters:
   $params: 

API Tags:
Uses:  Item::get_more_link()


[ Top ]
msgform_link  [line 3011]

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

T-Tag: Display a link to the message form for this item's author.

  1.  $params array_mergearray(
  2.    'before'   => ' ',
  3.    'after'    => ' ',
  4.    'text'     => '#'// get_icon( 'email', 'imgtag', array( 'class' => 'middle', 'title' => $params['title'] ) )
  5.    'title'    => T_('Send email to post author'),
  6.    'class'    => '',
  7.    'format'   => 'htmlbody',
  8.    'form_url' => '#current_blog#'// $Blog->get('msgformurl')
  9.  )$params );

Parameters:
   $params: 

API Tags:
Uses:  User::get_msgform_url()


[ Top ]
msgform_link_assigned  [line 3064]

  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 3102]

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

T-Tag: Display a link to pages for multi-page items

  1.  $params array_mergearray(
  2.    'before'       => '<p>'.T_('Pages:').' ',
  3.    'after'        => '</p>',
  4.    'separator'    => ' ',
  5.    'single'       => '',
  6.    'current_page' => '#'// global $page
  7.    'pagelink'     => '%d',
  8.    'url'          => '',
  9.  )$params );

Parameters:
   $params: 


[ Top ]
priority  [line 3171]

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

Template function: display priority of item

Parameters:
string   $before: 
string   $after: 


[ Top ]
priority_options  [line 3185]

  void priority_options( $field_value, $allow_none  )

Template function: display list of priority options

Parameters:
   $field_value: 
   $allow_none: 


[ Top ]
publish_link  [line 3214]

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

T-Tag: Display a link to 'publish NOW' an item if current user has permission

Parameters:
   $params: 

API Tags:
Uses:  Item::get_publish_link()


[ Top ]
remove_renderer  [line 3225]

  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 3249]

  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 3351]

  void replace_callback( $matches  )

Callback user for footer()

Parameters:
   $matches: 


[ Top ]
send_email_notifications  [line 3372]

  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 3496]

  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 3557]

  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_User  [line 3595]

  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 3609]

  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 3624]

  boolean set_tags_from_string( string $tags  )

Split tags by comma or semicolon

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

API Tags:
Return:  True if the tags have been changed, false otherwise.

Information Tags:
Todo:  Tblue> Check whether a change should invalidate the ItemTagsCache for this Item.

[ Top ]
split_pages  [line 3672]

  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 3696]

  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 3725]

  void status_raw( )

T-Tag: Output raw status



[ Top ]
tags  [line 3743]

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

T-Tag: Display an item's tags

  1.  $params array_mergearray(
  2.    'before'    => '<div>'.T_('Tags').': ',
  3.    'after'     => '</div>',
  4.    'separator' => ', ',
  5.    'links'     => true,
  6.  )$params );

Parameters:
   $params: 


[ Top ]
trackback_rdf  [line 3791]

  void trackback_rdf( )

Template function: Displays trackback autodiscovery information

TODO: build into headers



[ Top ]
trackback_url  [line 3825]

  void trackback_url( )

Template function: displays url to use to trackback this item



[ Top ]
update_excerpt  [line 3839]

  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 3867]

  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 3920]

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

T-Tag: Display link to item related url.

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

  1.  $params array_mergearray(
  2.    'before'           => ' ',
  3.    'after'            => ' ',
  4.    'text_template'    => '$url$',
  5.    'url_template'     => '$url$',
  6.    'target'           => '',
  7.    'format'           => 'htmlbody',
  8.    'podcast'          => '#',
  9.    'before_podplayer' => '<div class="podplayer">',
  10.    'after_podplayer'  => '</div>',
  11.  )$params );

'text_template' => '$url$': If evaluates to empty, nothing will be displayed (except player if podcast)
'podcast' => '#': handle as podcast (depending on post type), false to disable

Parameters:
   $params: 


[ Top ]
views  [line 3999]

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

T-Tag: Display a phrase about the number of Item views.

  1.  $params array_mergearray(
  2.    'before'     => '',
  3.    'after'      => '',
  4.    'zero_views' => '#',
  5.    'one_view'   => '#',
  6.    'more_views' => '#',
  7.  )$params );

Parameters:
   $params: 

API Tags:
Uses:  Item::get_views()


[ Top ]
wordcount  [line 4026]

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

T-Tag: Display the number of words in the post

  1.  $params array_mergearray(
  2.    'before' => '',
  3.    'after'  => '',
  4.  )$params );

Parameters:
   $params: 


[ Top ]