New plugin HTML Code
This commit is contained in:
parent
6fb9dcda85
commit
d4bda55521
|
@ -2,6 +2,9 @@
|
|||
"plugin-data":
|
||||
{
|
||||
"name": "HTML Code",
|
||||
"description": "Add HTML, CSS or Javascript code in the header or footer of your site."
|
||||
}
|
||||
"description": "Add HTML, CSS or Javascript code in the head metadata, header or footer of your site."
|
||||
},
|
||||
"insert-code-in-the-theme-inside-the-tag-head": "Insert code in the theme inside the tag <head> </head>",
|
||||
"insert-code-in-the-theme-at-the-top": "Insert code in the theme at the top.",
|
||||
"insert-code-in-the-theme-at-the-bottom": "IInsert code in the theme at the bottom."
|
||||
}
|
|
@ -5,6 +5,7 @@ class pluginHTMLCode extends Plugin {
|
|||
public function init()
|
||||
{
|
||||
$this->dbFields = array(
|
||||
'head'=>'',
|
||||
'header'=>'',
|
||||
'footer'=>''
|
||||
);
|
||||
|
@ -12,20 +13,35 @@ class pluginHTMLCode extends Plugin {
|
|||
|
||||
public function form()
|
||||
{
|
||||
global $Language;
|
||||
|
||||
$html = '<div>';
|
||||
$html .= '<label>Header</label>';
|
||||
$html .= '<textarea name="header" id="jsheader">'.$this->getValue('header').'</textarea>';
|
||||
$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>Footer</label>';
|
||||
$html .= '<label>Theme Header</label>';
|
||||
$html .= '<textarea name="header" id="jsheader">'.$this->getValue('header').'</textarea>';
|
||||
$html .= '<span class="tip">'.$Language->get('insert-code-in-the-theme-at-the-top').'</span>';
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<label>Theme Footer</label>';
|
||||
$html .= '<textarea name="footer" id="jsfooter">'.$this->getValue('footer').'</textarea>';
|
||||
$html .= '<span class="tip">'.$Language->get('insert-code-in-the-theme-at-the-bottom').'</span>';
|
||||
$html .= '</div>';
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
public function siteHead()
|
||||
{
|
||||
return html_entity_decode($this->getValue('head'));
|
||||
}
|
||||
|
||||
public function siteBodyBegin()
|
||||
{
|
||||
return html_entity_decode($this->getValue('header'));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue