Menu Help

Post Reply
nhaas
Posts: 8
Joined: Tue Jul 12, 2022 12:31 am
Contact:

Menu Help

Post by nhaas »

So I have created a new Tab for a idea that I have. I successfully created a manager tab, but when I select the Manager Tab, the Settings tab stays highlighted.... along with the Manger Tab. What am I missing?
manager tab
manager tab
manager.PNG (4.03 KiB) Viewed 211 times
Let me know if I should upload the admin.php file.

Thank you
User avatar
captquirk
Site Admin
Posts: 208
Joined: Sun Apr 09, 2017 8:49 pm
Location: Arizona, USA
Contact:

Re: Menu Help

Post by captquirk »

At the bottom of admin.php, you need to create a new "case" for the new tab.
Near the top of admin.php, you need a new array for the manager functions. Right after the arrays for different tab functions is a group of "if array key exists" statements. You need to integrate the new tab into that.
nhaas
Posts: 8
Joined: Tue Jul 12, 2022 12:31 am
Contact:

Re: Menu Help

Post by nhaas »

TOP (Line 66)
//add manager
$manager_funcs = Array ("manager" => "default");
//end manager

LINE 95 IF Array
/////ADD manager
if (array_key_exists($f, $manager_funcs) ) {
$manager_funcs[$f] = "selected";
} else {
$manager_funcs[$f] = "default";
}
////END Add manager

Line 138 <li><a href='admin.php?f=manager' class='".$manager_funcs[$f]."'>Manager</a></li>

BOTTOM

case 'manager':
include 'manager.php';
break;
nhaas
Posts: 8
Joined: Tue Jul 12, 2022 12:31 am
Contact:

Re: Menu Help

Post by nhaas »

I Found my error,--> $settings_funcs = Array ("manager" => "default"); Correct line is: $manager_funcs = Array ("manager" => "default");
User avatar
captquirk
Site Admin
Posts: 208
Joined: Sun Apr 09, 2017 8:49 pm
Location: Arizona, USA
Contact:

Re: Menu Help

Post by captquirk »

Editing admin.php is a real adventure!
:lol: :lol:
Post Reply