3
* This file implements the Blog title Widget class.
5
* This file is part of Quam Plures - {@link http://quamplures.net/}
6
* See also {@link https://launchpad.net/quam-plures}.
8
* @copyright (c) 2009 - 2011 by the Quam Plures developers - {@link http://quamplures.net/}
9
* @copyright (c)2003-2009 by Francois PLANQUE - {@link http://fplanque.net/}
11
* {@internal License choice
12
* - If you have received this file as part of a package, please find the license.txt file in
13
* the same folder or the closest folder above for complete license terms.
14
* - If you have received this file individually (e-g: from http://evocms.cvs.sourceforge.net/)
15
* then you must choose one of the following licenses before using the file:
16
* - GNU General Public License 2 (GPL) - http://www.opensource.org/licenses/gpl-license.php
17
* - Mozilla Public License 1.1 (MPL) - http://www.opensource.org/licenses/mozilla1.1.php
20
* {@internal Below is a list of authors who have contributed to design/coding of this file: }}
21
* @author fplanque: Francois PLANQUE.
25
if( !defined('QP_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
27
load_class( 'widgets/model/_widget.class.php' );
33
class title_Widget extends ComponentWidget
38
function title_Widget( $db_row = NULL )
40
// Call parent constructor:
41
parent::ComponentWidget( $db_row, 'widget', 'title' );
43
$this->widget_name = $this->T_('Blog title');
44
$this->widget_title = '';
49
* Get a very short desc. Used in the widget list.
51
function get_short_desc()
55
return $Blog->dget( 'name', 'htmlbody' );
60
* Get short description
65
return sprintf( $this->T_('«%s» from the blog\'s <a %s>general settings</a>.'),
66
'<strong>'.$Blog->dget('name').'</strong>', 'href="?ctrl=coll_settings&tab=general&blog='.$Blog->ID.'"' );
73
* @param array MUST contain at least the basic display params
75
function display( $params )
79
$this->init_display( $params );
82
echo $this->disp_params['block_start'];
84
$title = '<a href="'.$Blog->get( 'url', 'raw' ).'" title="'.$Blog->dget( 'tagline', 'htmlattr' ).'">'
85
.$Blog->dget( 'name', 'htmlbody' )
87
$this->disp_title( $title );
89
echo $this->disp_params['block_end'];
b'\\ No newline at end of file'