b2evolution PHP Cross Reference Blogging Systems

Source: /inc/widgets/widgets/_coll_tagline.widget.php - 102 lines - 2677 bytes - Summary - Text - Print

Description: This file implements the xyz 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 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-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_tagline.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_tagline_Widget extends ComponentWidget
  38  {
  39      /**
  40       * Constructor
  41       */
  42  	function coll_tagline_Widget( $db_row = NULL )
  43      {
  44          // Call parent constructor:
  45          parent::ComponentWidget( $db_row, 'core', 'coll_tagline' );
  46      }
  47  
  48  
  49      /**
  50       * Get name of widget
  51       */
  52  	function get_name()
  53      {
  54          return T_('Blog tagline');
  55      }
  56  
  57  
  58      /**
  59       * Get a very short desc. Used in the widget list.
  60       */
  61  	function get_short_desc()
  62      {
  63          global $Blog;
  64  
  65          return $Blog->dget( 'tagline', 'htmlbody' );
  66      }
  67  
  68  
  69      /**
  70       * Get short description
  71       */
  72  	function get_desc()
  73      {
  74          global $Blog;
  75          return sprintf( T_('&laquo;%s&raquo; from the blog\'s <a %s>general settings</a>.'),
  76                  '<strong>'.$Blog->dget('tagline').'</strong>', 'href="?ctrl=coll_settings&tab=general&blog='.$Blog->ID.'"' );
  77      }
  78  
  79  
  80      /**
  81       * Display the widget!
  82       *
  83       * @param array MUST contain at least the basic display params
  84       */
  85  	function display( $params )
  86      {
  87          global $Blog;
  88  
  89          $this->init_display( $params );
  90  
  91          // Collection tagline:
  92          echo $this->disp_params['block_start'];
  93          // TODO: there appears to be no possibility to wrap the tagline in e.g. "<h2>%s</h2>"
  94          //       Should there be a widget param for this?  fp> probably yes
  95          $Blog->disp( 'tagline', 'htmlbody' );
  96          echo $this->disp_params['block_end'];
  97  
  98          return true;
  99      }
 100  }
 101  
 102  ?>

title

Description

title

Description

title

Description

title

title

Body