| [ Index ] |
|
Code source de b2evolution 2.1.0-beta |
[Code source] [Imprimer] [Statistiques]
This file implements the ItemListLight class. This object handles item/post/article lists WITHOUT FULL FUNCTIONNALITY but with a LOWER MEMORY FOOTPRINT.
| Author: | fplanque: Francois PLANQUE. |
| Copyright: | (c)2003-2007 by Francois PLANQUE - {@link http://fplanque.net/} |
| Version: | $Id: _itemlistlight.class.php,v 1.10 2007/11/03 21:04:27 fplanque Exp $ |
| Poids: | 1622 lignes (55 kb) |
| Inclus ou requis: | 0 fois |
| Référencé: | 0 fois |
| Nécessite: | 0 fichiers |
ItemListLight:: (18 méthodes):
ItemListLight()
set_default_filters()
set_filters()
load_from_Request()
activate_preset_filters()
save_filterset()
restore_filterset()
query_init()
query()
get_lastpostdate()
get_filter_titles()
get_total_num_posts()
get_advertised_start_date()
get_advertised_stop_date()
set_start_date()
dates_to_end()
date_if_changed()
page_links()
Classe: ItemListLight - X-Ref
Item List Class LIGHT| ItemListLight( & $Blog, $timestamp_min = NULL, $timestamp_max = NULL, $limit = 20, $cache_name = 'ItemCacheLight', ) X-Ref |
| Constructor param: Blog 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|NULL Limit 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 |
| set_default_filters( $default_filters, $preset_filters = array() X-Ref |
| 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 |
| set_filters( $filters, $memorize = true ) X-Ref |
| Set/Activate filterset This will also set back the GLOBALS !!! needed for regenerate_url(). param: array param: boolean |
| load_from_Request( $use_filters = true ) X-Ref |
| 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) |
| activate_preset_filters() X-Ref |
| Activate preset default filters if necessary |
| save_filterset() X-Ref |
| Save current filterset to session. |
| restore_filterset() X-Ref |
| Load previously saved filterset from session. return: boolean true if we could restore something |
| query_init() X-Ref |
| query() X-Ref |
| 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. |
| get_lastpostdate() X-Ref |
| Get datetime of the last post/item return: string 'Y-m-d H:i:s' formatted; If there are no items this will be {@link $localtimenow}. |
| get_filter_titles( $ignore = array() X-Ref |
| Generate a title for the current list, depending on its filtering params return: array |
| get_total_num_posts() X-Ref |
| return total number of posts This is basically just a stub for backward compatibility |
| get_advertised_start_date() X-Ref |
| Pas de description |
| get_advertised_stop_date() X-Ref |
| Get the adverstised stop date (does not include timestamp_max) Note: there is a priority order in the params to determine the stop date. -dstop -week + m -m -dstart + x days |
| set_start_date( ) X-Ref |
| Make sure date displaying starts at the beginning of the current filter interval Note: we're talking about strict dates (no times involved) |
| dates_to_end( $before_empty_day = '<h2>', $after_empty_day = '</h2>', $format = '' ) X-Ref |
| 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 |
| date_if_changed( $params = array() X-Ref |
| Template tag: Display the date if it has changed since last call Optionally also displays empty dates in between. param: array |
| page_links( $params = array() X-Ref |
| Template tag |
| Généré le : Thu Nov 29 23:58:50 2007 | par Balluche grâce à PHPXref 0.7 |
|