3
* This file implements the "Simple Post list" widget
5
* @author {@link http://wonderwinds.com/ Ed Bennett}
6
* @author {@link http://fplanque.net/ Francois PLANQUE}
7
* @copyright (c) 2009 by {@link http://quamplures.net/ the Quam Plures project}
8
* @license http://www.gnu.org/licenses/gpl.txt GNU General Public License v3
11
if(!defined('QP_MAIN_INIT')) die('fail');
13
$wiCache = get_Cache('WidgetCache');
14
$wiCache->load_widget( 'item_list' );
17
* post_list_Widget class
20
class post_list_Widget extends item_list_Widget
25
function post_list_Widget( $db_row = NULL )
27
// Call parent constructor
28
parent::ComponentWidget( $db_row, 'widget', 'post_list' );
29
$this->widget_name = T_('Post List');
30
$this->widget_title = T_('Contents');
35
* Get widget's short description
39
return T_('Simplified Item list for listing posts.');
45
* @todo (3069): rename this to get_title()
47
function get_short_desc()
49
return format_to_output( $this->disp_params['widget_title'] );
54
* Get definitions for editable params
55
* @see Plugin::GetDefaultSettings()
56
* @param local params like 'for_editing' => true
58
function get_param_definitions( $params )
60
// This is derived from post_list_Widget
61
$r = parent::get_param_definitions( $params );
62
// We only change the defaults and hide some params
63
$r['title_link']['no_edit'] = true;
64
$r['item_type']['no_edit'] = true;
65
$r['follow_mainlist']['no_edit'] = true;
66
$r['blog_ID']['no_edit'] = true;
67
$r['item_title_link_type']['no_edit'] = true;
68
$r['disp_excerpt']['no_edit'] = true;
69
$r['disp_teaser']['no_edit'] = true;
70
$r['disp_teaser_maxwords']['no_edit'] = true;
71
$r['widget_css_class']['no_edit'] = true;
72
$r['widget_ID']['no_edit'] = true;
79
* @param array must contain at least the basic display params
81
function display( $params )
83
// Force some params (because this is a simplified widget)
84
$params['item_type'] = '#'; // Use default item types
86
parent::display( $params );