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()
|
|
|
|
{
|
|
|
|
$html = '<div>';
|
2016-11-07 20:58:47 +01:00
|
|
|
$html .= '<label>'.$this->L('Plugin label').'</label>';
|
2015-11-10 23:47:21 +01:00
|
|
|
$html .= '<input name="label" id="jslabel" type="text" value="'.$this->getDbField('label').'">';
|
|
|
|
$html .= '</div>';
|
|
|
|
$html .= '<div>';
|
2016-11-07 20:58:47 +01:00
|
|
|
$html .= '<label>'.$this->L('About').'</label>';
|
2015-11-10 23:47:21 +01:00
|
|
|
$html .= '<textarea name="text" id="jstext">'.$this->getDbField('text').'</textarea>';
|
|
|
|
$html .= '</div>';
|
|
|
|
|
|
|
|
return $html;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function siteSidebar()
|
|
|
|
{
|
|
|
|
$html = '<div class="plugin plugin-about">';
|
|
|
|
$html .= '<h2>'.$this->getDbField('label').'</h2>';
|
|
|
|
$html .= '<div class="plugin-content">';
|
2016-08-22 19:50:34 +02:00
|
|
|
$html .= html_entity_decode(nl2br($this->getDbField('text')));
|
2015-11-10 23:47:21 +01:00
|
|
|
$html .= '</div>';
|
|
|
|
$html .= '</div>';
|
|
|
|
|
|
|
|
return $html;
|
|
|
|
}
|
2016-08-22 19:50:34 +02:00
|
|
|
}
|