b2evolution

Multilingual multiuser multiblog engine

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

Source for file _colls_list_public.widget.php

Documentation is available at _colls_list_public.widget.php

  1. <?php
  2. /**
  3.  * This file implements the colls_list_public 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: _colls_list_public.widget.php,v 1.12 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/model/_widget.class.php''ComponentWidget' );
  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 colls_list_public_Widget$db_row NULL )
  42.     {
  43.         // Call parent constructor:
  44.         parent::ComponentWidget$db_row'core''colls_list_public' );
  45.     }
  46.  
  47.  
  48.     /**
  49.      * Get name of widget
  50.      */
  51.     function get_name()
  52.     {
  53.         return T_('Public blog list');
  54.     }
  55.  
  56.  
  57.     /**
  58.      * Get a very short desc. Used in the widget list.
  59.      */
  60.     function get_short_desc()
  61.     {
  62.         return format_to_output($this->disp_params['title']);
  63.     }
  64.  
  65.  
  66.   /**
  67.      * Get short description
  68.      */
  69.     function get_desc()
  70.     {
  71.         return T_('Display list of all blogs marked as public.');
  72.     }
  73.  
  74.  
  75.   /**
  76.    * Get definitions for editable params
  77.    *
  78.      * @see Plugin::GetDefaultSettings()
  79.      * @param local params like 'for_editing' => true
  80.      */
  81.     function get_param_definitions$params )
  82.     {
  83.         global $use_strict;
  84.         $r array_mergearray(
  85.                 'title' => array(
  86.                     'label' => T_'Title' ),
  87.                     'size' => 40,
  88.                     'note' => T_'This is the title to display, $icon$ will be replaced by the feed icon' ),
  89.                     'defaultvalue' => T_('All blogs'),
  90.                 ),
  91.                 /* 3.3? this is borked
  92.                 'list_type' => array(
  93.                     'label' => T_( 'Display type' ),
  94.                     'type' => 'select',
  95.                     'defaultvalue' => 'list',
  96.                     'options' => array( 'list' => T_('List'), 'form' => T_('Select menu') ),
  97.                     'note' => T_( 'How do you want to display blogs?' ),
  98.                 ),
  99.                 */
  100.             )parent::get_param_definitions$params )    );
  101.  
  102.         return $r;
  103.     }
  104.  
  105.  
  106.     /**
  107.      * Display the widget!
  108.      *
  109.      * @param array MUST contain at least the basic display params
  110.      */
  111.     function display$params )
  112.     {
  113.         $this->init_display$params );
  114.  
  115.         $this->disp_coll_list'public' );
  116.  
  117.         return true;
  118.     }
  119.  
  120.  
  121.     /**
  122.      * Maybe be overriden by some widgets, depending on what THEY depend on..
  123.      *
  124.      * @return array of keys this widget depends on
  125.      */
  126.     function get_cache_keys()
  127.     {
  128.         global $Blog;
  129.  
  130.         return array(
  131.                 'wi_ID'   => $this->ID,                    // Have the widget settings changed ?
  132.                 'set_coll_ID' =>'any',                     // Have the settings of ANY blog changed ? (ex: new skin here, new name on another)
  133.             );
  134.     }
  135. }
  136.  
  137.  
  138. /*
  139.  * $Log: _colls_list_public.widget.php,v $
  140.  * Revision 1.12  2010/02/08 17:54:48  efy-yury
  141.  * copyright 2009 -> 2010
  142.  *
  143.  * Revision 1.11  2009/12/22 03:30:24  blueyed
  144.  * cleanup
  145.  *
  146.  * Revision 1.10  2009/12/01 04:19:25  fplanque
  147.  * even more invalidation dimensions
  148.  *
  149.  * Revision 1.9  2009/09/14 13:54:13  efy-arrin
  150.  * Included the ClassName in load_class() call with proper UpperCase
  151.  *
  152.  * Revision 1.8  2009/09/12 11:03:13  efy-arrin
  153.  * Included the ClassName in the loadclass() with proper UpperCase
  154.  *
  155.  * Revision 1.7  2009/07/02 21:50:13  fplanque
  156.  * commented out unfinished code
  157.  *
  158.  * Revision 1.6  2009/06/18 07:35:53  yabs
  159.  * bugfix : $type is already a param ;)
  160.  *
  161.  * Revision 1.5  2009/05/28 06:49:06  sam2kb
  162.  * Blog list widget can be either a "regular list" or a "select menu"
  163.  * See http://forums.b2evolution.net/viewtopic.php?t=18794
  164.  *
  165.  * Revision 1.4  2009/03/13 02:32:07  fplanque
  166.  * Cleaned up widgets.
  167.  * Removed stupid widget_name param.
  168.  *
  169.  * Revision 1.3  2009/03/08 23:57:46  fplanque
  170.  * 2009
  171.  *
  172.  * Revision 1.2  2008/01/21 09:35:37  fplanque
  173.  * (c) 2008
  174.  *
  175.  * Revision 1.1  2007/06/25 11:02:24  fplanque
  176.  * MODULES (refactored MVC)
  177.  *
  178.  * Revision 1.3  2007/06/20 21:42:13  fplanque
  179.  * implemented working widget/plugin params
  180.  *
  181.  * Revision 1.2  2007/06/20 14:25:00  fplanque
  182.  * fixes
  183.  *
  184.  * Revision 1.1  2007/06/18 21:25:47  fplanque
  185.  * one class per core widget
  186.  *
  187.  */
  188. ?>

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