2011-11-13, 06:39:56
Nothing wrong with including loadtab, provided the following changes will be added also:
in loadtab.php (line 25), add: (this is even better as my solution here: http://get-simple.info/forum/topic/2852/...oadtabphp/)
change function createSideMenu() to(explanation of extra param $pluginid: When creating a sidemenu for a plugin that is displayed as a new tab with loadtab.php, send the $plugin_id to createSideMenu function.)
Only thing left to fix is styling for the active loadtab tab.
in loadtab.php (line 25), add:
Code:
# Set default action
if(!isset($_GET['item'])) $_GET['item'] = $plugin_info[$plugin_id]['load_data'];
change function createSideMenu() to
Code:
function createSideMenu($id,$txt,$pluginid = null){
$class=null;
if (isset($_GET['id']) && $_GET['id'] == $id) {
$class='class="current"';
} else if ($pluginid && $_GET['item'] == $id) {
$class='class="current"';
}
$url = is_null($pluginid) ? 'load.php?id='.$id : 'loadtab.php?id='.$pluginid.'&item='.$id;
echo '<li><a href="'.$url.'" '.$class.' >'.$txt.'</a></li>';
}
Only thing left to fix is styling for the active loadtab tab.