2015-11-10 23:47:21 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
class pluginAbout extends Plugin {
|
|
|
|
|
2021-09-25 20:28:17 +02:00
|
|
|
public function init() {
|
2015-11-10 23:47:21 +01:00
|
|
|
$this->dbFields = array(
|
|
|
|
'label'=>'About',
|
2015-11-11 22:13:32 +01:00
|
|
|
'text'=>''
|
2015-11-10 23:47:21 +01:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2021-09-25 20:28:17 +02:00
|
|
|
public function form() {
|
2018-08-05 17:54:20 +02:00
|
|
|
global $L;
|
2015-11-10 23:47:21 +01:00
|
|
|
|
2021-09-25 20:28:17 +02:00
|
|
|
$html = '<div class="mb-3">';
|
|
|
|
$html .= '<label class="form-label" for="label">'.$L->get('Label').'</label>';
|
|
|
|
$html .= '<input class="form-control" id="label" name="label" type="text" value="'.$this->getValue('label').'">';
|
|
|
|
$html .= '<div class="form-text">'.$L->get('This title is almost always used in the sidebar of the site').'</div>';
|
2015-11-10 23:47:21 +01:00
|
|
|
$html .= '</div>';
|
2017-05-27 19:46:46 +02:00
|
|
|
|
2021-09-25 20:28:17 +02:00
|
|
|
$html .= '<div class="mb-3">';
|
|
|
|
$html .= '<label class="form-label" for="text">'.$L->get('About').'</label>';
|
|
|
|
$html .= '<textarea class="form-control" rows="3" name="text" id="text">'.$this->getValue('text').'</textarea>';
|
2015-11-10 23:47:21 +01:00
|
|
|
$html .= '</div>';
|
|
|
|
|
|
|
|
return $html;
|
|
|
|
}
|
|
|
|
|
2021-09-25 20:28:17 +02:00
|
|
|
public function siteSidebar() {
|
2015-11-10 23:47:21 +01:00
|
|
|
$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
|
|
|
}
|