refactor plugins for bludit v4.0
This commit is contained in:
parent
e584226387
commit
f03109844a
66 changed files with 310 additions and 682 deletions
|
@ -2,34 +2,31 @@
|
|||
|
||||
class pluginAbout extends Plugin {
|
||||
|
||||
public function init()
|
||||
{
|
||||
public function init() {
|
||||
$this->dbFields = array(
|
||||
'label'=>'About',
|
||||
'text'=>''
|
||||
);
|
||||
}
|
||||
|
||||
public function form()
|
||||
{
|
||||
public function form() {
|
||||
global $L;
|
||||
|
||||
$html = '<div>';
|
||||
$html .= '<label>'.$L->get('Label').'</label>';
|
||||
$html .= '<input name="label" type="text" value="'.$this->getValue('label').'">';
|
||||
$html .= '<span class="tip">'.$L->get('This title is almost always used in the sidebar of the site').'</span>';
|
||||
$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>';
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<label>'.$L->get('About').'</label>';
|
||||
$html .= '<textarea name="text" id="jstext">'.$this->getValue('text').'</textarea>';
|
||||
$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>';
|
||||
$html .= '</div>';
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
public function siteSidebar()
|
||||
{
|
||||
public function siteSidebar() {
|
||||
$html = '<div class="plugin plugin-about">';
|
||||
$html .= '<h2 class="plugin-label">'.$this->getValue('label').'</h2>';
|
||||
$html .= '<div class="plugin-content">';
|
||||
|
|
|
@ -2,8 +2,7 @@
|
|||
|
||||
class pluginCanonical extends Plugin {
|
||||
|
||||
public function siteHead()
|
||||
{
|
||||
public function siteHead() {
|
||||
if ($GLOBALS['WHERE_AM_I'] === 'home') {
|
||||
return '<link rel="canonical" href="'.DOMAIN_BASE.'"/>'.PHP_EOL;
|
||||
} elseif ($GLOBALS['WHERE_AM_I'] === 'page') {
|
||||
|
@ -11,5 +10,4 @@ class pluginCanonical extends Plugin {
|
|||
return '<link rel="canonical" href="'.$page->permalink().'"/>'.PHP_EOL;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -1,18 +1,14 @@
|
|||
<?php
|
||||
class pluginCategories extends Plugin {
|
||||
|
||||
public function init()
|
||||
{
|
||||
// Key and default values for the plugin database
|
||||
public function init() {
|
||||
$this->dbFields = array(
|
||||
'label'=>'Categories',
|
||||
'hideCero'=>true
|
||||
);
|
||||
}
|
||||
|
||||
// Returns the custom form for the plugin's settings for display in the admin panel
|
||||
public function form()
|
||||
{
|
||||
public function form() {
|
||||
global $L;
|
||||
|
||||
$html = '<div class="mb-3">';
|
||||
|
@ -32,9 +28,7 @@ class pluginCategories extends Plugin {
|
|||
return $html;
|
||||
}
|
||||
|
||||
// Returns the sidebar for display in the website
|
||||
public function siteSidebar()
|
||||
{
|
||||
public function siteSidebar() {
|
||||
global $categories;
|
||||
|
||||
$html = '<div class="plugin plugin-categories">';
|
||||
|
|
|
@ -5,8 +5,9 @@
|
|||
"description": "Disqus is a comment hosting service for web sites.<br>It's necessary to be registered on <a href=\"https://disqus.com\">Disqus</a> to use this service."
|
||||
},
|
||||
"disqus-shortname": "Disqus shortname",
|
||||
"enable-disqus-on-pages": "Disqus on pages",
|
||||
"enable-disqus-on-standard-pages": "Disqus on standard pages",
|
||||
"enable-disqus-on-static-pages": "Disqus on static pages",
|
||||
"enable-disqus-on-sticky-pages": "Disqus on sticky pages",
|
||||
"enable-disqus-on-unlisted-pages": "Disqus on unlisted pages",
|
||||
"get-the-shortname-from-the-disqus-general-settings": "Get the shortname from the Disqus general settings"
|
||||
}
|
|
@ -5,8 +5,9 @@
|
|||
"description": "Disqus es un servicio de comentarios online.<br>Es necesario registrarse en <a href=\"https://disqus.com\">Disqus</a> antes de utilizar este plugin."
|
||||
},
|
||||
"disqus-shortname": "Disqus shortname",
|
||||
"enable-disqus-on-pages": "Disqus en página",
|
||||
"enable-disqus-on-standard-pages": "Disqus en página estandars",
|
||||
"enable-disqus-on-static-pages": "Disqus en página estaticas",
|
||||
"enable-disqus-on-sticky-pages": "Disqus en página sticky",
|
||||
"enable-disqus-on-unlisted-pages": "Disqus en página sin listar",
|
||||
"get-the-shortname-from-the-disqus-general-settings": "Puede obtener el shortname en la página de configuración de Disqus."
|
||||
}
|
|
@ -2,91 +2,96 @@
|
|||
|
||||
class pluginDisqus extends Plugin {
|
||||
|
||||
public function init()
|
||||
{
|
||||
$this->dbFields = array(
|
||||
'shortname'=>'',
|
||||
'enablePages'=>true,
|
||||
'enableStatic'=>true,
|
||||
'enableSticky'=>true
|
||||
);
|
||||
}
|
||||
public function init() {
|
||||
$this->dbFields = array(
|
||||
'shortname' => '',
|
||||
'enableStandard' => true,
|
||||
'enableStatic' => true,
|
||||
'enableSticky' => true,
|
||||
'enableUnlisted' => true
|
||||
);
|
||||
}
|
||||
|
||||
public function form()
|
||||
{
|
||||
global $L;
|
||||
public function form() {
|
||||
global $L;
|
||||
|
||||
$html = '<div class="alert alert-primary" role="alert">';
|
||||
$html .= $this->description();
|
||||
$html .= '</div>';
|
||||
$html = '<div class="mb-3">';
|
||||
$html .= '<label class="form-label" for="shortname">' . $L->get('disqus-shortname') . '</label>';
|
||||
$html .= '<input class="form-control" id="shortname" name="shortname" type="text" value="' . $this->getValue('shortname') . '">';
|
||||
$html .= '<div class="form-text">' . $L->get('Get the shortname from the Disqus general settings') . '</div>';
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<label>'.$L->get('disqus-shortname').'</label>';
|
||||
$html .= '<input name="shortname" id="jsshortname" type="text" value="'.$this->getValue('shortname').'">';
|
||||
$html .= '<span class="tip">'.$L->get('Get the shortname from the Disqus general settings').'</span>';
|
||||
$html .= '</div>';
|
||||
$html .= '<div class="mb-3">';
|
||||
$html .= '<label class="form-label" for="enableStandard">' . $L->get('Enable Disqus on standard pages') . '</label>';
|
||||
$html .= '<select class="form-select" id="enableStandard" name="enableStandard">';
|
||||
$html .= '<option value="true" ' . ($this->getValue('enableStandard') === true ? 'selected' : '') . '>' . $L->get('Enabled') . '</option>';
|
||||
$html .= '<option value="false" ' . ($this->getValue('enableStandard') === false ? 'selected' : '') . '>' . $L->get('Disabled') . '</option>';
|
||||
$html .= '</select>';
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<label>'.$L->get('enable-disqus-on-pages').'</label>';
|
||||
$html .= '<select name="enablePages">';
|
||||
$html .= '<option value="true" '.($this->getValue('enablePages')===true?'selected':'').'>'.$L->get('enabled').'</option>';
|
||||
$html .= '<option value="false" '.($this->getValue('enablePages')===false?'selected':'').'>'.$L->get('disabled').'</option>';
|
||||
$html .= '</select>';
|
||||
$html .= '</div>';
|
||||
$html .= '<div class="mb-3">';
|
||||
$html .= '<label class="form-label" for="enableStatic">' . $L->get('Enable Disqus on static pages') . '</label>';
|
||||
$html .= '<select class="form-select" id="enableStatic" name="enableStatic">';
|
||||
$html .= '<option value="true" ' . ($this->getValue('enableStatic') === true ? 'selected' : '') . '>' . $L->get('Enabled') . '</option>';
|
||||
$html .= '<option value="false" ' . ($this->getValue('enableStatic') === false ? 'selected' : '') . '>' . $L->get('Disabled') . '</option>';
|
||||
$html .= '</select>';
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<label>'.$L->get('enable-disqus-on-static-pages').'</label>';
|
||||
$html .= '<select name="enableStatic">';
|
||||
$html .= '<option value="true" '.($this->getValue('enableStatic')===true?'selected':'').'>'.$L->get('enabled').'</option>';
|
||||
$html .= '<option value="false" '.($this->getValue('enableStatic')===false?'selected':'').'>'.$L->get('disabled').'</option>';
|
||||
$html .= '</select>';
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<label>'.$L->get('enable-disqus-on-sticky-pages').'</label>';
|
||||
$html .= '<select name="enableSticky">';
|
||||
$html .= '<option value="true" '.($this->getValue('enableSticky')===true?'selected':'').'>'.$L->get('enabled').'</option>';
|
||||
$html .= '<option value="false" '.($this->getValue('enableSticky')===false?'selected':'').'>'.$L->get('disabled').'</option>';
|
||||
$html .= '</select>';
|
||||
$html .= '</div>';
|
||||
$html .= '<div class="mb-3">';
|
||||
$html .= '<label class="form-label" for="enableSticky">' . $L->get('Enable Disqus on sticky pages') . '</label>';
|
||||
$html .= '<select class="form-select" id="enableSticky" name="enableSticky">';
|
||||
$html .= '<option value="true" ' . ($this->getValue('enableSticky') === true ? 'selected' : '') . '>' . $L->get('Enabled') . '</option>';
|
||||
$html .= '<option value="false" ' . ($this->getValue('enableSticky') === false ? 'selected' : '') . '>' . $L->get('Disabled') . '</option>';
|
||||
$html .= '</select>';
|
||||
$html .= '</div>';
|
||||
|
||||
return $html;
|
||||
}
|
||||
$html .= '<div class="mb-3">';
|
||||
$html .= '<label class="form-label" for="enableUnlisted">' . $L->get('Enable Disqus on unlisted pages') . '</label>';
|
||||
$html .= '<select class="form-select" id="enableUnlisted" name="enableUnlisted">';
|
||||
$html .= '<option value="true" ' . ($this->getValue('enableUnlisted') === true ? 'selected' : '') . '>' . $L->get('Enabled') . '</option>';
|
||||
$html .= '<option value="false" ' . ($this->getValue('enableUnlisted') === false ? 'selected' : '') . '>' . $L->get('Disabled') . '</option>';
|
||||
$html .= '</select>';
|
||||
$html .= '</div>';
|
||||
|
||||
public function pageEnd()
|
||||
{
|
||||
global $url;
|
||||
global $WHERE_AM_I;
|
||||
return $html;
|
||||
}
|
||||
|
||||
// Do not shows disqus on page not found
|
||||
if ($url->notFound()) {
|
||||
return false;
|
||||
}
|
||||
public function pageEnd() {
|
||||
global $url;
|
||||
global $WHERE_AM_I;
|
||||
|
||||
if ($WHERE_AM_I==='page') {
|
||||
global $page;
|
||||
if ($page->published() && $this->getValue('enablePages')) {
|
||||
return $this->javascript();
|
||||
}
|
||||
if ($page->isStatic() && $this->getValue('enableStatic')) {
|
||||
return $this->javascript();
|
||||
}
|
||||
if ($page->sticky() && $this->getValue('enableSticky')) {
|
||||
return $this->javascript();
|
||||
}
|
||||
}
|
||||
// Do not display Disqus on page not found
|
||||
if ($url->notFound()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
if ($WHERE_AM_I === 'page') {
|
||||
global $page;
|
||||
if ($page->published() && $this->getValue('enableStandard')) {
|
||||
return $this->javascript();
|
||||
}
|
||||
if ($page->isStatic() && $this->getValue('enableStatic')) {
|
||||
return $this->javascript();
|
||||
}
|
||||
if ($page->sticky() && $this->getValue('enableSticky')) {
|
||||
return $this->javascript();
|
||||
}
|
||||
if ($page->unlisted() && $this->getValue('enableUnlisted')) {
|
||||
return $this->javascript();
|
||||
}
|
||||
}
|
||||
|
||||
private function javascript()
|
||||
{
|
||||
global $page;
|
||||
$pageURL = $page->permalink();
|
||||
$pageID = $page->uuid();
|
||||
$shortname = $this->getValue('shortname');
|
||||
return false;
|
||||
}
|
||||
|
||||
$code = <<<EOF
|
||||
private function javascript() {
|
||||
global $page;
|
||||
$pageURL = $page->permalink();
|
||||
$pageID = $page->uuid();
|
||||
$shortname = $this->getValue('shortname');
|
||||
|
||||
$code = <<<EOF
|
||||
<!-- Disqus plugin -->
|
||||
<div id="disqus_thread"></div>
|
||||
<script>
|
||||
|
@ -106,7 +111,7 @@ $code = <<<EOF
|
|||
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
|
||||
<!-- /Disqus plugin -->
|
||||
EOF;
|
||||
return $code;
|
||||
}
|
||||
|
||||
return $code;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,24 +2,21 @@
|
|||
|
||||
class pluginHitCounter extends Plugin {
|
||||
|
||||
public function init()
|
||||
{
|
||||
public function init() {
|
||||
$this->dbFields = array(
|
||||
'label'=>'Hit Counter',
|
||||
'showUniqueVisitors'=>false
|
||||
);
|
||||
}
|
||||
|
||||
public function form()
|
||||
{
|
||||
public function form() {
|
||||
global $L;
|
||||
|
||||
// Check if the plugin Simple Stats is activated
|
||||
if (!pluginActivated('pluginSimpleStats')) {
|
||||
// Show an alert about the dependency of the plugin
|
||||
// Check if the plugin Visits Stats is activated
|
||||
if (!isPluginActive('pluginVisitsStats')) {
|
||||
$html = '<div class="alert alert-warning" role="alert">';
|
||||
$html .= $L->get('This plugin depends on the following plugins.');
|
||||
$html .= '<ul class="m-0"><li>Simple Stats</li></ul>';
|
||||
$html .= '<ul class="m-0"><li>Visits Stats</li></ul>';
|
||||
$html .= '</div>';
|
||||
|
||||
// Hidden form buttons. Save and Cancel buttons.
|
||||
|
@ -27,22 +24,15 @@ class pluginHitCounter extends Plugin {
|
|||
return $html;
|
||||
}
|
||||
|
||||
// Show the description of the plugin in the settings
|
||||
$html = '<div class="alert alert-primary" role="alert">';
|
||||
$html .= $this->description();
|
||||
$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>';
|
||||
$html .= '</div>';
|
||||
|
||||
// Label of the plugin to show in the sidebar
|
||||
$html .= '<div>';
|
||||
$html .= '<label>'.$L->get('Label').'</label>';
|
||||
$html .= '<input name="label" type="text" value="'.$this->getValue('label').'">';
|
||||
$html .= '<span class="tip">'.$L->get('This title is almost always used in the sidebar of the site').'</span>';
|
||||
$html .= '</div>';
|
||||
|
||||
// Form "select" element for enable or disable Unique visitors properties
|
||||
$html .= '<div>';
|
||||
$html .= '<label>'.$L->get('Show unique visitors').'</label>';
|
||||
$html .= '<select name="showUniqueVisitors">';
|
||||
$html .= '<div class="mb-3">';
|
||||
$html .= '<label class="form-label" for="showUniqueVisitors">'.$L->get('Show unique visitors').'</label>';
|
||||
$html .= '<select class="form-select" id="showUniqueVisitors" name="showUniqueVisitors">';
|
||||
$html .= '<option value="true" '.($this->getValue('showUniqueVisitors')===true?'selected':'').'>'.$L->get('Enabled').'</option>';
|
||||
$html .= '<option value="false" '.($this->getValue('showUniqueVisitors')===false?'selected':'').'>'.$L->get('Disabled').'</option>';
|
||||
$html .= '</select>';
|
||||
|
@ -57,22 +47,21 @@ class pluginHitCounter extends Plugin {
|
|||
$counter = 0;
|
||||
|
||||
// Check if the plugin Simple Stats is activated
|
||||
if (pluginActivated('pluginSimpleStats')) {
|
||||
if (isPluginActive('pluginVisitsStats')) {
|
||||
// Get the object of the plugin Simple Stats
|
||||
global $plugins;
|
||||
$simpleStats = $plugins['all']['pluginSimpleStats'];
|
||||
$visitsStats = $plugins['all']['pluginVisitsStats'];
|
||||
$currentDate = Date::current('Y-m-d');
|
||||
|
||||
if ($this->getValue('showUniqueVisitors')) {
|
||||
// Get the unique visitors from today
|
||||
$counter = $simpleStats->uniqueVisitors($currentDate);
|
||||
$counter = $visitsStats->uniqueVisitors($currentDate);
|
||||
} else {
|
||||
// Get the visits from today
|
||||
$counter = $simpleStats->visits($currentDate);
|
||||
$counter = $visitsStats->visits($currentDate);
|
||||
}
|
||||
}
|
||||
|
||||
// Show in the sidebar the number of visitors
|
||||
$html = '<div class="plugin plugin-hit-counter">';
|
||||
$html .= '<h2 class="plugin-label">'.$this->getValue('label').'</h2>';
|
||||
$html .= '<div class="plugin-content">';
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
"insert-code-in-the-admin-area-at-the-bottom": "Indsæt kode i admin området nederst.",
|
||||
"insert-code-in-the-admin-area-at-the-top": "Indsæt kode i admin området øverst.",
|
||||
"insert-code-in-the-admin-area-inside-the-tag-head": "Indsæt kode i admin området inden for tag <head> </ head>",
|
||||
"insert-code-in-the-theme-at-the-bottom": "Indsæt kode i temaet nederst.",
|
||||
"insert-code-in-the-theme-at-the-top": "Indsæt kode i temaet øverst.",
|
||||
"insert-code-in-the-theme-inside-the-tag-head": "Indsæt kode i temaet mellem tag <head> </ head>",
|
||||
"insert-code-in-the-website-at-the-bottom": "Indsæt kode i website nederst.",
|
||||
"insert-code-in-the-website-at-the-top": "Indsæt kode i website øverst.",
|
||||
"insert-code-in-the-website-inside-the-tag-head": "Indsæt kode i website mellem tag <head> </ head>",
|
||||
"plugin-data": {
|
||||
"description": "Tilføj HTML, CSS, JavaScript kode, til head metadata sektionen, eller i sidehoved, sidefod på dit websted.",
|
||||
"name": "HTML Code"
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
"plugin-data":
|
||||
{
|
||||
"name": "HTML-Code",
|
||||
"description": "HTML-, JavaScript- oder CSS-Code in den Header-Bereich des Themes oder über oder unter den Inhaltsbereich des Themes einfügen."
|
||||
"description": "HTML-, JavaScript- oder CSS-Code in den Header-Bereich des websites oder über oder unter den Inhaltsbereich des websites einfügen."
|
||||
},
|
||||
"insert-code-in-the-theme-inside-the-tag-head": "Code in den Bereich <head> </head> des Themes einfügen.",
|
||||
"insert-code-in-the-theme-at-the-top": "Code über dem Inhaltsbereich des Themes einfügen.",
|
||||
"insert-code-in-the-theme-at-the-bottom": "Code unter dem Inhaltsbereich des Themes einfügen."
|
||||
"insert-code-in-the-website-inside-the-tag-head": "Code in den Bereich <head> </head> des websites einfügen.",
|
||||
"insert-code-in-the-website-at-the-top": "Code über dem Inhaltsbereich des websites einfügen.",
|
||||
"insert-code-in-the-website-at-the-bottom": "Code unter dem Inhaltsbereich des websites einfügen."
|
||||
}
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
"plugin-data":
|
||||
{
|
||||
"name": "HTML-Code",
|
||||
"description": "HTML-, JavaScript- oder CSS-Code in den Header-Bereich des Themes oder über oder unter den Inhaltsbereich des Themes einfügen."
|
||||
"description": "HTML-, JavaScript- oder CSS-Code in den Header-Bereich des websites oder über oder unter den Inhaltsbereich des websites einfügen."
|
||||
},
|
||||
"insert-code-in-the-theme-inside-the-tag-head": "Code in den Bereich <head> </head> des Themes einfügen.",
|
||||
"insert-code-in-the-theme-at-the-top": "Code über dem Inhaltsbereich des Themes einfügen.",
|
||||
"insert-code-in-the-theme-at-the-bottom": "Code unter dem Inhaltsbereich des Themes einfügen."
|
||||
"insert-code-in-the-website-inside-the-tag-head": "Code in den Bereich <head> </head> des websites einfügen.",
|
||||
"insert-code-in-the-website-at-the-top": "Code über dem Inhaltsbereich des websites einfügen.",
|
||||
"insert-code-in-the-website-at-the-bottom": "Code unter dem Inhaltsbereich des websites einfügen."
|
||||
}
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
"name": "HTML Code",
|
||||
"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": "Insert code in the theme at the bottom.",
|
||||
"insert-code-in-the-website-inside-the-tag-head": "Insert code in the website inside the tag <head> </head>",
|
||||
"insert-code-in-the-website-at-the-top": "Insert code in the website at the top.",
|
||||
"insert-code-in-the-website-at-the-bottom": "Insert code in the website 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."
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
"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-website-inside-the-tag-head": "Inserte código en el website dentro de la etiqueta <head> </head>",
|
||||
"insert-code-in-the-website-at-the-top": "Inserte código en el website en el encabezado.",
|
||||
"insert-code-in-the-website-at-the-bottom": "Inserte código en el website 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."
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
"name": "کد HTML",
|
||||
"description": "افزودن کد HTML ، CSS و یا JavaScript در head metadata ، header و یا footer وبسایت خود."
|
||||
},
|
||||
"insert-code-in-the-theme-inside-the-tag-head": "درج کد در قالب درون تگ <head> </head>",
|
||||
"insert-code-in-the-theme-at-the-top": "درج کد درون قالب در بالا.",
|
||||
"insert-code-in-the-theme-at-the-bottom": "درج کد درون قالب در پایین.",
|
||||
"insert-code-in-the-website-inside-the-tag-head": "درج کد در قالب درون تگ <head> </head>",
|
||||
"insert-code-in-the-website-at-the-top": "درج کد درون قالب در بالا.",
|
||||
"insert-code-in-the-website-at-the-bottom": "درج کد درون قالب در پایین.",
|
||||
"insert-code-in-the-admin-area-inside-the-tag-head": "درج کد در محیط مدیریت درون تگ <head> </head>",
|
||||
"insert-code-in-the-admin-area-at-the-top": "درج کد در محیط مدیریت در بالا.",
|
||||
"insert-code-in-the-admin-area-at-the-bottom": "درج کد در محیط مدیریت در پایین."
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"name": "Code HTML",
|
||||
"description": "Ajoutez du code HTML, CSS ou Javascript dans les métadonnées, l’en-tête ou le pied de page de votre site."
|
||||
},
|
||||
"insert-code-in-the-theme-inside-the-tag-head": "Insérer du code dans le thème à l’intérieur du tag<head> </head>",
|
||||
"insert-code-in-the-theme-at-the-top": "Insérer le code dans le haut du thème (header).",
|
||||
"insert-code-in-the-theme-at-the-bottom": "Insérer du code dans le pied de page (footer)."
|
||||
"insert-code-in-the-website-inside-the-tag-head": "Insérer du code dans le thème à l’intérieur du tag<head> </head>",
|
||||
"insert-code-in-the-website-at-the-top": "Insérer le code dans le haut du thème (header).",
|
||||
"insert-code-in-the-website-at-the-bottom": "Insérer du code dans le pied de page (footer)."
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"name": "Codice HTML",
|
||||
"description": "Aggiungi codice HTML, CSS o Javascript nel metadata head, nel header o nel footer del tuo sito."
|
||||
},
|
||||
"insert-code-in-the-theme-inside-the-tag-head": "Inserisci il codice nel tema all'interno del tag <head> </head>",
|
||||
"insert-code-in-the-theme-at-the-top": "Inserisci il codice in alto nel tema.",
|
||||
"insert-code-in-the-theme-at-the-bottom": "Inserisci il codice in basso nel tema."
|
||||
"insert-code-in-the-website-inside-the-tag-head": "Inserisci il codice nel tema all'interno del tag <head> </head>",
|
||||
"insert-code-in-the-website-at-the-top": "Inserisci il codice in alto nel tema.",
|
||||
"insert-code-in-the-website-at-the-bottom": "Inserisci il codice in basso nel tema."
|
||||
}
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
"name": "HTML Code",
|
||||
"description": "サイトのheadメタデータ、ヘッダーやフッターに、HTML, CSS, Java Scriptコードを追加します。"
|
||||
},
|
||||
"insert-code-in-the-theme-inside-the-tag-head": "テーマの <head> <\/head> タグ内にコードを挿入します",
|
||||
"insert-code-in-the-theme-at-the-top": "テーマ上部にコードを挿入します。",
|
||||
"insert-code-in-the-theme-at-the-bottom": "テーマ下部にコードを挿入します。",
|
||||
"insert-code-in-the-website-inside-the-tag-head": "テーマの <head> <\/head> タグ内にコードを挿入します",
|
||||
"insert-code-in-the-website-at-the-top": "テーマ上部にコードを挿入します。",
|
||||
"insert-code-in-the-website-at-the-bottom": "テーマ下部にコードを挿入します。",
|
||||
"insert-code-in-the-admin-area-inside-the-tag-head": "管理パネルの <head> <\/head> タグ内にコードを挿入します",
|
||||
"insert-code-in-the-admin-area-at-the-top": "管理パネル上部にコードを挿入します。",
|
||||
"insert-code-in-the-admin-area-at-the-bottom": "管理パネル下部にコードを挿入します。"
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
"name": "HTML-code",
|
||||
"description": "Voeg HTML, CSS of JavaScript toe in de head metadata, header of footer van de site."
|
||||
},
|
||||
"insert-code-in-the-theme-inside-the-tag-head": "Code aan het thema toevoegen tussen de tags <head> </head>",
|
||||
"insert-code-in-the-theme-at-the-top": "Code boven aan het thema toevoegen.",
|
||||
"insert-code-in-the-theme-at-the-bottom": "Code onder aan het thema toevoegen.",
|
||||
"insert-code-in-the-website-inside-the-tag-head": "Code aan het thema toevoegen tussen de tags <head> </head>",
|
||||
"insert-code-in-the-website-at-the-top": "Code boven aan het thema toevoegen.",
|
||||
"insert-code-in-the-website-at-the-bottom": "Code onder aan het thema toevoegen.",
|
||||
"insert-code-in-the-admin-area-inside-the-tag-head": "Code aan het beheergedeelte toevoegen tussen de tags <head> </head>",
|
||||
"insert-code-in-the-admin-area-at-the-top": "Code boven aan het beheergedeelte toevoegen.",
|
||||
"insert-code-in-the-admin-area-at-the-bottom": "Code onder aan het beheergedeelte toevoegen."
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"name": "HTML-код",
|
||||
"description": "Добавьте код HTML, CSS или Javascript в метаданные заголовка, заголовок или нижний колонтитул вашего сайта."
|
||||
},
|
||||
"insert-code-in-the-theme-inside-the-tag-head": "Вставить код в тему внутри тега <head> </head> (в метаданные заголовка страниц сайта).",
|
||||
"insert-code-in-the-theme-at-the-top": "Вставить код в тему вверху странц сайта.",
|
||||
"insert-code-in-the-theme-at-the-bottom": "Вставить код в тему внизу странц сайта."
|
||||
"insert-code-in-the-website-inside-the-tag-head": "Вставить код в тему внутри тега <head> </head> (в метаданные заголовка страниц сайта).",
|
||||
"insert-code-in-the-website-at-the-top": "Вставить код в тему вверху странц сайта.",
|
||||
"insert-code-in-the-website-at-the-bottom": "Вставить код в тему внизу странц сайта."
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"name": "HTML Kod",
|
||||
"description": "HTML, CSS ya da Javascript kodlarınızı sitenizin istediğiniz bölümüne ekleyin."
|
||||
},
|
||||
"insert-code-in-the-theme-inside-the-tag-head": "<head> </head> tagleri arasına eklenecek kodlar.",
|
||||
"insert-code-in-the-theme-at-the-top": "Sayfanızın en üstüne eklenecek kodlar.",
|
||||
"insert-code-in-the-theme-at-the-bottom": "Sayfanızın en altına eklenecek kodlar."
|
||||
"insert-code-in-the-website-inside-the-tag-head": "<head> </head> tagleri arasına eklenecek kodlar.",
|
||||
"insert-code-in-the-website-at-the-top": "Sayfanızın en üstüne eklenecek kodlar.",
|
||||
"insert-code-in-the-website-at-the-bottom": "Sayfanızın en altına eklenecek kodlar."
|
||||
}
|
||||
|
|
|
@ -2,96 +2,90 @@
|
|||
|
||||
class pluginHTMLCode extends Plugin {
|
||||
|
||||
public function init()
|
||||
{
|
||||
$this->dbFields = array(
|
||||
'head'=>'',
|
||||
'header'=>'',
|
||||
'footer'=>'',
|
||||
'adminHead'=>'',
|
||||
'adminHeader'=>'',
|
||||
'adminFooter'=>''
|
||||
);
|
||||
}
|
||||
public function init() {
|
||||
$this->dbFields = array(
|
||||
'head' => '',
|
||||
'header' => '',
|
||||
'footer' => '',
|
||||
'adminHead' => '',
|
||||
'adminHeader' => '',
|
||||
'adminFooter' => ''
|
||||
);
|
||||
}
|
||||
|
||||
public function form()
|
||||
{
|
||||
global $L;
|
||||
public function form() {
|
||||
global $L;
|
||||
|
||||
$html = '<div class="alert alert-primary" role="alert">';
|
||||
$html .= $this->description();
|
||||
$html .= '</div>';
|
||||
$html = '<h2>' . $L->g('Website') . '</h2>';
|
||||
|
||||
$html .= '<h2>'.$L->g('Website').'</h2>';
|
||||
$html .= '<div class="mb-3">';
|
||||
$html .= '<label class="form-label" for="head">'.$L->get('Head').'</label>';
|
||||
$html .= '<textarea class="form-control" rows="3" name="head" id="head">'.$this->getValue('head').'</textarea>';
|
||||
$html .= '<div class="form-text">'.$L->get('insert-code-in-the-website-inside-the-tag-head').'</div>';
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<label>Head</label>';
|
||||
$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 .= '</div>';
|
||||
$html .= '<div class="mb-3">';
|
||||
$html .= '<label class="form-label" for="header">'.$L->get('Header').'</label>';
|
||||
$html .= '<textarea class="form-control" rows="3" name="header" id="header">'.$this->getValue('header').'</textarea>';
|
||||
$html .= '<div class="form-text">'.$L->get('insert-code-in-the-website-at-the-top').'</div>';
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<label>Header</label>';
|
||||
$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 .= '</div>';
|
||||
$html .= '<div class="mb-3">';
|
||||
$html .= '<label class="form-label" for="footer">'.$L->get('Footer').'</label>';
|
||||
$html .= '<textarea class="form-control" rows="3" name="footer" id="footer">'.$this->getValue('footer').'</textarea>';
|
||||
$html .= '<div class="form-text">'.$L->get('insert-code-in-the-website-at-the-bottom').'</div>';
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<label>Footer</label>';
|
||||
$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 .= '</div>';
|
||||
$html .= '<h2 class="mt-4">' . $L->g('Admin area') . '</h2>';
|
||||
|
||||
$html .= '<h2 class="mt-4">'.$L->g('Admin area').'</h2>';
|
||||
$html .= '<div class="mb-3">';
|
||||
$html .= '<label class="form-label" for="adminHead">'.$L->get('Head').'</label>';
|
||||
$html .= '<textarea class="form-control" rows="3" name="adminHead" id="adminHead">'.$this->getValue('adminHead').'</textarea>';
|
||||
$html .= '<div class="form-text">'.$L->get('insert-code-in-the-admin-area-inside-the-tag-head').'</div>';
|
||||
$html .= '</div>';
|
||||
|
||||
$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 class="mb-3">';
|
||||
$html .= '<label class="form-label" for="adminHeader">'.$L->get('Header').'</label>';
|
||||
$html .= '<textarea class="form-control" rows="3" name="adminHeader" id="adminHeader">'.$this->getValue('adminHeader').'</textarea>';
|
||||
$html .= '<div class="form-text">'.$L->get('insert-code-in-the-admin-area-at-the-top').'</div>';
|
||||
$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 class="mb-3">';
|
||||
$html .= '<label class="form-label" for="adminFooter">'.$L->get('Header').'</label>';
|
||||
$html .= '<textarea class="form-control" rows="3" name="adminFooter" id="adminFooter">'.$this->getValue('adminFooter').'</textarea>';
|
||||
$html .= '<div class="form-text">'.$L->get('insert-code-in-the-admin-area-at-the-bottom').'</div>';
|
||||
$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;
|
||||
}
|
||||
public function siteHead()
|
||||
{
|
||||
return html_entity_decode($this->getValue('head'));
|
||||
}
|
||||
|
||||
public function siteHead()
|
||||
{
|
||||
return html_entity_decode($this->getValue('head'));
|
||||
}
|
||||
public function siteBodyBegin()
|
||||
{
|
||||
return html_entity_decode($this->getValue('header'));
|
||||
}
|
||||
|
||||
public function siteBodyBegin()
|
||||
{
|
||||
return html_entity_decode($this->getValue('header'));
|
||||
}
|
||||
public function siteBodyEnd()
|
||||
{
|
||||
return html_entity_decode($this->getValue('footer'));
|
||||
}
|
||||
|
||||
public function siteBodyEnd()
|
||||
{
|
||||
return html_entity_decode($this->getValue('footer'));
|
||||
}
|
||||
public function adminHead()
|
||||
{
|
||||
return html_entity_decode($this->getValue('adminHead'));
|
||||
}
|
||||
|
||||
public function adminHead()
|
||||
{
|
||||
return html_entity_decode($this->getValue('adminHead'));
|
||||
}
|
||||
public function adminBodyBegin()
|
||||
{
|
||||
return html_entity_decode($this->getValue('adminHeader'));
|
||||
}
|
||||
|
||||
public function adminBodyBegin()
|
||||
{
|
||||
return html_entity_decode($this->getValue('adminHeader'));
|
||||
}
|
||||
|
||||
public function adminBodyEnd()
|
||||
{
|
||||
return html_entity_decode($this->getValue('adminFooter'));
|
||||
}
|
||||
public function adminBodyEnd()
|
||||
{
|
||||
return html_entity_decode($this->getValue('adminFooter'));
|
||||
}
|
||||
}
|
|
@ -2,15 +2,12 @@
|
|||
|
||||
class pluginLinks extends Plugin {
|
||||
|
||||
public function init()
|
||||
{
|
||||
// JSON database
|
||||
public function init() {
|
||||
$jsondb = json_encode(array(
|
||||
'Bludit'=>'https://www.bludit.com',
|
||||
'Bludit PRO'=>'https://pro.bludit.com'
|
||||
));
|
||||
|
||||
// Fields and default values for the database of this plugin
|
||||
$this->dbFields = array(
|
||||
'label'=>'Links',
|
||||
'jsondb'=>$jsondb
|
||||
|
|
|
@ -2,40 +2,33 @@
|
|||
|
||||
class pluginMaintenanceMode extends Plugin {
|
||||
|
||||
public function init()
|
||||
{
|
||||
public function init() {
|
||||
$this->dbFields = array(
|
||||
'enable'=>false,
|
||||
'message'=>'Temporarily down for maintenance.'
|
||||
);
|
||||
}
|
||||
|
||||
public function form()
|
||||
{
|
||||
public function form() {
|
||||
global $L;
|
||||
|
||||
$html = '<div class="alert alert-primary" role="alert">';
|
||||
$html .= $this->description();
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<label>'.$L->get('Enable maintenance mode').'</label>';
|
||||
$html .= '<select name="enable">';
|
||||
$html .= '<option value="true" '.($this->getValue('enable')===true?'selected':'').'>Enabled</option>';
|
||||
$html .= '<option value="false" '.($this->getValue('enable')===false?'selected':'').'>Disabled</option>';
|
||||
$html = '<div class="mb-3">';
|
||||
$html .= '<label class="form-label" for="enable">'.$L->get('Enable maintenance mode').'</label>';
|
||||
$html .= '<select class="form-select" id="enable" name="enable">';
|
||||
$html .= '<option value="true" '.($this->getValue('enable')===true?'selected':'').'>'.$L->get('Enabled').'</option>';
|
||||
$html .= '<option value="false" '.($this->getValue('enable')===false?'selected':'').'>'.$L->get('Disabled').'</option>';
|
||||
$html .= '</select>';
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<label>'.$L->get('Message').'</label>';
|
||||
$html .= '<input name="message" id="jsmessage" type="text" value="'.$this->getValue('message').'">';
|
||||
$html .= '<div class="mb-3">';
|
||||
$html .= '<label class="form-label" for="message">'.$L->get('Message').'</label>';
|
||||
$html .= '<input class="form-control" id="message" name="message" type="text" value="'.$this->getValue('message').'">';
|
||||
$html .= '</div>';
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
public function beforeAll()
|
||||
{
|
||||
public function beforeAll() {
|
||||
if ($this->getValue('enable')) {
|
||||
exit( $this->getValue('message') );
|
||||
}
|
||||
|
|
|
@ -2,9 +2,7 @@
|
|||
|
||||
class pluginNavigation extends Plugin {
|
||||
|
||||
public function init()
|
||||
{
|
||||
// Fields and default values for the database of this plugin
|
||||
public function init() {
|
||||
$this->dbFields = array(
|
||||
'label'=>'Navigation',
|
||||
'homeLink'=>true,
|
||||
|
@ -12,35 +10,29 @@ class pluginNavigation extends Plugin {
|
|||
);
|
||||
}
|
||||
|
||||
// Method called on the settings of the plugin on the admin area
|
||||
public function form()
|
||||
{
|
||||
public function form() {
|
||||
global $L;
|
||||
|
||||
$html = '<div class="alert alert-primary" role="alert">';
|
||||
$html .= $this->description();
|
||||
$html .= '</div>';
|
||||
$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>';
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<label>'.$L->get('Label').'</label>';
|
||||
$html .= '<input id="jslabel" name="label" type="text" value="'.$this->getValue('label').'">';
|
||||
$html .= '<span class="tip">'.$L->get('This title is almost always used in the sidebar of the site').'</span>';
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<label>'.$L->get('Home link').'</label>';
|
||||
$html .= '<select name="homeLink">';
|
||||
$html .= '<option value="true" '.($this->getValue('homeLink')===true?'selected':'').'>'.$L->get('Enabled').'</option>';
|
||||
$html .= '<option value="false" '.($this->getValue('homeLink')===false?'selected':'').'>'.$L->get('Disabled').'</option>';
|
||||
$html .= '</select>';
|
||||
$html .= '<span class="tip">'.$L->get('Show the home link on the sidebar').'</span>';
|
||||
$html .= '</div>';
|
||||
$html .= '<div class="mb-3">';
|
||||
$html .= '<label class="form-label" for="homeLink">'.$L->get('Home link').'</label>';
|
||||
$html .= '<select class="form-select" id="homeLink" name="homeLink">';
|
||||
$html .= '<option value="true" '.($this->getValue('homeLink')===true?'selected':'').'>'.$L->get('Enabled').'</option>';
|
||||
$html .= '<option value="false" '.($this->getValue('homeLink')===false?'selected':'').'>'.$L->get('Disabled').'</option>';
|
||||
$html .= '</select>';
|
||||
$html .= '<div class="form-text">'.$L->get('Show the home link on the sidebar').'</div>';
|
||||
$html .= '</div>';
|
||||
|
||||
if (ORDER_BY=='date') {
|
||||
$html .= '<div>';
|
||||
$html .= '<label>'.$L->get('Amount of items').'</label>';
|
||||
$html .= '<input id="jsnumberOfItems" name="numberOfItems" type="text" value="'.$this->getValue('numberOfItems').'">';
|
||||
$html .= '</div>';
|
||||
$html .= '<div class="mb-3">';
|
||||
$html .= '<label class="form-label" for="numberOfItems">'.$L->get('Amount of items').'</label>';
|
||||
$html .= '<input class="form-control" id="numberOfItems" name="numberOfItems" type="text" value="'.$this->getValue('numberOfItems').'">';
|
||||
$html .= '</div>';
|
||||
}
|
||||
|
||||
return $html;
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Open Graph",
|
||||
"description": "Open Graph ви позволява да свържете вашето съдържание със социални мрежи."
|
||||
},
|
||||
"set-a-default-image-for-content": "Set a default image for the content without pictures.",
|
||||
"set-your-facebook-app-id": "Set your Facebook App ID."
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
{
|
||||
"plugin-data": {
|
||||
"description": "Open Graph protokollen gør det muligt for ethvert websted, at blive et rigt objekt i en social graf.",
|
||||
"name": "Open Graph"
|
||||
},
|
||||
"set-a-default-image-for-content": "Indsæt et standardbillede til indholdet uden billeder.",
|
||||
"set-your-facebook-app-id": "Indsæt dit Facebook App ID."
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Open Graph",
|
||||
"description": "Plugin zur Verwendung des Open Graph Protocols (beispielsweise für Facebook)."
|
||||
},
|
||||
"set-a-default-image-for-content": "Set a default image for the content without pictures.",
|
||||
"set-your-facebook-app-id": "Set your Facebook App ID."
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Open Graph",
|
||||
"description": "Plugin zur Verwendung des Open Graph Protocols (beispielsweise für Facebook)."
|
||||
},
|
||||
"set-a-default-image-for-content": "Set a default image for the content without pictures.",
|
||||
"set-your-facebook-app-id": "Set your Facebook App ID."
|
||||
}
|
|
@ -2,8 +2,8 @@
|
|||
"plugin-data":
|
||||
{
|
||||
"name": "Open Graph",
|
||||
"description": "The Open Graph protocol enables any web page to become a rich object in a social graph."
|
||||
"description": "The Open Graph protocol enables any web page to become a rich object in a social graph. For instance, this is used on Facebook to allow any web page to have the same functionality as any other object on Facebook."
|
||||
},
|
||||
"set-a-default-image-for-content": "Set a default image for the content without pictures.",
|
||||
"set-a-default-image-for-pages-without-pictures": "Set a default image for pages without pictures.",
|
||||
"set-your-facebook-app-id": "Set your Facebook App ID."
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Open Graph",
|
||||
"description": "Este complemento mejora las publicaciones en las redes sociales con este plugin."
|
||||
},
|
||||
"set-a-default-image-for-content": "Set a default image for the content without pictures.",
|
||||
"set-your-facebook-app-id": "Set your Facebook App ID."
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Open Graph",
|
||||
"description": "پروتکل Open Graph یک صفحه وب را به یک شیء غنی در یک نمودار اجتماعی تبدیل می کند ."
|
||||
},
|
||||
"set-a-default-image-for-content": "قراردادن یک تصویر پیشفرض برای محتوایی که تصویر ندارد.",
|
||||
"set-your-facebook-app-id": "قراردادن شناسه Facebook App."
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Open Graph",
|
||||
"description": "Permets à n’importe quelle page web de devenir l’objet enrichi d’un graphe social. Par exemple, il est utilisé sur Facebook pour permettre à une page web de bénéficier des mêmes fonctionnalités que n’importe quel autre objet sur Facebook."
|
||||
},
|
||||
"set-a-default-image-for-content": "Set a default image for the content without pictures.",
|
||||
"set-your-facebook-app-id": "Set your Facebook App ID."
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Open Graph",
|
||||
"description": "Il protocollo Open Graph permette a qualsiasi pagina web di diventare un rich object in un social graph."
|
||||
},
|
||||
"set-a-default-image-for-content": "Imposta un'immagine predefinita per il contenuto senza foto.",
|
||||
"set-your-facebook-app-id": "Imposta il tuo Facebook App ID."
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Open Graph",
|
||||
"description": "The Open Graph protocol enables any web page to become a rich object in a social graph."
|
||||
},
|
||||
"set-a-default-image-for-content": "Set a default image for the content without pictures.",
|
||||
"set-your-facebook-app-id": "Set your Facebook App ID."
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Open Graph",
|
||||
"description": "Met het Open Graph-protocol kan van iedere pagina een object in een sociale grafiek worden gemaakt."
|
||||
},
|
||||
"set-a-default-image-for-content": "Standaardafbeelding voor inhoud zonder afbeeldingen.",
|
||||
"set-your-facebook-app-id": "Uw Facebook App-ID."
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Open Graph",
|
||||
"description": "Protokół Open Graph zezwala stronie na stosowanie meta tagów używanych w serwisach społecznościowych."
|
||||
},
|
||||
"set-a-default-image-for-content": "Set a default image for the content without pictures.",
|
||||
"set-your-facebook-app-id": "Set your Facebook App ID."
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Open Graph",
|
||||
"description": "Протокол Open Graph дает возможность связывать свой контент с социальными сетями."
|
||||
},
|
||||
"set-a-default-image-for-content": "Установите изображение по умолчанию для контента без картинок.",
|
||||
"set-your-facebook-app-id": "Установите свой идентификатор приложения Facebook (App ID)."
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Open Graph",
|
||||
"description": "Open Graph protokolü sosyal bir grafikte zengin bir nesne halinde herhangi bir web sayfasını sağlar."
|
||||
},
|
||||
"set-a-default-image-for-content": "Set a default image for the content without pictures.",
|
||||
"set-your-facebook-app-id": "Set your Facebook App ID."
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Open Graph",
|
||||
"description": "Протокол Open Graph дозволяє ділитися будь-якою веб-сторінкою у соціальних мережах."
|
||||
},
|
||||
"set-a-default-image-for-content": "Set a default image for the content without pictures.",
|
||||
"set-your-facebook-app-id": "Set your Facebook App ID."
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "開放社交關係圖",
|
||||
"description": "開放社交關係圖協定可以讓任何網頁變成豐富的物件"
|
||||
},
|
||||
"set-a-default-image-for-content": "Set a default image for the content without pictures.",
|
||||
"set-your-facebook-app-id": "Set your Facebook App ID."
|
||||
}
|
|
@ -2,34 +2,27 @@
|
|||
|
||||
class pluginOpenGraph extends Plugin {
|
||||
|
||||
public function init()
|
||||
{
|
||||
// Fields and default values for the database of this plugin
|
||||
public function init() {
|
||||
$this->dbFields = array(
|
||||
'defaultImage'=>'',
|
||||
'fbAppId'=>''
|
||||
);
|
||||
}
|
||||
|
||||
public function form()
|
||||
{
|
||||
public function form() {
|
||||
global $L;
|
||||
|
||||
$html = '<div class="alert alert-primary" role="alert">';
|
||||
$html .= $this->description();
|
||||
$html .= '</div>';
|
||||
$html = '<div class="mb-3">';
|
||||
$html .= '<label class="form-label" for="defaultImage">'.$L->get('Default image').'</label>';
|
||||
$html .= '<input class="form-control" id="defaultImage" name="defaultImage" type="text" value="'.$this->getValue('defaultImage').'">';
|
||||
$html .= '<div class="form-text">'.$L->get('Set a default image for pages without pictures').'</div>';
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<label>'.$L->get('Default image').'</label>';
|
||||
$html .= '<input id="jsdefaultImage" name="defaultImage" type="text" value="'.$this->getValue('defaultImage').'" placeholder="https://">';
|
||||
$html .= '<span class="tip">'.$L->g('set-a-default-image-for-content').'</span>';
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<label>'.$L->get('Facebook App ID').'</label>';
|
||||
$html .= '<input name="fbAppId" type="text" value="'.$this->getValue('fbAppId').'" placeholder="App ID">';
|
||||
$html .= '<span class="tip">'.$L->g('set-your-facebook-app-id').'</span>';
|
||||
$html .= '</div>';
|
||||
$html .= '<div class="mb-3">';
|
||||
$html .= '<label class="form-label" for="fbAppId">'.$L->get('Facebook App ID').'</label>';
|
||||
$html .= '<input class="form-control" id="fbAppId" name="fbAppId" type="text" value="'.$this->getValue('fbAppId').'">';
|
||||
$html .= '<div class="form-text">'.$L->get('Set your Facebook app id').'</div>';
|
||||
$html .= '</div>';
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<?php
|
||||
|
||||
class popeye extends Plugin {
|
||||
|
||||
public function init()
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"plugin-data": {
|
||||
"description": "Du kan bruge et specielt HTML metatag til at fortælle søgerobotter, om at de ikke skal indeksere indholdet på en side og / eller ikke scanne det for links, der kan følges.<br>Læs mere om søgerobotter her: <a href=\"https://www.robotstxt.org/robotstxt.html\">https://www.robotstxt.org/</a>",
|
||||
"name": "Robots"
|
||||
}
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Robots",
|
||||
"description": "Plugin für die Verwendung von Robots-Meta-Tags zur Suchmaschinenoptimierung (SEO) unter \"Einstellungen\" bei der Erstellung oder Bearbeitung von Seiten."
|
||||
}
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Robots",
|
||||
"description": "Plugin für die Verwendung von Robots-Meta-Tags zur Suchmaschinenoptimierung (SEO) unter \"Einstellungen\" bei der Erstellung oder Bearbeitung von Seiten."
|
||||
}
|
||||
}
|
|
@ -2,6 +2,8 @@
|
|||
"plugin-data":
|
||||
{
|
||||
"name": "Robots",
|
||||
"description": "You can use a special HTML meta tag to tell robots not to index the content of a page, and/or not scan it for links to follow."
|
||||
}
|
||||
"description": "Enable the feature robots exclusion standard on your website. You can configure the robot's behavior for each page from the SEO options. Also, this plugin allows you to configure the robots.txt file."
|
||||
},
|
||||
"configure-robotstxt-file": "Configure robots.txt file",
|
||||
"this-plugin-generates-the-file": "This plugin generates the file:"
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Robots",
|
||||
"description": "Puedes usar una metaetiqueta HTML especial para decirle a los robots que no indexen el contenido de una página."
|
||||
}
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "محتوای راه دور",
|
||||
"description": "این افزونه یک راه آسان برای داشتن محتوای سایت شما در Github یا مشابه دارد و به نوبه خود، با بلودیت شما هماهنگ شده است ."
|
||||
},
|
||||
"webhook": "Webhook",
|
||||
"source": "منبع",
|
||||
"try-webhook": "امتحان webhook",
|
||||
"complete-url-of-the-zip-file": "آدرس وب کامل فایل زیپ."
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Robot",
|
||||
"description": "Puoi usare uno speciale meta tag HTML per direi ai robot di non indicizzare il contenuto di una pagina, e/o di non scansionarla per i link."
|
||||
}
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Robots",
|
||||
"description": "You can use a special HTML meta tag to tell robots not to index the content of a page, and\/or not scan it for links to follow."
|
||||
}
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Robots",
|
||||
"description": "Mogelijkheid om via een speciale HTML meta-tag robots/crawlers op te dragen om de inhoud van een pagina niet te indexeren, niet te archiveren en/of niet te scannen op links."
|
||||
}
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Поисковые роботы",
|
||||
"description": "Вы можете использовать специальный метатег HTML, чтобы сообщить роботам, чтобы они не индексировали содержимое страницы, и/или не просматривали его на наличие ссылок."
|
||||
}
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Robotlar",
|
||||
"description": "Robotların bir sayfanın içeriğini dizine eklememelerini veya takip edilecek bağlantılar için taramamasını sağlamak için özel bir HTML meta etiketi kullanabilirsiniz."
|
||||
}
|
||||
}
|
|
@ -2,29 +2,25 @@
|
|||
|
||||
class pluginRobots extends Plugin {
|
||||
|
||||
public function init()
|
||||
{
|
||||
public function init() {
|
||||
$this->dbFields = array(
|
||||
'robotstxt'=>'User-agent: *'.PHP_EOL.'Allow: /'
|
||||
);
|
||||
}
|
||||
|
||||
public function form()
|
||||
{
|
||||
$html = '<div class="alert alert-primary" role="alert">';
|
||||
$html .= $this->description();
|
||||
$html .= '</div>';
|
||||
public function form() {
|
||||
global $L;
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<label>'.DOMAIN.'/robots.txt</label>';
|
||||
$html .= '<textarea name="robotstxt" id="jsrobotstxt">'.$this->getValue('robotstxt').'</textarea>';
|
||||
$html .= '</div>';
|
||||
$html = '<div class="mb-3">';
|
||||
$html .= '<label class="form-label" for="robotstxt">'.$L->get('Configure robots.txt file').'</label>';
|
||||
$html .= '<textarea class="form-control" rows="3" name="robotstxt" id="robotstxt">'.$this->getValue('robotstxt').'</textarea>';
|
||||
$html .= '<div class="form-text">'.$L->get('This plugin generates the file').' '.DOMAIN_BASE.'/robots.txt</div>';
|
||||
$html .= '</div>';
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
public function siteHead()
|
||||
{
|
||||
public function siteHead() {
|
||||
global $WHERE_AM_I;
|
||||
|
||||
$html = PHP_EOL.'<!-- Robots plugin -->'.PHP_EOL;
|
||||
|
@ -53,13 +49,12 @@ class pluginRobots extends Plugin {
|
|||
return $html;
|
||||
}
|
||||
|
||||
public function beforeAll()
|
||||
{
|
||||
public function beforeAll() {
|
||||
$webhook = 'robots.txt';
|
||||
if ($this->webhook($webhook)) {
|
||||
header('Content-type: text/plain');
|
||||
// Include link to sitemap in robots.txt if the plugin is enabled
|
||||
if (pluginActivated('pluginSitemap')) {
|
||||
if (isPluginActive('pluginSitemap')) {
|
||||
echo 'Sitemap: '.DOMAIN_BASE.'sitemap.xml'.PHP_EOL;
|
||||
}
|
||||
echo $this->getValue('robotstxt');
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
{
|
||||
"amount-of-items-to-show-on-the-feed": "Antal at emner, der skal vises i feedet.",
|
||||
"plugin-data": {
|
||||
"description": "Denne udvidelse genererer et RSS feed af dit websted.<br>Feedet har URL adressen https://example.com/rss.xml",
|
||||
"name": "RSS Feed"
|
||||
},
|
||||
"rss-url": "RSS URL"
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "RSS Feed",
|
||||
"description": "Das Plugin erstellt erstellt einen RSS Feed der Inhalte."
|
||||
},
|
||||
"amount-of-items-to-show-on-the-feed": "Anzahl der gezeigten Inhalte."
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "RSS Feed",
|
||||
"description": "Das Plugin erstellt erstellt einen RSS Feed der Inhalte."
|
||||
},
|
||||
"amount-of-items-to-show-on-the-feed": "Anzahl der gezeigten Inhalte."
|
||||
}
|
|
@ -2,8 +2,9 @@
|
|||
"plugin-data":
|
||||
{
|
||||
"name": "RSS Feed",
|
||||
"description": "This plugin generates an RSS feed of your site.<br>The feed has the URL https://example.com/rss.xml"
|
||||
"description": "This plugin generates an RSS feed of your website. The RSS feed allows users and application to subscribe to your content."
|
||||
},
|
||||
"amount-of-items-to-show-on-the-feed": "Amount of items to show on the feed.",
|
||||
"rss-url": "RSS URL"
|
||||
"the-number-of-items-to-display-in-the-feed": "The number of items to display in the feed.",
|
||||
"rss-url": "RSS URL",
|
||||
"this-plugin-generates-the-file": "This plugin generates the file:"
|
||||
}
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "RSS Feed",
|
||||
"description": "Este plugin genera contenido dinamico en formato RSS de tu sitio.<br>El plugin genera la URL https://example.com/rss.xml"
|
||||
},
|
||||
"amount-of-items-to-show-on-the-feed": "Cantidad de artículos para mostrar.",
|
||||
"rss-url": "URL del RSS"
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "خوراک RSS",
|
||||
"description": "این پلاگین برای وبسایت شما یک خوراک RSS تولید میکند.<br>خوراک آدرس وب https://example.com/rss.xml دارد"
|
||||
},
|
||||
"amount-of-items-to-show-on-the-feed": "تعداد مطالب جهت نمایش در خوراک.",
|
||||
"rss-url": "آدرس وب RSS"
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Flux RSS",
|
||||
"description": "Ce plugin génère un flux RSS de votre site.<br/>Le flux est accessible a l'URL de ce genre : https://example.com/rss.xml"
|
||||
},
|
||||
"amount-of-items-to-show-on-the-feed": "Nombre d'éléments à afficher sur le flux.",
|
||||
"rss-url": "URL RSS"
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Feed RSS",
|
||||
"description": "Questo plugin genera un feed RSS del tuo sito.<br>Il feed si trova all' URL https://esempio.com/rss.xml"
|
||||
},
|
||||
"amount-of-items-to-show-on-the-feed": "Quantità di voci da mostrare nel feed.",
|
||||
"rss-url": "URL RSS"
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "RSS Feed",
|
||||
"description": "This plugin generates an RSS feed of your site.<br>The feed has the URL https:\/\/example.com\/rss.xml"
|
||||
},
|
||||
"amount-of-items-to-show-on-the-feed": "フィードに表示するアイテム数。",
|
||||
"rss-url": "RSS URL"
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "RSS-feed",
|
||||
"description": "Genereert een RSS-feed voor de website.<br>De URL van deze feed is https://voorbeeld.nl/rss.xml"
|
||||
},
|
||||
"amount-of-items": "Aantal items",
|
||||
"amount-of-items-to-show-on-the-feed": "Aantal items om op te nemen in de feed.",
|
||||
"rss-url": "URL voor RSS-feed"
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "RSS-канал",
|
||||
"description": "Этот плагин создаёт RSS-канал для вашего сайта<br/>Канал доступен по URL https://example.com/rss.xml"
|
||||
},
|
||||
"amount-of-items-to-show-on-the-feed": "Количество позиций в RSS-канале.",
|
||||
"rss-url": "RSS URL"
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "RSS Beslemesi",
|
||||
"description": "Bu eklenti, sitenizin RSS beslemesini üretir.<br>Besleme URL'si https://example.com/rss.xml gibi görünür."
|
||||
},
|
||||
"amount-of-items-to-show-on-the-feed": "Özet akışında gösterilecek öğe miktarı.",
|
||||
"rss-url": "RSS URL"
|
||||
}
|
|
@ -2,49 +2,39 @@
|
|||
|
||||
class pluginRSS extends Plugin {
|
||||
|
||||
public function init()
|
||||
{
|
||||
// Fields and default values for the database of this plugin
|
||||
public function init() {
|
||||
$this->dbFields = array(
|
||||
'numberOfItems'=>5
|
||||
);
|
||||
}
|
||||
|
||||
// Method called on the settings of the plugin on the admin area
|
||||
public function form()
|
||||
{
|
||||
public function form() {
|
||||
global $L;
|
||||
|
||||
$html = '<div class="alert alert-primary" role="alert">';
|
||||
$html .= $this->description();
|
||||
$html .= '</div>';
|
||||
$html = '<div class="mb-3">';
|
||||
$html .= '<label class="form-label" for="label">'.$L->get('RSS URL').'</label>';
|
||||
$html .= '<a href="'.DOMAIN_BASE.'rss.xml">'.DOMAIN_BASE.'rss.xml</a>';
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<label>'.$L->get('RSS URL').'</label>';
|
||||
$html .= '<a href="'.HTML::rssUrl().'">'.HTML::rssUrl().'</a>';
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<label>'.$L->get('Amount of items').'</label>';
|
||||
$html .= '<input id="jsnumberOfItems" name="numberOfItems" type="text" value="'.$this->getValue('numberOfItems').'">';
|
||||
$html .= '<span class="tip">'.$L->get('Amount of items to show on the feed').'</span>';
|
||||
$html .= '</div>';
|
||||
$html = '<div class="mb-3">';
|
||||
$html .= '<label class="form-label" for="numberOfItems">'.$L->get('Number of items').'</label>';
|
||||
$html .= '<input class="form-control" id="numberOfItems" name="numberOfItems" type="text" value="'.$this->getValue('numberOfItems').'">';
|
||||
$html .= '<div class="form-text">'.$L->get('The number of items to display in the feed').'</div>';
|
||||
$html .= '</div>';
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
private function encodeURL($url)
|
||||
{
|
||||
return preg_replace_callback('/[^\x20-\x7f]/', function($match) { return urlencode($match[0]); }, $url);
|
||||
}
|
||||
private function encodeURL($url) {
|
||||
return preg_replace_callback('/[^\x20-\x7f]/', function($match) { return urlencode($match[0]); }, $url);
|
||||
}
|
||||
|
||||
private function createXML()
|
||||
{
|
||||
private function createXML() {
|
||||
global $site;
|
||||
global $pages;
|
||||
global $url;
|
||||
|
||||
// Amount of pages to show
|
||||
// Number of pages to show
|
||||
$numberOfItems = $this->getValue('numberOfItems');
|
||||
|
||||
// Get the list of public pages (sticky and static included)
|
||||
|
@ -96,40 +86,28 @@ class pluginRSS extends Plugin {
|
|||
return $doc->save($this->workspace().'rss.xml');
|
||||
}
|
||||
|
||||
public function install($position=0)
|
||||
{
|
||||
public function install($position=0) {
|
||||
parent::install($position);
|
||||
return $this->createXML();
|
||||
}
|
||||
|
||||
public function post()
|
||||
{
|
||||
parent::post();
|
||||
return $this->createXML();
|
||||
}
|
||||
|
||||
public function afterPageCreate()
|
||||
{
|
||||
public function afterPageCreate() {
|
||||
$this->createXML();
|
||||
}
|
||||
|
||||
public function afterPageModify()
|
||||
{
|
||||
public function afterPageModify() {
|
||||
$this->createXML();
|
||||
}
|
||||
|
||||
public function afterPageDelete()
|
||||
{
|
||||
public function afterPageDelete() {
|
||||
$this->createXML();
|
||||
}
|
||||
|
||||
public function siteHead()
|
||||
{
|
||||
public function siteHead() {
|
||||
return '<link rel="alternate" type="application/rss+xml" href="'.DOMAIN_BASE.'rss.xml" title="RSS Feed">'.PHP_EOL;
|
||||
}
|
||||
|
||||
public function beforeAll()
|
||||
{
|
||||
public function beforeAll() {
|
||||
$webhook = 'rss.xml';
|
||||
if ($this->webhook($webhook)) {
|
||||
// Send XML header
|
||||
|
@ -148,4 +126,5 @@ class pluginRSS extends Plugin {
|
|||
exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue