diff --git a/e107_admin/plugin.php b/e107_admin/plugin.php
index fefe9c000..5246cd886 100644
--- a/e107_admin/plugin.php
+++ b/e107_admin/plugin.php
@@ -11,8 +11,8 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_admin/plugin.php,v $
-| $Revision: 1.43 $
-| $Date: 2009-09-10 15:39:09 $
+| $Revision: 1.44 $
+| $Date: 2009-09-19 17:43:18 $
| $Author: e107coders $
+----------------------------------------------------------------------------+
*/
@@ -754,6 +754,7 @@ class pluginManager{
global $tp, $plugin, $frm;
if (empty($pluginList)) return '';
+
$text = "";
@@ -770,6 +771,12 @@ class pluginManager{
{
$plug_vars = $plugin->plug_vars;
}
+
+ if(varset($plug['plugin_category']) == "menu") // Hide "Menu Only" plugins.
+ {
+ continue;
+ }
+
if($plug_vars)
{
diff --git a/e107_files/shortcode/batch/siteinfo_shortcodes.php b/e107_files/shortcode/batch/siteinfo_shortcodes.php
deleted file mode 100644
index d9bac764d..000000000
--- a/e107_files/shortcode/batch/siteinfo_shortcodes.php
+++ /dev/null
@@ -1,92 +0,0 @@
-tp->replaceConstants($_POST['sitebutton']) : (strstr(SITEBUTTON, 'http:') ? SITEBUTTON : e_IMAGE.SITEBUTTON);
- //TODO use CSS class?
- return '
';
- }
-
- function sc_sitedisclaimer()
- {
- $e107 = e107::getInstance();
- return $e107->tp->toHtml(SITEDISCLAIMER, true, 'constants defs');
- }
-
- function sc_sitename($parm)
- {
- return ($parm == 'link') ? "".SITENAME."" : SITENAME;
- }
-
- function sc_sitedescription()
- {
- global $pref;
- return SITEDESCRIPTION.(defined('THEME_DESCRIPTION') && $pref['displaythemeinfo'] ? THEME_DESCRIPTION : '');
- }
-
- function sc_sitetag()
- {
- return SITETAG;
- }
-
- function sc_logo($parm)
- {
- parse_str($parm); // Optional {LOGO=file=file_name} or {LOGO=link=url} or {LOGO=file=file_name&link=url}
- // Paths to image file, link are relative to site base
-
- if (isset($file) && $file && is_readable($file))
- {
- $logo = e_HTTP.$file; // HTML path
- $path = e_BASE.$file; // PHP path
- }
- else if (is_readable(THEME.'images/e_logo.png'))
- {
- $logo = THEME_ABS.'images/e_logo.png'; // HTML path
- $path = THEME.'images/e_logo.png'; // PHP path
- }
- else
- {
- $logo = e_IMAGE_ABS.'logo.png'; // HTML path
- $path = e_IMAGE.'logo.png'; // PHP path
- }
-
- $dimensions = getimagesize($path);
-
- $image = "
\n";
-
- if (isset($link) && $link)
- {
- if ($link == 'index')
- {
- $image = "".$image."";
- }
- else
- {
- $image = "".$image."";
- }
- }
-
- return $image;
- }
-
- function sc_theme_disclaimer($parm)
- {
- global $pref;
- return (defined('THEME_DISCLAIMER') && $pref['displaythemeinfo'] ? THEME_DISCLAIMER : '');
- }
-
-}
-?>
\ No newline at end of file
diff --git a/e107_handlers/menumanager_class.php b/e107_handlers/menumanager_class.php
index 94af89e4a..7e7f6f28b 100644
--- a/e107_handlers/menumanager_class.php
+++ b/e107_handlers/menumanager_class.php
@@ -10,9 +10,9 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_handlers/menumanager_class.php,v $
-| $Revision: 1.7 $
-| $Date: 2009-08-25 08:29:47 $
-| $Author: secretr $
+| $Revision: 1.8 $
+| $Date: 2009-09-19 17:43:19 $
+| $Author: e107coders $
+----------------------------------------------------------------------------+
*/
if (!defined('e107_INIT')) { exit; }
@@ -355,6 +355,7 @@ class e_menuManager {
$efile = new e_file;
$efile->dirFilter = array('/', 'CVS', '.svn', 'languages');
$fileList = $efile->get_files(e_PLUGIN,"_menu\.php$",'standard',2);
+
foreach($fileList as $file)
{
@@ -365,7 +366,7 @@ class e_menuManager {
$existing_menu = $sql->db_Count("menus", "(*)", "WHERE menu_name='{$file['fname']}'");
if (file_exists(e_PLUGIN.$parent_dir.'/plugin.xml') || file_exists(e_PLUGIN.$parent_dir.'/plugin.php'))
{
- if (plugInstalled($parent_dir))
+ if (e107::isInstalled($parent_dir))
{ // Its a 'new style' plugin with a plugin.php file, or an even newer one with plugin.xml file - only include if plugin installed
$valid_menu = TRUE; // Whether new or existing, include in list
// echo "Include {$parent_dir}:{$file['fname']}
";
diff --git a/e107_handlers/plugin_class.php b/e107_handlers/plugin_class.php
index d6b32526f..b602440ba 100644
--- a/e107_handlers/plugin_class.php
+++ b/e107_handlers/plugin_class.php
@@ -11,8 +11,8 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_handlers/plugin_class.php,v $
-| $Revision: 1.89 $
-| $Date: 2009-09-18 23:14:00 $
+| $Revision: 1.90 $
+| $Date: 2009-09-19 17:43:19 $
| $Author: e107coders $
+----------------------------------------------------------------------------+
*/
@@ -87,7 +87,7 @@ class e107plugin
'plugin_category' // Plugin Category: settings, users, content, management, tools, misc, about
);
- var $accepted_categories = array('settings', 'users', 'content', 'tools', 'manage', 'misc', 'about');
+ var $accepted_categories = array('settings', 'users', 'content', 'tools', 'manage', 'misc', 'menu', 'about');
var $plug_vars;
var $current_plug;
diff --git a/e107_handlers/shortcode_handler.php b/e107_handlers/shortcode_handler.php
index 88eb7744e..eab5420e9 100644
--- a/e107_handlers/shortcode_handler.php
+++ b/e107_handlers/shortcode_handler.php
@@ -9,8 +9,8 @@
* e107 Shortcode handler
*
* $Source: /cvs_backup/e107_0.8/e107_handlers/shortcode_handler.php,v $
- * $Revision: 1.30 $
- * $Date: 2009-09-18 22:20:39 $
+ * $Revision: 1.31 $
+ * $Date: 2009-09-19 17:43:19 $
* $Author: e107coders $
*/
@@ -129,11 +129,25 @@ class e_shortcode
function e_shortcode($noload=false)
{
- global $pref, $register_sc;
+ global $pref;
- $this->parseSCFiles = true; // Default probably never used, but make sure its defined.
+ $this->parseSCFiles = true; // Default probably never used, but make sure its defined.
- //Register any shortcode from the shortcode/override/ directory
+ $this->loadOverrideShortcodes();
+ $this->loadThemeShortcodes();
+ $this->loadPluginShortcodes();
+ $this->loadPluginSCFiles();
+
+ }
+
+ /**
+ * Register any shortcode from the shortcode/override/ directory
+ * @return
+ */
+ protected function loadOverrideShortcodes()
+ {
+ $pref = e107::getConfig('core')->getPref();
+
if(varset($pref['sc_override']))
{
$tmp = explode(',', $pref['sc_override']);
@@ -143,10 +157,18 @@ class e_shortcode
$this->registered_codes[$code]['type'] = 'override';
$this->scOverride[] = $code;
}
- }
-
- // Register any shortcodes that were registered by the theme
- // $register_sc[] = 'MY_THEME_CODE'
+ }
+ }
+
+ /**
+ * Register any shortcodes that were registered by the theme
+ * $register_sc[] = 'MY_THEME_CODE'
+ * @return
+ */
+ protected function loadThemeShortcodes()
+ {
+ global $register_sc;
+
if(isset($register_sc) && is_array($register_sc))
{
foreach($register_sc as $code)
@@ -157,12 +179,18 @@ class e_shortcode
$this->registered_codes[$code]['type'] = 'theme';
}
}
- }
-
-
- $this->loadPluginShortcodes();
+ }
+ }
+
+
+ /**
+ * Register all .sc files found in plugin directories (via pref)
+ * @return
+ */
+ protected function loadPluginSCFiles()
+ {
+ $pref = e107::getConfig('core')->getPref();
- // Register all .sc files found in plugin directories (via pref)
if(varset($pref['shortcode_list'], '') != '')
{
foreach($pref['shortcode_list'] as $path => $namearray)
@@ -185,14 +213,17 @@ class e_shortcode
}
}
}
- }
+ }
}
+
+
+
/**
- * Load Plugin Shortcode Batch files (e_shortcode.php) for use site-wide.
+ * Register Plugin Shortcode Batch files (e_shortcode.php) for use site-wide.
* Equivalent to multiple .sc files in the plugin's folder.
* @return
*/
- function loadPluginShortcodes()
+ protected function loadPluginShortcodes()
{
$pref = e107::getConfig('core')->getPref();
@@ -203,7 +234,7 @@ class e_shortcode
foreach($pref['e_shortcode_list'] as $key=>$val)
{
- if(!e107::isInstalled($key) || !include_once(e_PLUGIN.$key.'/e_shortcode.php'))
+ if(!include_once(e_PLUGIN.$key.'/e_shortcode.php'))
{
continue;
}
@@ -227,9 +258,13 @@ class e_shortcode
}
}
+ /**
+ * Register Core Shortcode Batches.
+ * @return
+ */
function loadCoreShortcodes()
{
- $coreBatchList = array('siteinfo_shortcodes.php', 'admin_shortcodes.php');
+ $coreBatchList = array('admin_shortcodes.php');
foreach($coreBatchList as $cb)
{
include_once(e_FILE.'shortcode/batch/'.$cb);