diff --git a/bl-plugins/version/plugin.php b/bl-plugins/version/plugin.php
index 17d8138b..2448597a 100644
--- a/bl-plugins/version/plugin.php
+++ b/bl-plugins/version/plugin.php
@@ -2,20 +2,63 @@
class pluginVersion extends Plugin {
+ public function init()
+ {
+ $this->dbFields = array(
+ 'showCurrentVersion'=>true,
+ 'newVersionAlert'=>true
+ );
+ }
+
+ public function form()
+ {
+ global $L;
+
+ $html = '
';
+ $html .= $this->description();
+ $html .= '
';
+
+ $html .= '
';
+ $html .= '';
+ $html .= '';
+ $html .= '
';
+
+ $html .= '
';
+ $html .= '';
+ $html .= '';
+ $html .= '
';
+
+ return $html;
+ }
+
public function adminSidebar()
{
global $L;
- $html = 'Version '.(defined('BLUDIT_PRO')?'':'').''.BLUDIT_VERSION.'';
- $html .= ''.$L->get('New version available').' ';
+ $html = '';
+ if ($this->getValue('showCurrentVersion')) {
+ $html = 'Version '.(defined('BLUDIT_PRO')?'':'').''.BLUDIT_VERSION.'';
+ }
+ if ($this->getValue('newVersionAlert')) {
+ $html .= ''.$L->get('New version available').' ';
+ }
return $html;
}
public function adminBodyEnd()
{
- // The follow Javascript get via AJAX the information about new versions
- // The script is on /bl-plugins/version/js/version.js
- $jsPath = $this->phpPath() . 'js' . DS;
- $scripts = '';
- return $scripts;
+ if ($this->getValue('newVersionAlert')) {
+ // The follow Javascript get via AJAX the information about new versions
+ // The script is on /bl-plugins/version/js/version.js
+ $jsPath = $this->phpPath() . 'js' . DS;
+ $scripts = '';
+ return $scripts;
+ }
+ return false;
}
}
\ No newline at end of file