Source for file _itemlistlight.class.php
Documentation is available at _itemlistlight.class.php
* This file implements the ItemListLight class.
* This object handles item/post/article lists WITHOUT FULL FUNCTIONNALITY
* but with a LOWER MEMORY FOOTPRINT.
* This file is part of the evoCore framework - {@link http://evocore.net/}
* See also {@link http://sourceforge.net/projects/evocms/}.
* @copyright (c)2003-2008 by Francois PLANQUE - {@link http://fplanque.net/}
* {@internal License choice
* - If you have received this file as part of a package, please find the license.txt file in
* the same folder or the closest folder above for complete license terms.
* - If you have received this file individually (e-g: from http://evocms.cvs.sourceforge.net/)
* then you must choose one of the following licenses before using the file:
* - GNU General Public License 2 (GPL) - http://www.opensource.org/licenses/gpl-license.php
* - Mozilla Public License 1.1 (MPL) - http://www.opensource.org/licenses/mozilla1.1.php
* {@internal Open Source relicensing agreement:
* {@internal Below is a list of authors who have contributed to design/coding of this file: }}
* @author fplanque: Francois PLANQUE.
* @version $Id: _itemlistlight.class.php,v 1.19.2.1 2009/03/16 11:33:12 tblue246 Exp $
if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
load_class('_core/model/dataobjects/_dataobjectcache.class.php');
load_class('_core/model/dataobjects/_dataobjectlist2.class.php');
* Contrary to ItemList2, we only do 1 query here and we extract only a few selected params.
* Basically all we want is being able to generate permalinks.
* SQL object for the Query
* Blog object this ItemList refers to
* list unit: 'posts' or 'days'
* Did we request a single post?
* Last date that has been output by date_if_changed()
var $advertised_start_date;
* @todo add param for saved session filter set
* @param mixed Default filter set: Do not show posts before this timestamp, can be 'now'
* @param mixed Default filter set: Do not show posts after this timestamp, can be 'now'
* @param integer|NULLLimit
* @param string name of cache to be used (for table prefix info)
* @param string prefix to differentiate page/order params when multiple Results appear one same page
* @param array restrictions for itemlist (position, contact, firm, ...) key: restriction name, value: ID of the restriction
$timestamp_min =
NULL, // Do not show posts before this timestamp
$timestamp_max =
NULL, // Do not show posts after this timestamp
$cache_name =
'ItemCacheLight', // name of cache to be used (for table prefix info)
$filterset_name =
'', // Name to be used when saving the filterset (leave empty to use default for collection)
$restrict_to =
array() // Restrict the item list to a position, or contact, firm..... /* not used yet(?) */
// Call parent constructor:
if( !empty( $filterset_name ) )
{ // Set the filterset_name with the filterset_name param
$this->filterset_name =
'ItemList_filters_'.
$filterset_name;
{ // Set a generic filterset_name
$this->filterset_name =
'ItemList_filters_coll'.
$this->Blog->ID;
$this->restrict_to =
$restrict_to;
// Initialize the default filter set:
'ts_min' =>
$timestamp_min,
'ts_max' =>
$timestamp_max,
'ts_created_max' =>
NULL,
'cat_focus' =>
'wide', // Search in extra categories, not just main cat
'author_assignee' =>
NULL,
'lc' =>
'all', // Filter on requested locale
'types' =>
'-1000', // All types except pages
'visibility_array' =>
array( 'published', 'protected', 'private' ),
'orderby' =>
$this->Blog->get_setting('orderby'),
'order' =>
$this->Blog->get_setting('orderdir'),
'unit' =>
$this->Blog->get_setting('what_to_show'),
* Set default filter values we always want to use if not individually specified otherwise:
* @param array default filters to be merged with the class defaults
* @param array default filters for each preset, to be merged with general default filters if the preset is used
$this->preset_filters =
$preset_filters;
* This will also set back the GLOBALS !!! needed for regenerate_url().
{ // Activate the filterset (fallback to default filter when a value is not set):
// Activate preset filters if necessary:
// Funky oldstyle params:
$this->limit =
$this->filters['posts']; // for compatibility with parent class
{ // set back the GLOBALS !!! needed for regenerate_url() :
* Selected filter preset:
* Blog & Chapters/categories restrictions:
// Get chapters/categories (and compile those values right away)
// TEMP until we get this straight:
// fp> this would only be used for the categories widget and setting it here overwtrites the interesting values when a post list widget is tirggered
// fp> if we need it here we want to use a $set_globals params to this function
// global $cat_array, $cat_modifier;
// $cat_array = $this->default_filters['cat_array'];
// $cat_modifier = $this->default_filters['cat_modifier'];
* Restrict to selected tags:
* Restrict to selected authors:
* Restrict to selected assignees:
* Restrict to selected author OR assignee:
* Restrict to selected locale:
* Restrict to selected statuses:
* Restrict to selected item type:
* Specific Item selection?
// TODO: show_past/future should probably be wired on dstart/dstop instead on timestamps -> get timestamps out of filter perimeter
{ // We have not set a strict default -> we allow overridding:
* Restrict to the statuses we want to show:
// Note: oftentimes, $show_statuses will have been preset to a more restrictive set of values
* Init filter params from Request params
* @param boolean do we want to use saved filters ?
* @return boolean true if we could apply a filterset based on Request params (either explicit or reloaded)
// fp> 2007-09-23> Let's always start with clean filters.
// If we don't do this, then $this->filters will end up with filters in a different order than $this->default_filters.
// And orders are different, then $this->is_filtered() will say it's filtered even if it's not.
// Do we want to restore filters or do we want to create a new filterset
// echo ' filter action: ['.$filter_action.'] ';
// We want to reset the memorized filterset:
$Session->delete( $this->filterset_name );
// Memorize global variables:
// We have applied no filterset:
// Activate preset default filters if necessary:
// fp> TODO: param( 'loc', 'string', '', true ); // Locale of the posts (all by default)
* Blog & Chapters/categories restrictions:
// Get chapters/categories (and compile those values right away)
* Restrict to selected tags:
* Restrict to selected authors:
* Restrict to selected assignees:
* Restrict to selected author or assignee:
* Restrict to selected locale:
* Restrict to selected statuses:
* Restrict to selected types:
* Specific Item selection?
* multiple Item selection ?
* If a timeframe is specified in the querystring, restrict to that timeframe:
$this->filters['ymdhms'] =
param( $this->param_prefix.
'm', '/^\d{4}(0[1-9]|1[0-2])?(?(1)(0[1-9]|[12][0-9]|3[01])?)(?(2)([01][0-9]|2[0-3])?)(?(3)([0-5][0-9]){0,2})$/', $this->default_filters['ymdhms'], true ); // YearMonth(Day) to display
// TODO: show_past/future should probably be wired on dstart/dstop instead on timestamps -> get timestamps out of filter perimeter
// So far, these act as SILENT filters. They will not advertise their filtering in titles etc.
{ // We have not set a strict default -> we allow overridding:
if( $show_past !=
$show_future )
{ // There is a point in overridding:
$this->filters['ts_min'] =
( $show_past ==
0 ) ?
'now' :
'';
$this->filters['ts_max'] =
( $show_future ==
0 ) ?
'now' :
'';
* Restrict to the statuses we want to show:
// Note: oftentimes, $show_statuses will have been preset to a more restrictive set of values
, true, false, true, false ); // Array of sharings to restrict to
$this->filters['orderby'] =
param( $this->param_prefix.
'orderby', '/^([A-Za-z0-9_]+([ ,][A-Za-z0-9_]+)*)?$/', $this->default_filters['orderby'], true ); // list of fields to order by (TODO: change that crap)
$this->limit =
$this->filters['posts']; // for compatibility with parent class
{ // We have requested a specific post
// Do not attempt to save or load any filterset:
//echo ' Got filters from URL?:'.($this->is_filtered() ? 'YES' : 'NO');
//pre_dump( $this->default_filters );
//pre_dump( $this->filters );
if( $use_filters &&
$filter_action ==
'save' )
* Activate preset default filters if necessary
$filter_preset =
$this->filters['filter_preset'];
if( empty( $filter_preset ) )
{ // No filter preset, there are no additional defaults to use:
// Override general defaults with the specific defaults for the preset:
// Save the name of the preset in order for is_filtered() to work properly:
* Save current filterset to session.
$Debuglog->add( 'Saving filterset <strong>'.
$this->filterset_name.
'</strong>', 'filters' );
$Session->set( $this->filterset_name, $this->filters );
* Load previously saved filterset from session.
* @return boolean true if we could restore something
$filters =
$Session->get( $this->filterset_name );
fp> 2007-09-26> even if there are no filters, we need to "set" them in order to set global variables like $show_statuses
{ // We have no saved filters:
{ // set_filters() expects array
$Debuglog->add( 'Restoring filterset <strong>'.
$this->filterset_name.
'</strong>', 'filters' );
{ // Filters have not been set before, we'll use the default filterset:
// If there is a preset filter, we need to activate its specific defaults:
// Use the default filters:
// echo '<br />ItemListLight query';
//pre_dump( $this->filters );
$orderby_array =
explode( ',', $orderby );
// Format each order param with default column names:
$orderby_array =
preg_replace( '#^(.+)$#', $this->Cache->dbprefix.
'$1 '.
$order, $orderby_array );
// walter>fp> $order_cols_to_select = $orderby_array;
// Add an ID parameter to make sure there is no ambiguity in ordering on similar items:
$orderby_array[] =
$this->Cache->dbIDname.
' '.
$order;
$order_by =
implode( ', ', $orderby_array );
{ // Single post: no paging required!
elseif( !empty($this->filters['ymdhms']) // no restriction if we request a month... some permalinks may point to the archive!
elseif( $this->filters['unit'] ==
'days' // We are going to limit to x days: no limit
||
$this->filters['unit'] ==
'all' ) // We want ALL results!
elseif( $this->filters['unit'] ==
'posts' )
* TODO: The result is incorrect when using AND on categories
* We would need to use a HAVING close and thyen COUNT, which would be a subquery
* This is nto compatible with mysql 3.23
SELECT COUNT( DISTINCT '.
$this->Cache->dbIDname.
') '
//echo $DB->format_query( $sql_count );
parent::count_total_rows( $sql_count );
//echo '<br />'.$this->total_rows;
debug_die( 'Unhandled LIMITING mode in ItemList:'.
$this->filters['unit'].
' (paged mode is obsolete)' );
{ // Single post: no paging required!
fp> 2007-11-25 : a very high post count can now be configured in the admin for this. Default is 100.
elseif( !empty($this->filters['ymdhms']) )
{ // no restriction if we request a month... some permalinks may point to the archive!
// echo 'ARCHIVE - no limits';
elseif( $this->filters['unit'] ==
'all' )
{ // We want ALL results!
elseif( $this->filters['unit'] ==
'posts' )
// TODO: dh> check if $limit is NULL!? - though it should not arrive at $page>1 then..
{ // We have requested a specific page number
elseif( $this->filters['unit'] ==
'days' )
{ // We are going to limit to x days:
if( empty( $this->filters['ymdhms_min'] ) )
{ // We have no start date, we'll display the last x days:
if( !empty($this->filters['keywords'])
||
!empty($this->filters['cat_array'])
||
!empty($this->filters['authors']) )
{ // We are in DAYS mode but we can't restrict on these! (TODO: ?)
{ // We are going to limit to LAST x days:
$lastpostdate =
mysql2date('Y-m-d 00:00:00',$lastpostdate);
$otherdate =
date('Y-m-d H:i:s', ($lastpostdate -
(($this->limit-
1) *
86400)));
$this->ItemQuery->WHERE_and( $this->Cache->dbprefix.
'datestart > \''.
$otherdate.
'\'' );
{ // We have a start date, we'll display x days starting from that point:
// $dstart_mysql has been calculated earlier
// TODO: this is redundant with previous dstart processing:
// Add trailing 0s: YYYYMMDDHHMMSS
$dstart0 =
$this->filters['ymdhms_min'].
'00000000000000';
$dstart_mysql =
substr($dstart0,0,4).
'-'.
substr($dstart0,4,2).
'-'.
substr($dstart0,6,2).
' '
$enddate_ts =
date('Y-m-d H:i:s', ($dstart_ts +
($this->limit *
86400)));
$this->ItemQuery->WHERE_and( $this->Cache->dbprefix.
'datestart < \''.
$enddate_ts.
'\'' );
debug_die( 'Unhandled LIMITING mode in ItemList:'.
$this->filters['unit'].
' (paged mode is obsolete)' );
* Run Query: GET DATA ROWS *** LIGHT ***
* Contrary to ItemList2, we only do 1 query here and we extract only a few selected params.
* Basically all we want is being able to generate permalinks.
{ // Query has already executed:
$this->sql =
'SELECT DISTINCT '.
$this->Cache->dbIDname.
', post_datestart, post_datemodified, post_title, post_url,
post_excerpt, post_urltitle, post_main_cat_ID, post_ptyp_ID '
// echo $DB->format_query( $this->sql );
parent::query( false, false, false, 'ItemListLight::query()' );
* Get datetime of the last post/item
* @todo dh> Optimize this, if this can be said after having done {@link query()} already.
* @todo dh> Add $dateformat param
* @return string 'Y-m-d H:i:s' formatted; If there are no items this will be {@link $localtimenow}.
{ // Filters have no been set before, we'll use the default filterset:
// echo ' Query:Setting default filterset ';
$lastpost_ItemQuery->where_chapter2( $this->Blog, $this->filters['cat_array'], $this->filters['cat_modifier'],
$lastpost_ItemQuery->where_author( $this->filters['authors'] );
$lastpost_ItemQuery->where_assignees( $this->filters['assignees'] );
$lastpost_ItemQuery->where_locale( $this->filters['lc'] );
$lastpost_ItemQuery->where_statuses( $this->filters['statuses'] );
$lastpost_ItemQuery->where_types( $this->filters['types'] );
$lastpost_ItemQuery->where_keywords( $this->filters['keywords'], $this->filters['phrase'], $this->filters['exact'] );
$lastpost_ItemQuery->where_ID( $this->filters['post_ID'], $this->filters['post_title'] );
$lastpost_ItemQuery->where_datestart( $this->filters['ymdhms'], $this->filters['week'],
$lastpost_ItemQuery->where_visibility( $this->filters['visibility_array'] );
* LAST POST FIRST!!! (That's the whole point!)
$lastpost_ItemQuery->order_by( $this->Cache->dbprefix.
'datestart DESC' );
$lastpost_ItemQuery->LIMIT( '1' );
$lastpost_ItemQuery->select( $this->Cache->dbprefix.
'datestart' );
$lastpostdate =
$DB->get_var( $lastpost_ItemQuery->get(), 0, 0, 'Get last post date' );
if( empty( $lastpostdate ) )
// echo 'we have no last item';
$lastpostdate =
date('Y-m-d H:i:s', $localtimenow);
* Generate a title for the current list, depending on its filtering params
* @todo cleanup some displays
* @todo implement HMS part of YMDHMS
global $month, $post_statuses;
'category_text' =>
T_('Category').
': ',
'categories_text' =>
T_('Categories').
': ',
// 'tag_text' => T_('Tag').': ',
'tags_text' =>
T_('Tags').
': ',
{ // Filters have no been set before, we'll use the default filterset:
// echo ' setting default filterset ';
{ // We have requested a specific post:
// Should be in first position
$title_array[] =
T_('Invalid request');
$title_array[] =
$Item->get('title');
if( !empty($this->filters['cat_array']) )
{ // We have requested specific categories...
foreach( $this->filters['cat_array'] as $cat_ID )
{ // It is almost never meaningful to die over an invalid cat when generating title
$cat_names[] =
$my_cat['cat_name'];
if( $this->filters['cat_modifier'] ==
'*' )
$cat_names_string =
implode( ' + ', $cat_names );
$cat_names_string =
implode( ', ', $cat_names );
if( !empty( $cat_names_string ) )
if( $this->filters['cat_modifier'] ==
'-' )
$cat_names_string =
T_('All but ').
' '.
$cat_names_string;
$title_array['cats'] =
$params['categories_text'].
$cat_names_string;
$title_array['cats'] =
$params['categories_text'].
$cat_names_string;
$title_array['cats'] =
$params['category_text'].
$cat_names_string;
if( !empty($this->filters['ymdhms']) )
{ // We have asked for a specific timeframe:
{ // We have requested a month too:
$arch =
T_('Archives for').
': '.
$my_month.
' '.
$my_year;
{ // We also want to display a day
if( !empty($this->filters['week']) ||
($this->filters['week'] ===
0) ) // Note: week # can be 0
{ // We also want to display a week number
$arch .=
', '.
T_('week').
' '.
$this->filters['week'];
$title_array['ymdhms'] =
$arch;
if( !empty($this->filters['keywords']) )
$title_array['keywords'] =
T_('Keyword(s)').
': '.
$this->filters['keywords'];
if( !empty($this->filters['tags']) )
$title_array[] =
$params['tags_text'].
$this->filters['tags'];
if( !empty($this->filters['authors']) )
$title_array[] =
T_('Author(s)').
': '.
$this->filters['authors'];
if( !empty($this->filters['assignees']) )
if( $this->filters['assignees'] ==
'-' )
$title_array[] =
T_('Not assigned');
$title_array[] =
T_('Assigned to').
': '.
$this->filters['assignees'];
if( $this->filters['lc'] !=
'all' )
$title_array[] =
T_('Locale').
': '.
$this->filters['lc'];
if( !empty($this->filters['statuses']) )
if( $this->filters['statuses'] ==
'-' )
$title_array[] =
T_('Without status');
$title_array[] =
T_('Status(es)').
': '.
$this->filters['statuses'];
$status_titles =
array();
foreach( $this->filters['visibility_array'] as $status )
$status_titles[] =
T_( $post_statuses[$status] );
$title_array[] =
T_('Visibility').
': '.
implode( ', ', $status_titles );
if( !empty($this->filters['ymdhms_min'] ) )
$title_array['ymdhms_min'] =
T_('Start at').
': '.
$this->filters['ymdhms_min'] ;
if( !empty($this->filters['ts_min'] ) )
if( $this->filters['ts_min'] ==
'now' )
$title_array['ts_min'] =
T_('Hide past');
$title_array['ts_min'] =
T_('Start at').
': '.
$this->filters['ts_min'];
if( !empty($this->filters['ymdhms_max'] ) )
$title_array['ymdhms_max'] =
T_('Stop at').
': '.
$this->filters['ymdhms_max'];
if( !empty($this->filters['ts_max'] ) )
if( $this->filters['ts_max'] ==
'now' )
if( !in_array( 'hide_future', $ignore ) )
$title_array['ts_max'] =
T_('Hide future');
$title_array['ts_max'] =
T_('Stop at').
': '.
$this->filters['ts_max'];
{ // Single post: no paging required!
elseif( !empty($this->filters['ymdhms']) )
{ // no restriction if we request a month... some permalinks may point to the archive!
elseif( $this->filters['unit'] ==
'posts' ||
$this->filters['unit'] ==
'all' )
{ // We're going to page, so there's no real limit here...
elseif( $this->filters['unit'] ==
'days' )
{ // We are going to limit to x days:
if( empty( $this->filters['ymdhms_min'] ) )
{ // We have no start date, we'll display the last x days:
if( !empty($this->filters['keywords'])
||
!empty($this->filters['cat_array'])
||
!empty($this->filters['authors']) )
{ // We are in DAYS mode but we can't restrict on these! (TODO: ?)
{ // We are going to limit to LAST x days:
// TODO: rename 'posts' to 'limit'
$title_array['posts'] =
sprintf( T_('Limited to %d last days'), $this->limit );
{ // We have a start date, we'll display x days starting from that point:
$title_array['posts'] =
sprintf( T_('Limited to %d days'), $this->limit );
debug_die( 'Unhandled LIMITING mode in ItemList:'.
$this->filters['unit'].
' (paged mode is obsolete)' );
* return total number of posts
* This is basically just a stub for backward compatibility
* If the list is sorted by category...
* Note: this only supports one level of categories (nested cats will be flatened)
// Do a normal get_next()
{ // We have reached the end of the list
* If the list is sorted by category...
* This is basically just a stub for backward compatibility
{ // This is the first call to get_item() after get_category_group()
// Return the object we already got in get_category_group():
if( !empty($Item) &&
$this->group_by_cat ==
2 &&
$Item->main_cat_ID !=
$this->main_cat_ID )
{ // We have just hit a new category!
* Get the adverstised start date (does not include timestamp_min)
* Note: there is a priority order in the params to determine the start date:
* @see ItemQuery::where_datestart()
{ // We would be entering an infinite loop, stop now:
// We cannot determine a start date, save an empty string (to differentiate from NULL)
$this->advertised_start_date =
'';
// Reset anti infinite loop:
return $this->advertised_start_date;
if( is_null( $this->advertised_start_date ) )
{ // We haven't determined the start date yet:
if( !empty( $this->filters['ymdhms_min'] ) )
{ // We have requested start date (8 digits)
$this->advertised_start_date =
mktime( 0, 0, 0, substr($m,4,2), substr($m,6,2), substr($m,0,4) );
elseif( !is_null($this->filters['week']) // note: 0 is a valid week number
&&
!empty( $this->filters['ymdhms'] ) )
{ // we want to restrict on a specific week
{ // We have requested an interval
$m =
$this->filters['ymdhms'].
'0101';
$this->advertised_start_date =
mktime( 0, 0, 0, substr($m,4,2), substr($m,6,2), substr($m,0,4) );
elseif( $this->filters['unit'] ==
'days'
{ // We want to restrict on a specific number of days after the start date:
$this->advertised_start_date =
$stop_date -
($this->limit-
1) *
86400;
{ // We cannot determine a start date, save an empty string (to differentiate from NULL)
$this->advertised_start_date =
'';
// Reset anti infinite loop:
return $this->advertised_start_date;
* Get the adverstised stop date (does not include timestamp_max)
* Note: there is a priority order in the params to determine the stop date.
{ // We would be entering an infinite loop, stop now:
// We cannot determine a stop date, save an empty string (to differentiate from NULL)
// Reset anti infinite loop:
{ // We haven't determined the stop date yet:
if( !empty( $this->filters['ymdhms_max'] ) )
{ // We have requested an end date (8 digits)
$this->advertised_stop_date =
mktime( 0, 0, 0, substr($m,4,2), substr($m,6,2), substr($m,0,4) );
elseif( !is_null($this->filters['week']) // note: 0 is a valid week number
&&
!empty( $this->filters['ymdhms'] ) )
{ // we want to restrict on a specific week
elseif( !empty( $this->filters['ymdhms'] ) )
{ // We want to restrict on an interval:
{ // We have requested a day interval
$this->advertised_stop_date =
mktime( 0, 0, 0, substr($m,4,2), substr($m,6,2), substr($m,0,4) );
{ // We want to go to the end of the month:
{ // We want to go to the end of the year:
elseif( $this->filters['unit'] ==
'days'
{ // We want to restrict on a specific number of days after the start date:
{ // We cannot determine a stop date, save an empty string (to differentiate from NULL)
// Reset anti infinite loop:
* Make sure date displaying starts at the beginning of the current filter interval
* Note: we're talking about strict dates (no times involved)
if( !empty( $start_date ) )
{ // Memorize the last displayed as the day BEFORE the one we're going to display
//echo ' start at='.date( locale_datefmt(), $start_date );
* Template function: display potentially remaining empty days until the end of the filter interval
* @param string string to display before the date (if changed)
* @param string string to display after the date (if changed)
* @param string date/time format: leave empty to use locale default time format
function dates_to_end( $before_empty_day =
'<h2>', $after_empty_day =
'</h2>', $format =
'' )
{ // There is a stop date, we want to display days:
//echo ' - stop at='.date( locale_datefmt(), $stop_date );
//echo ' - last displayed='.date( locale_datefmt(), $this->last_displayed_date );
* Template tag: Display the date if it has changed since last call
* Optionally also displays empty dates in between.
{ // This is not applicable to pages
// Make sure we are not missing any param:
'empty_day_display' =>
false,
'empty_day_before' =>
'<h2>',
'empty_day_after' =>
'</h2>',
// Get a timestamp for the date WITHOUT the time:
if( $params['date_format'] ==
'#' )
{ // No format specified, use default locale format:
$params['date_format'] =
locale_datefmt();
{ // We want to display ALL dates from the previous to the current:
// Display the new current date:
.
date_i18n( $params['date_format'], $current_item_date )
global $generating_static;
'block_start' =>
'<p class="center">',
'page_url' =>
'', // All generated links will refer to the current page
'prev_text' =>
'<<',
'next_text' =>
'>>',
'list_prev_text' =>
'...',
'list_next_text' =>
'...',
'scroll_list_range' =>
5,
if( !empty($generating_static) )
{ // When generating a static page, act as if we were currently on the blog main page:
$default_params['page_url'] =
$this->Blog->get('url');
// Use defaults + overrides:
echo
$params['block_single'];
if( $params['links_format'] ==
'#' )
$params['links_format'] =
'$prev$ $first$ $list_prev$ $list$ $list_next$ $last$ $next$';
if( $this->Blog->get_setting( 'paged_nofollowto' ) )
{ // We prefer robots not to follow to pages:
echo
$params['block_start'];
echo
$this->replace_vars( $params['links_format'], $params );
echo
$params['block_end'];
* $Log: _itemlistlight.class.php,v $
* Revision 1.19.2.1 2009/03/16 11:33:12 tblue246
* Validate w and m params -> fix possible PHP notice
* Revision 1.19 2008/01/21 09:35:31 fplanque
* Revision 1.18 2007/12/26 23:12:00 yabs
* changing RANDOM to RAND
* Revision 1.17 2007/12/26 17:53:24 fplanque
* Revision 1.16 2007/12/26 11:27:47 yabs
* added post_ID_list to filters
* Revision 1.15 2007/12/24 10:37:19 yabs
* Revision 1.14 2007/11/27 22:31:57 fplanque
* debugged blog moderation
* Revision 1.13 2007/11/25 14:28:17 fplanque
* additional SEO settings
* Revision 1.12 2007/11/24 21:41:12 fplanque
* additional SEO settings
* Revision 1.11 2007/11/11 23:43:37 blueyed
* Proper fix for array_merge warnings (http://forums.b2evolution.net/viewtopic.php?t=12944); Props Afwas
* Revision 1.10 2007/11/03 21:04:27 fplanque
* Revision 1.9 2007/11/01 03:19:34 blueyed
* Fix for array_merge in PHP5, props yettyn
* Revision 1.8 2007/10/10 09:02:36 fplanque
* Revision 1.7 2007/10/01 01:06:31 fplanque
* Skin/template functions cleanup.
* Revision 1.6 2007/09/26 20:26:36 fplanque
* improved ItemList filters
* Revision 1.5 2007/09/23 18:57:15 fplanque
* Revision 1.4 2007/09/19 20:03:18 yabs
* minor bug fix ( http://forums.b2evolution.net/viewtopic.php?p=60493#60493 )
* Revision 1.3 2007/09/03 16:46:58 fplanque
* Revision 1.2 2007/06/29 00:24:43 fplanque
* $cat_array cleanup tentative
* Revision 1.1 2007/06/25 11:00:27 fplanque
* MODULES (refactored MVC)
* Revision 1.8 2007/06/21 00:44:37 fplanque
* Revision 1.7 2007/05/27 00:35:26 fplanque
* tag display + tag filtering
* Revision 1.6 2007/05/13 22:53:31 fplanque
* allow feeds restricted to post excerpts
* Revision 1.5 2007/05/13 22:02:09 fplanque
* removed bloated $object_def
* Revision 1.4 2007/03/26 14:21:30 fplanque
* better defaults for pages implementation
* Revision 1.3 2007/03/26 12:59:18 fplanque
* Revision 1.2 2007/03/19 21:57:36 fplanque
* ItemLists: $cat_focus and $unit extensions
* Revision 1.1 2007/03/18 03:43:19 fplanque
* Splitting Item/ItemLight and ItemList/ItemListLight
* Goal: Handle Items with less footprint than with their full content
* (will be even worse with multiple languages/revisions per Item)
* Revision 1.53 2007/03/18 01:39:54 fplanque
* renamed _main.php to main.page.php to comply with 2.0 naming scheme.
* Revision 1.52 2007/03/12 14:02:41 waltercruz
* Adding the columns in order by to the query to satisfy the SQL Standarts
* Revision 1.51 2007/03/03 03:37:56 fplanque
* extended prev/next item links
* Revision 1.50 2007/03/03 01:14:12 fplanque
* new methods for navigating through posts in single item display mode
* Revision 1.49 2007/01/26 04:49:17 fplanque
* Revision 1.48 2007/01/23 09:25:40 fplanque
* Configurable sort order.
* Revision 1.47 2007/01/20 23:05:11 blueyed
* Revision 1.46 2007/01/19 21:48:09 blueyed
* Fixed possible notice in preview_from_request()
* Revision 1.45 2006/12/17 23:42:38 fplanque
* Removed special behavior of blog #1. Any blog can now aggregate any other combination of blogs.
* Look into Advanced Settings for the aggregating blog.
* There may be side effects and new bugs created by this. Please report them :]
* Revision 1.44 2006/12/05 00:01:15 fplanque
* enhanced photoblog skin
* Revision 1.43 2006/12/04 18:16:50 fplanque
* Each blog can now have its own "number of page/days to display" settings
* Revision 1.42 2006/11/28 00:33:01 blueyed
* Removed DB::compString() (never used) and DB::get_list() (just a macro and better to have in the 4 used places directly; Cleanup/normalization; no extended regexp, when not needed!
* Revision 1.41 2006/11/24 18:27:24 blueyed
* Fixed link to b2evo CVS browsing interface in file docblocks
* Revision 1.40 2006/11/17 00:19:22 blueyed
* Switch to user locale for validating item_issue_date, because it uses T_()
* Revision 1.39 2006/11/17 00:09:15 blueyed
* TODO: error/E_NOTICE with invalid issue date
* Revision 1.38 2006/11/12 02:13:19 blueyed
* Revision 1.37 2006/11/11 17:33:50 blueyed
* Revision 1.36 2006/11/04 19:38:53 blueyed
* Revision 1.35 2006/11/02 16:00:42 blueyed
* Moved AppendItemPreviewTransact hook, so it can throw error messages
* Revision 1.34 2006/10/31 00:33:26 blueyed
* Fixed item_issue_date for preview
* Revision 1.33 2006/10/10 17:09:39 blueyed
* Revision 1.32 2006/10/08 22:35:01 blueyed
* TODO: limit===NULL handling
* Revision 1.31 2006/10/05 01:17:36 blueyed
* Removed unnecessary/doubled call to Item::update_renderers_from_Plugins()
* Revision 1.30 2006/10/05 01:06:36 blueyed
* Removed dirty "hack"; added ItemApplyAsRenderer hook instead.