b2evolution

Multilingual multiuser multiblog engine

b2evolution Technical Documentation (CVS HEAD) [ class tree: evocore ] [ index: evocore ] [ all elements ]

Source for file _coll_related_post_list.widget.php

Documentation is available at _coll_related_post_list.widget.php

  1. <?php
  2. /**
  3.  * This file implements the xyz Widget class.
  4.  *
  5.  * This file is part of the evoCore framework - {@link http://evocore.net/}
  6.  * See also {@link http://sourceforge.net/projects/evocms/}.
  7.  *
  8.  * @copyright (c)2003-2010 by Francois PLANQUE - {@link http://fplanque.net/}
  9.  *
  10.  *  {@internal License choice
  11.  *  - If you have received this file as part of a package, please find the license.txt file in
  12.  *    the same folder or the closest folder above for complete license terms.
  13.  *  - If you have received this file individually (e-g: from http://evocms.cvs.sourceforge.net/)
  14.  *    then you must choose one of the following licenses before using the file:
  15.  *    - GNU General Public License 2 (GPL) - http://www.opensource.org/licenses/gpl-license.php
  16.  *    - Mozilla Public License 1.1 (MPL) - http://www.opensource.org/licenses/mozilla1.1.php
  17.  *  }}}
  18.  *
  19.  * @package evocore
  20.  *
  21.  *  {@internal Below is a list of authors who have contributed to design/coding of this file: }}
  22.  * @author fplanque: Francois PLANQUE.
  23.  *
  24.  * @version $Id: _coll_related_post_list.widget.php,v 1.5 2010/02/08 17:54:48 efy-yury Exp $
  25.  */
  26. if!defined('EVO_MAIN_INIT') ) die'Please, do not access this page directly.' );
  27.  
  28. load_class'widgets/widgets/_coll_item_list.widget.php' 'coll_item_list_Widget' );
  29.  
  30. /**
  31.  * ComponentWidget Class
  32.  *
  33.  * A ComponentWidget is a displayable entity that can be placed into a Container on a web page.
  34.  *
  35.  * @package evocore
  36.  */
  37. {
  38.     /**
  39.      * Constructor
  40.      */
  41.     function coll_related_post_list_Widget$db_row NULL )
  42.     {
  43.         // Call parent constructor:
  44.         parent::ComponentWidget$db_row'core''coll_related_post_list' );
  45.     }
  46.  
  47.  
  48.     /**
  49.      * Get definitions for editable params
  50.      *
  51.      * @see Plugin::GetDefaultSettings()
  52.      * @param local params like 'for_editing' => true
  53.      */
  54.     function get_param_definitions$params )
  55.     {
  56.         // This is derived from coll_post_list_Widget, so we DO NOT ADD ANY param here!
  57.         $r parent::get_param_definitions$params );
  58.         // We only change the defaults and hide some params.
  59.         $r['title']['defaultvalue'T_('Related posts');
  60.         $r['title_link']['no_edit'true;
  61.         $r['item_type']['no_edit'true;
  62.         $r['follow_mainlist']['no_edit'true;
  63.         $r['blog_ID']['no_edit'true;
  64.         $r['item_title_link_type']['no_edit'true;
  65.         $r['disp_excerpt']['no_edit'true;
  66.         $r['disp_teaser']['no_edit'true;
  67.         $r['disp_teaser_maxwords']['no_edit'true;
  68.         $r['widget_css_class']['no_edit'true;
  69.         $r['widget_ID']['no_edit'true;
  70.  
  71.         return $r;
  72.     }
  73.  
  74.  
  75.     /**
  76.      * Get name of widget
  77.      */
  78.     function get_name()
  79.     {
  80.         return T_('Simple Related Posts list');
  81.     }
  82.  
  83.  
  84.     /**
  85.      * Get a very short desc. Used in the widget list.
  86.      */
  87.     function get_short_desc()
  88.     {
  89.         return format_to_output($this->disp_params['title']);
  90.     }
  91.  
  92.  
  93.     /**
  94.      * Get short description
  95.      */
  96.     function get_desc()
  97.     {
  98.         return T_('Simplified Item list for listing posts related to the Main list.');
  99.     }
  100.  
  101.  
  102.     /**
  103.      * Prepare display params
  104.      *
  105.      * @param array MUST contain at least the basic display params
  106.      */
  107.     function init_display$params )
  108.     {
  109.         // Force some params (because this is a simplified widget):
  110.         $params['item_type''#';    // Use default item types
  111.         $params['follow_mainlist''tags';    // Follow tags for relation
  112.  
  113.         parent::init_display$params );
  114.     }
  115.  
  116. }
  117.  
  118.  
  119. /*
  120.  * $Log: _coll_related_post_list.widget.php,v $
  121.  * Revision 1.5  2010/02/08 17:54:48  efy-yury
  122.  * copyright 2009 -> 2010
  123.  *
  124.  * Revision 1.4  2009/12/06 18:07:44  fplanque
  125.  * Fix simplified list widgets.
  126.  *
  127.  * Revision 1.3  2009/09/14 13:54:13  efy-arrin
  128.  * Included the ClassName in load_class() call with proper UpperCase
  129.  *
  130.  * Revision 1.2  2009/09/12 11:11:21  efy-arrin
  131.  * Included the ClassName in the loadclass() with proper UpperCase
  132.  *
  133.  * Revision 1.1  2009/03/20 23:27:42  fplanque
  134.  * Related posts widget
  135.  *
  136.  * Revision 1.17  2009/03/15 22:48:16  fplanque
  137.  * refactoring... final step :)
  138.  *
  139.  * Revision 1.16  2009/03/15 21:40:23  fplanque
  140.  * killer factoring
  141.  *
  142.  * Revision 1.15  2009/03/15 20:35:18  fplanque
  143.  * Universal Item List proof of concept
  144.  *
  145.  * Revision 1.14  2009/03/14 03:02:56  fplanque
  146.  * Moving towards an universal item list widget, step 1
  147.  *
  148.  * Revision 1.13  2009/03/13 02:32:07  fplanque
  149.  * Cleaned up widgets.
  150.  * Removed stupid widget_name param.
  151.  *
  152.  * Revision 1.12  2009/03/08 23:57:46  fplanque
  153.  * 2009
  154.  *
  155.  * Revision 1.11  2008/09/24 08:44:11  fplanque
  156.  * Fixed and normalized order params for widgets (Comments not done yet)
  157.  *
  158.  * Revision 1.10  2008/01/21 09:35:37  fplanque
  159.  * (c) 2008
  160.  *
  161.  * Revision 1.9  2008/01/12 17:36:39  blueyed
  162.  * fix indent
  163.  */
  164. ?>

Documentation generated on Sat, 06 Mar 2010 04:05:25 +0100 by phpDocumentor 1.4.2. This site is hosted and maintained by Daniel HAHLER (Contact).