1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-02 20:57:26 +02:00

minor menu render related problems

This commit is contained in:
secretr
2012-05-04 15:00:33 +00:00
parent e00cc4dbe5
commit 0276b7fd43
2 changed files with 17 additions and 11 deletions

View File

@@ -5,17 +5,21 @@ function plugin_shortcode($parm = '')
{ {
$tp = e107::getParser(); $tp = e107::getParser();
@list($menu,$parms) = explode('|',$parm.'|'); @list($menu,$parms) = explode('|',$parm.'|', 2);
$path = $tp -> toDB(dirname($menu)); $path = $tp->toDB(dirname($menu));
$name = $tp -> toDB(basename($menu)); $name = $tp->toDB(basename($menu));
if($path == '.') if($path == '.')
{ {
$path = $menu; $path = $menu;
} }
/**
* @todo check if plugin is installed when installation required
*/
/** /**
* fixed todo: $mode is provided by the menu itself, return is always true, added optional menu parameters * fixed todo: $mode is provided by the menu itself, return is always true, added optional menu parameters
*/ */
return e107::getMenu()->renderMenu($path,$name,$parms,true); return e107::getMenu()->renderMenu($path,$name, trim($parms, '|'),true);
} }

View File

@@ -263,15 +263,17 @@ class e_menu
} }
else else
{ {
e107::loadLanFiles($mpath); // not sure what would break this, but it's good idea to go away
//e107::loadLanFiles($mpath);
//include once is not an option anymore //include once is not an option anymore
//e107_include will break many old menus (evel globals), so we'll wait for a while... //e107_include will break many old menus (evil globals), so we'll wait for a while...
//e107_include(e_PLUGIN.$mpath."/".$mname.".php"); //e107_include(e_PLUGIN.$mpath."/".$mname.".php");
if(substr($mpath,-1)!='/') //if(substr($mpath,-1)!='/')
{ //{
$mpath .= '/'; // $mpath .= '/';
} //}
$mpath = trim($mpath, '/').'/'; // faster...
$e107_debug ? include(e_PLUGIN.$mpath.$mname.'.php') : @include(e_PLUGIN.$mpath.$mname.'.php'); $e107_debug ? include(e_PLUGIN.$mpath.$mname.'.php') : @include(e_PLUGIN.$mpath.$mname.'.php');
/*if(file_exists(e_PLUGIN.$mpath."/".$mname.".php")) /*if(file_exists(e_PLUGIN.$mpath."/".$mname.".php"))