3
* This file implements the "Blog title" widget
5
* @author {@link http://wonderwinds.com/ Ed Bennett}
6
* @author {@link http://fplanque.net/ Francois PLANQUE}
7
* @copyright (c) 2009 by {@link http://quamplures.net/ the Quam Plures project}
8
* @license http://www.gnu.org/licenses/gpl.txt GNU General Public License v3
11
if(!defined('QP_MAIN_INIT')) die('fail');
17
class title_Widget extends ComponentWidget
22
function title_Widget( $db_row = NULL )
24
// Call parent constructor
25
parent::ComponentWidget( $db_row, 'widget', 'title' );
26
$this->widget_name = T_('Blog Title');
27
$this->widget_title = '';
32
* Get widget's short description
37
return sprintf( T_('«%s» from the blog\'s <a %s>general settings</a>.'),
38
'<strong>'.$Blog->dget( 'name' ).'</strong>', 'href="?ctrl=blog_settings&tab=general&blog='.$Blog->ID.'"' );
44
* @todo (3069): rename this to get_title()
46
function get_short_desc()
50
return $Blog->dget( 'name', 'htmlbody' );
56
* @param array must contain at least the basic display params
58
function display( $params )
62
$this->init_display( $params );
64
echo $this->disp_params['block_start'];
65
$title = '<a href="'.$Blog->get( 'url', 'raw' ).'" title="'.$Blog->dget( 'tagline', 'htmlattr' ).'">'
66
.$Blog->dget( 'name', 'htmlbody' ).'</a>';
67
$this->disp_title( $title );
68
echo $this->disp_params['block_end'];