Plugin HTML Code added support for admin area
This commit is contained in:
parent
4091b7de11
commit
0a1a97893f
|
@ -2,9 +2,12 @@
|
||||||
"plugin-data":
|
"plugin-data":
|
||||||
{
|
{
|
||||||
"name": "HTML Code",
|
"name": "HTML Code",
|
||||||
"description": "Add HTML, CSS or Javascript code in the head metadata, 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-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-top": "Insert code in the theme at the top.",
|
||||||
"insert-code-in-the-theme-at-the-bottom": "Insert code in the theme at the bottom."
|
"insert-code-in-the-theme-at-the-bottom": "Insert code in the theme at the bottom.",
|
||||||
|
"insert-code-in-the-admin-area-inside-the-tag-head": "Insert code in the admin area inside the tag <head> </head>",
|
||||||
|
"insert-code-in-the-admin-area-at-the-top": "Insert code in the admin area at the top.",
|
||||||
|
"insert-code-in-the-admin-area-at-the-bottom": "Insert code in the admin area at the bottom."
|
||||||
}
|
}
|
|
@ -0,0 +1,13 @@
|
||||||
|
{
|
||||||
|
"plugin-data":
|
||||||
|
{
|
||||||
|
"name": "HTML Code",
|
||||||
|
"description": "Añada código HTML, CSS o JavaScript en los metadatos de cabecera, encabezado o pie de página de su sitio."
|
||||||
|
},
|
||||||
|
"insert-code-in-the-theme-inside-the-tag-head": "Inserte código en el tema dentro de la etiqueta <head> </head>",
|
||||||
|
"insert-code-in-the-theme-at-the-top": "Inserte código en el tema en el encabezado.",
|
||||||
|
"insert-code-in-the-theme-at-the-bottom": "Inserte código en el tema en el pie de página.",
|
||||||
|
"insert-code-in-the-admin-area-inside-the-tag-head": "Inserte código en el area de administración dentro de la etiqueta <head> </head>",
|
||||||
|
"insert-code-in-the-admin-area-at-the-top": "Inserte código en el area de administración en el encabezado.",
|
||||||
|
"insert-code-in-the-admin-area-at-the-bottom": "Inserte código en el area de administración en el pie de página."
|
||||||
|
}
|
|
@ -7,7 +7,10 @@ class pluginHTMLCode extends Plugin {
|
||||||
$this->dbFields = array(
|
$this->dbFields = array(
|
||||||
'head'=>'',
|
'head'=>'',
|
||||||
'header'=>'',
|
'header'=>'',
|
||||||
'footer'=>''
|
'footer'=>'',
|
||||||
|
'adminHead'=>'',
|
||||||
|
'adminHeader'=>'',
|
||||||
|
'adminFooter'=>''
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,24 +22,46 @@ class pluginHTMLCode extends Plugin {
|
||||||
$html .= $this->description();
|
$html .= $this->description();
|
||||||
$html .= '</div>';
|
$html .= '</div>';
|
||||||
|
|
||||||
|
$html .= '<h2>'.$L->g('Website').'</h2>';
|
||||||
|
|
||||||
$html .= '<div>';
|
$html .= '<div>';
|
||||||
$html .= '<label>Site Head</label>';
|
$html .= '<label>Head</label>';
|
||||||
$html .= '<textarea name="head" id="jshead">'.$this->getValue('head').'</textarea>';
|
$html .= '<textarea name="head" id="jshead">'.$this->getValue('head').'</textarea>';
|
||||||
$html .= '<span class="tip">'.$L->get('insert-code-in-the-theme-inside-the-tag-head').'</span>';
|
$html .= '<span class="tip">'.$L->get('insert-code-in-the-theme-inside-the-tag-head').'</span>';
|
||||||
$html .= '</div>';
|
$html .= '</div>';
|
||||||
|
|
||||||
$html .= '<div>';
|
$html .= '<div>';
|
||||||
$html .= '<label>Site Header</label>';
|
$html .= '<label>Header</label>';
|
||||||
$html .= '<textarea name="header" id="jsheader">'.$this->getValue('header').'</textarea>';
|
$html .= '<textarea name="header" id="jsheader">'.$this->getValue('header').'</textarea>';
|
||||||
$html .= '<span class="tip">'.$L->get('insert-code-in-the-theme-at-the-top').'</span>';
|
$html .= '<span class="tip">'.$L->get('insert-code-in-the-theme-at-the-top').'</span>';
|
||||||
$html .= '</div>';
|
$html .= '</div>';
|
||||||
|
|
||||||
$html .= '<div>';
|
$html .= '<div>';
|
||||||
$html .= '<label>Site Footer</label>';
|
$html .= '<label>Footer</label>';
|
||||||
$html .= '<textarea name="footer" id="jsfooter">'.$this->getValue('footer').'</textarea>';
|
$html .= '<textarea name="footer" id="jsfooter">'.$this->getValue('footer').'</textarea>';
|
||||||
$html .= '<span class="tip">'.$L->get('insert-code-in-the-theme-at-the-bottom').'</span>';
|
$html .= '<span class="tip">'.$L->get('insert-code-in-the-theme-at-the-bottom').'</span>';
|
||||||
$html .= '</div>';
|
$html .= '</div>';
|
||||||
|
|
||||||
|
$html .= '<h2 class="mt-4">'.$L->g('Admin area').'</h2>';
|
||||||
|
|
||||||
|
$html .= '<div>';
|
||||||
|
$html .= '<label>Head</label>';
|
||||||
|
$html .= '<textarea name="adminHead">'.$this->getValue('adminHead').'</textarea>';
|
||||||
|
$html .= '<span class="tip">'.$L->get('insert-code-in-the-theme-inside-the-tag-head').'</span>';
|
||||||
|
$html .= '</div>';
|
||||||
|
|
||||||
|
$html .= '<div>';
|
||||||
|
$html .= '<label>Header</label>';
|
||||||
|
$html .= '<textarea name="adminHeader">'.$this->getValue('adminHeader').'</textarea>';
|
||||||
|
$html .= '<span class="tip">'.$L->get('insert-code-in-the-theme-at-the-top').'</span>';
|
||||||
|
$html .= '</div>';
|
||||||
|
|
||||||
|
$html .= '<div>';
|
||||||
|
$html .= '<label>Footer</label>';
|
||||||
|
$html .= '<textarea name="adminFooter">'.$this->getValue('adminFooter').'</textarea>';
|
||||||
|
$html .= '<span class="tip">'.$L->get('insert-code-in-the-theme-at-the-bottom').'</span>';
|
||||||
|
$html .= '</div>';
|
||||||
|
|
||||||
return $html;
|
return $html;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,4 +79,19 @@ class pluginHTMLCode extends Plugin {
|
||||||
{
|
{
|
||||||
return html_entity_decode($this->getValue('footer'));
|
return html_entity_decode($this->getValue('footer'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function adminHead()
|
||||||
|
{
|
||||||
|
return html_entity_decode($this->getValue('adminHead'));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function adminBodyBegin()
|
||||||
|
{
|
||||||
|
return html_entity_decode($this->getValue('adminHeader'));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function adminBodyEnd()
|
||||||
|
{
|
||||||
|
return html_entity_decode($this->getValue('adminFooter'));
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue