b2evolution

Multilingual multiuser multiblog engine

b2evolution Technical Documentation (Version 1.10) [ class tree: evocore ] [ index: evocore ] [ all elements ]

Class: ItemList

Source Location: /blogs/inc/MODEL/items/_itemlist.class.php

Class ItemList

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

Inherited From DataObjectList

DataObjectList::$dbIDname
DataObjectList::$dbprefix
DataObjectList::$dbtablename
DataObjectList::$Obj
DataObjectList::$objType

Inherited From Results

Results::$Cache
Results::$cols
Results::$col_headers
Results::$current_group_ID
Results::$current_idx
Results::$current_Obj
Results::$DB
Results::$filter_area
Results::$functions_area
Results::$global_idx
Results::$global_is_first
Results::$global_is_last
Results::$group_by
Results::$grp_cols
Results::$ID_col
Results::$limit
Results::$nb_cols
Results::$order_callbacks
Results::$order_field_list
Results::$order_param
Results::$page
Results::$page_ID_array
Results::$page_ID_list
Results::$page_param
Results::$params
Results::$param_prefix
Results::$result_num_rows
Results::$rows
Results::$sql
Results::$total_pages
Results::$total_rows

Inherited From Widget

Widget::$global_icons
Widget::$title

Inherited From DataObjectList

DataObjectList::DataObjectList()
Constructor
DataObjectList::get_next()
Get next object in list

Inherited From Results

Results::Results()
Constructor
Results::count_total_rows()
Count the total number of rows of the SQL result (all pages)
Results::display()
Display paged list/table based on object parameters
Results::display_body()
Display list/table body.
Results::display_colselect()
Display the column selection
Results::display_filters()
Display the filtering form
Results::display_first()
returns the link to the first page, if necessary
Results::display_functions()
Display the functions
Results::display_head()
Display list/table head.
Results::display_if_empty()
Template function: display message if list is empty
Results::display_init()
Initialize things in order to be ready for displaying.
Results::display_last()
returns the link to the last page, if necessary
Results::display_list_end()
Display list/table end.
Results::display_list_start()
Display list/table start.
Results::display_nav()
Display navigation text, based on template.
Results::display_next()
returns a link to next pages, if necessary
Results::display_option_area()
Display options area
Results::display_prev()
returns a link to previous pages, if necessary
Results::display_totals()
Display totals line if set.
Results::first()
Returns the first page number to be displayed in the list
Results::get_col_sort_values()
Returns values needed to make sort links for a given column
Results::get_num_rows()
Get number of rows available for display
Results::get_order_field_list()
Returns order field list add to SQL query:
Results::get_page_ID_array()
Get an array of IDs for current page
Results::get_page_ID_list()
Get a list of IDs for current page
Results::instantiate_page_to_Cache()
Note: this function might actually not be very useful.
Results::last()
returns the last page number to be displayed in the list
Results::move_icons()
Results::next_idx()
Increment and update all necessary counters before processing a new line in result set
Results::order_callback_wrapper_objects()
Wrapper method to http://www.php.net/usort, which instantiates objects and passed them on to the order callback.
Results::order_callback_wrapper_rows()
Wrapper method to http://www.php.net/usort, which passes the rows to the order callback.
Results::page_list()
Returns the page link list under the table
Results::page_scroll_list()
Results::parse_col_content()
Handle variable subtitutions for column contents.
Results::query()
Run the query now!
Results::replace_callback()
Widget callback for template vars.
Results::restart()
Rewind resultset

Inherited From Widget

Widget::gen_global_icons()
Generate img tags for registered icons, through global_icon().
Widget::global_icon()
Registers a global action icon
Widget::replace_callback()
Callback function used to replace only necessary values in template.
Widget::replace_callback_wrapper()
This is an additional wrapper to replace_vars() that allows to react on the return value of it.
Widget::replace_vars()
Replaces $vars$ with appropriate values.

[ Top ]
Property Summary
integer   $blog   Blog ID to restrict to. 1 means "all blogs".
mixed   $cat  
mixed   $catsel  
mixed   $cat_array  
mixed   $cat_modifier  
mixed   $DataObjectCache  
mixed   $dbcols  
mixed   $group_by_cat  
mixed   $limitdate_end  
mixed   $limitdate_start  
mixed   $main_cat  
string|integer   $p   Specific post number to display. '' means don't restrict to single post.
mixed   $postIDarray  
mixed   $postIDlist   List of IDs in current page
mixed   $preview  
mixed   $previous_main_cat  
mixed   $row  
mixed   $row_num  
mixed   $show_statuses  
mixed   $timestamp_max  
mixed   $timestamp_min  
mixed   $unit   'posts' or 'days'

[ Top ]
Method Summary
ItemList   ItemList()   Constructor
void   calc_max()  
void   date_if_changed()   Template function: Display the date if it has changed since last call
true   display_if_empty()   Template function: display message if list is empty
void   get_category_group()  
void   &get_item()  
void   get_lastpostdate()  
void   get_max_paged()  
void   get_postdata()   Init postdata
void   get_total_num_posts()   return total number of posts
void   mod_date()   Template function: display last mod date (datetime) of Item
string   preview_request()   Dummy mysql query for the preview
void   restart()  

[ Top ]
Properties
integer   $blog [line 62]

Blog ID to restrict to. 1 means "all blogs".


[ Top ]
mixed   $cat [line 103]

[ Top ]
mixed   $catsel [line 104]

[ Top ]
mixed   $cat_array [line 105]

