b2evolution PHP Cross Reference Blogging Systems

Source: /inc/widgets/widgets/_coll_longdesc.widget.php - 125 lines - 3023 bytes - Summary - Text - Print

Description: This file implements the Long description Widget class. This file is part of the evoCore framework - {@link http://evocore.net/} See also {@link http://sourceforge.net/projects/evocms/}.

   1  <?php
   2  /**
   3   * This file implements the Long description 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-2014 by Francois Planque - {@link http://fplanque.com/}
   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_longdesc.widget.php 6136 2014-03-08 07:59:48Z manuel $
  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  class coll_longdesc_Widget extends ComponentWidget
  38  {
  39      /**
  40       * Constructor
  41       */
  42  	function coll_longdesc_Widget( $db_row = NULL )
  43      {
  44          // Call parent constructor:
  45          parent::ComponentWidget( $db_row, 'core', 'coll_longdesc' );
  46      }
  47  
  48  
  49      /**
  50       * Get name of widget
  51       */
  52  	function get_name()
  53      {
  54          return T_('Long Description of this Blog');
  55      }
  56  
  57  
  58      /**
  59       * Get a very short desc. Used in the widget list.
  60       */
  61  	function get_short_desc()
  62      {
  63          return format_to_output($this->disp_params['title']);
  64      }
  65  
  66  
  67    /**
  68       * Get short description
  69       */
  70  	function get_desc()
  71      {
  72          global $Blog;
  73          return sprintf( T_('Long description from the blog\'s <a %s>general settings</a>.'),
  74                          'href="?ctrl=coll_settings&tab=general&blog='.$Blog->ID.'"' );
  75      }
  76  
  77  
  78    /**
  79     * Get definitions for editable params
  80     *
  81       * @see Plugin::GetDefaultSettings()
  82       * @param local params like 'for_editing' => true
  83       */
  84  	function get_param_definitions( $params )
  85      {
  86          $r = array_merge( array(
  87                  'title' => array(
  88                      'label' => T_('Block title'),
  89                      'note' => T_( 'Title to display in your skin.' ),
  90                      'size' => 40,
  91                      'defaultvalue' => '',
  92                  ),
  93  
  94              ), parent::get_param_definitions( $params )    );
  95  
  96          return $r;
  97      }
  98  
  99  
 100      /**
 101       * Display the widget!
 102       *
 103       * @param array MUST contain at least the basic display params
 104       */
 105  	function display( $params )
 106      {
 107          global $Blog;
 108  
 109          $this->init_display( $params );
 110  
 111          // Collection long description:
 112          echo $this->disp_params['block_start'];
 113  
 114          // Display title if requested
 115          $this->disp_title();
 116  
 117          $Blog->disp( 'longdesc', 'htmlbody' );
 118  
 119          echo $this->disp_params['block_end'];
 120  
 121          return true;
 122      }
 123  }
 124  
 125  ?>

title

Description

title

Description

title

Description

title

title

Body