2015-11-10 23:47:21 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
class pluginAbout extends Plugin {
|
|
|
|
|
|
|
|
public function init()
|
|
|
|
{
|
|
|
|
$this->dbFields = array(
|
|
|
|
'label'=>'About',
|
2015-11-11 22:13:32 +01:00
|
|
|
'text'=>''
|
2015-11-10 23:47:21 +01:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function form()
|
|
|
|
{
|
|
|
|
global $Language;
|
|
|
|
|
|
|
|
$html = '<div>';
|
2017-05-27 19:46:46 +02:00
|
|
|
$html .= '<label>'.$Language->get('Label').'</label>';
|
2018-05-16 23:17:41 +02:00
|
|
|
$html .= '<input name="label" type="text" value="'.$this->getValue('label').'">';
|
2017-09-09 00:33:14 +02:00
|
|
|
$html .= '<span class="tip">'.$Language->get('This title is almost always used in the sidebar of the site').'</span>';
|
2015-11-10 23:47:21 +01:00
|
|
|
$html .= '</div>';
|
2017-05-27 19:46:46 +02:00
|
|
|
|
2015-11-10 23:47:21 +01:00
|
|
|
$html .= '<div>';
|
|
|
|
$html .= '<label>'.$Language->get('About').'</label>';
|
2017-05-27 19:46:46 +02:00
|
|
|
$html .= '<textarea name="text" id="jstext">'.$this->getValue('text').'</textarea>';
|
2015-11-10 23:47:21 +01:00
|
|
|
$html .= '</div>';
|
|
|
|
|
|
|
|
return $html;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function siteSidebar()
|
|
|
|
{
|
|
|
|
$html = '<div class="plugin plugin-about">';
|
2017-05-27 19:46:46 +02:00
|
|
|
$html .= '<h2 class="plugin-label">'.$this->getValue('label').'</h2>';
|
2015-11-10 23:47:21 +01:00
|
|
|
$html .= '<div class="plugin-content">';
|
2017-05-27 19:46:46 +02:00
|
|
|
$html .= html_entity_decode(nl2br($this->getValue('text')));
|
2015-11-10 23:47:21 +01:00
|
|
|
$html .= '</div>';
|
|
|
|
$html .= '</div>';
|
|
|
|
|
|
|
|
return $html;
|
|
|
|
}
|
2017-05-27 19:46:46 +02:00
|
|
|
}
|