[ Top ]
mixed   $cat_modifier [line 106]

[ Top ]
mixed   $DataObjectCache [line 112]

[ Top ]
mixed   $dbcols [line 110]

[ Top ]
mixed   $group_by_cat [line 82]

[ Top ]
mixed   $limitdate_end [line 85]

[ Top ]
mixed   $limitdate_start [line 84]

[ Top ]
mixed   $main_cat [line 90]

[ Top ]
string|integer   $p [line 69]

Specific post number to display. '' means don't restrict to single post.

Information Tags:
Todo:  Might support list of IDs (array).

[ Top ]
mixed   $postIDarray [line 80]

[ Top ]
mixed   $postIDlist [line 79]

List of IDs in current page


[ Top ]
mixed   $preview [line 56]

[ Top ]
mixed   $previous_main_cat [line 91]

[ Top ]
mixed   $row [line 89]

[ Top ]
mixed   $row_num [line 88]

[ Top ]
mixed   $show_statuses [line 102]

[ Top ]
mixed   $timestamp_max [line 108]

[ Top ]
mixed   $timestamp_min [line 107]

[ Top ]
mixed   $unit [line 74]

'posts' or 'days'


[ Top ]
Methods
Constructor ItemList  [line 147]

  ItemList ItemList( [integer $blog = 1], [array $show_statuses = array()], [mixed $p = ''], [mixed $m = ''], [mixed $w = -1], [mixed $cat = ''], [array $catsel = array()], [mixed $author = ''], [string $order = ''], [string $orderby = ''], [mixed $posts_per_page = ''], [mixed $page_number = ''], [mixed $poststart = ''], [mixed $postend = ''], [string $keywords = ''], [mixed $phrase = ''], [mixed $exact = ''], [boolean $preview = 0], [string $unit = ''], [mixed $timestamp_min = ''], [mixed $timestamp_max = 'now'], [string $title = ''], [string $dstart = ''], [string $cache_name = '#'], [array $params = array()]  )

Constructor

Parameters:
integer   $blog:  Blog ID to query
array   $show_statuses:  Restrict to these statuses
mixed   $p:  Specific post number to display
mixed   $m:  YearMonth(Day) to display
mixed   $w:  Number of Week to display. Note: uses MySQL's week numbering and MySQL default if applicable. In MySQL < 4.0, WEEK() uses mode 0: Week starts on Sunday; Value range is 0 to 53; week 1 is the first week that starts in this year
mixed   $cat:  List of cats to restrict to
array   $catsel:  Array of cats to restrict to
mixed   $author:  List of authors to restrict to
string   $order:  sort order can be either ASC or DESC
string   $orderby:  space separated list of fields to order by. Possible list elements are: author issue_date mod_date status locale content title urltitle url category wordcount comments
mixed   $posts_per_page:  # of posts to display on the page
mixed   $page_number:  List page number in paged display
mixed   $poststart:  Start results at this position
mixed   $postend:  End results at this position
string   $keywords:  Search string
mixed   $phrase:  Search for entire phrase or for individual words
mixed   $exact:  Require exact match of title or contents
boolean   $preview:  Is this preview
string   $unit:  'posts' or 'days'
mixed   $timestamp_min:  Do not show posts before this timestamp, can be 'now'
mixed   $timestamp_max:  Do not show posts after this timestamp, can be 'now'
string   $title:  urltitle of post to display
string   $dstart:  YearMonth(Day) to start at, '' for first available
string   $cache_name:  name of cache to be used
array   $params:  List of other params


[ Top ]
calc_max  [line 694]

  void calc_max( )



[ Top ]
date_if_changed  [line 842]

  void date_if_changed( [string $before = '<h2>'], [string $after = '</h2>'], [string $format = '']  )

Template function: Display the date if it has changed since last call

Parameters:
string   $before:  string to display before the date (if changed)
string   $after:  string to display after the date (if changed)
string   $format:  date/time format: leave empty to use locale default time format


[ Top ]
display_if_empty  [line 870]

  true display_if_empty( [string $message = '']  )

Template function: display message if list is empty

Parameters:
string   $message:  String to display if list is empty

API Tags:
Return:  if empty


Redefinition of:
Results::display_if_empty()
Template function: display message if list is empty

[ Top ]
get_category_group  [line 715]

  void get_category_group( )



[ Top ]
get_item  [line 748]

  void &get_item( )



[ Top ]
get_lastpostdate  [line 597]

  void get_lastpostdate( )



[ Top ]
get_max_paged  [line 641]

  void get_max_paged( )



[ Top ]
get_postdata  [line 782]

  void get_postdata( )

Init postdata


Information Tags:
Todo:  we might want to move object instanciation upward rigth after the request is executed

[ Top ]
get_total_num_posts  [line 679]

  void get_total_num_posts( )

return total number of posts



[ Top ]
mod_date  [line 658]

  void mod_date( [string $format = ''], [boolean $useGM = false]  )

Template function: display last mod date (datetime) of Item

Parameters:
string   $format:  date/time format: leave empty to use locale default date format
boolean   $useGM:  true if you want GMT


[ Top ]
preview_request  [line 475]

  string preview_request( )

Dummy mysql query for the preview


API Tags:
Return:  SQL query


[ Top ]
restart  [line 625]

  void restart( )



Redefinition of:
Results::restart()
Rewind resultset

[ Top ]

Documentation generated on Tue, 20 May 2008 01:42:02 +0200 by phpDocumentor 1.4.2