From f60e1bdac6eef3d665e76397ca0e61789a6b33be Mon Sep 17 00:00:00 2001 From: Anaggh S Date: Mon, 15 Jan 2018 18:32:39 +0530 Subject: [PATCH] Fix select box static pages plugin --- bl-plugins/static-pages/plugin.php | 131 +++++++++++++++-------------- 1 file changed, 66 insertions(+), 65 deletions(-) diff --git a/bl-plugins/static-pages/plugin.php b/bl-plugins/static-pages/plugin.php index f580d05f..f267acbe 100644 --- a/bl-plugins/static-pages/plugin.php +++ b/bl-plugins/static-pages/plugin.php @@ -1,79 +1,80 @@ dbFields = array( - 'label'=>'Static Pages', - 'homeLink'=>true - ); - } + public function init() + { + // Fields and default values for the database of this plugin + $this->dbFields = array( + 'label'=>'Static Pages', + 'homeLink'=>true + ); + } - // Method called on the settings of the plugin on the admin area - public function form() - { - global $Language; + // Method called on the settings of the plugin on the admin area + public function form() + { + global $Language; - $html = '
'; - $html .= ''; - $html .= ''; - $html .= ''.$Language->get('This title is almost always used in the sidebar of the site').''; - $html .= '
'; + $html = '
'; + $html .= ''; + $html .= ''; + $html .= ''.$Language->get('This title is almost always used in the sidebar of the site').''; + $html .= '
'; - $html .= '
'; - $html .= ''; - $html .= ''; - $html .= ''.$Language->get('Show the home link on the sidebar').''; - $html .= '
'; + $html .= '
'; + $html .= ''; + $html .= ''; + $html .= ''.$Language->get('Show the home link on the sidebar').''; + $html .= '
'; - return $html; - } + return $html; + } - // Method called on the sidebar of the website - public function siteSidebar() - { - global $Language; - global $Url; - global $Site; - global $dbPages; + // Method called on the sidebar of the website + public function siteSidebar() + { + global $Language; + global $Url; + global $Site; + global $dbPages; - $pages = $dbPages->getStaticDB(true); + $pages = $dbPages->getStaticDB(true); - // HTML for sidebar - $html = '
'; - $html .= '

'.$this->getValue('label').'

'; - $html .= '
'; - $html .= ''; + $html .= '
'; + $html .= '
'; - return $html; - } -} \ No newline at end of file + return $html; + } +}