bludit/bl-plugins/html-code/plugin.php

53 lines
1.3 KiB
PHP
Raw Permalink Normal View History

2018-01-07 12:17:03 +01:00
<?php
class pluginHTMLCode extends Plugin {
public function init()
{
$this->dbFields = array(
2018-01-07 12:45:47 +01:00
'head'=>'',
2018-01-07 12:17:03 +01:00
'header'=>'',
'footer'=>''
);
}
public function form()
{
2018-01-07 12:45:47 +01:00
global $Language;
2018-01-07 12:17:03 +01:00
$html = '<div>';
2018-01-07 12:45:47 +01:00
$html .= '<label>Theme Head</label>';
$html .= '<textarea name="head" id="jshead">'.$this->getValue('head').'</textarea>';
$html .= '<span class="tip">'.$Language->get('insert-code-in-the-theme-inside-the-tag-head').'</span>';
$html .= '</div>';
$html .= '<div>';
$html .= '<label>Theme Header</label>';
2018-01-07 12:17:03 +01:00
$html .= '<textarea name="header" id="jsheader">'.$this->getValue('header').'</textarea>';
2018-01-07 12:45:47 +01:00
$html .= '<span class="tip">'.$Language->get('insert-code-in-the-theme-at-the-top').'</span>';
2018-01-07 12:17:03 +01:00
$html .= '</div>';
$html .= '<div>';
2018-01-07 12:45:47 +01:00
$html .= '<label>Theme Footer</label>';
2018-01-07 12:17:03 +01:00
$html .= '<textarea name="footer" id="jsfooter">'.$this->getValue('footer').'</textarea>';
2018-01-07 12:45:47 +01:00
$html .= '<span class="tip">'.$Language->get('insert-code-in-the-theme-at-the-bottom').'</span>';
2018-01-07 12:17:03 +01:00
$html .= '</div>';
return $html;
}
public function siteHead()
2018-01-07 12:45:47 +01:00
{
return html_entity_decode($this->getValue('head'));
}
public function siteBodyBegin()
2018-01-07 12:17:03 +01:00
{
return html_entity_decode($this->getValue('header'));
}
public function siteBodyEnd()
{
return html_entity_decode($this->getValue('footer'));
}
}