SMF2 rc3
TP 1.0 beta 5-1
This is my testing forum: http://www.test.planetdescent.net/index.php?action=tpmod;dl (http://www.test.planetdescent.net/index.php?action=tpmod;dl)
I've added 'Files' to the SMF menu, when in the files section the highlighting goes back to the home button. I have tried adapting the instructions on how to do this for the forum button, as given in this thread (http://www.tinyportal.net/index.php?topic=32687.msg262531#new). However nothing I've tried works. Here is the code I added to subs.php:
'files' => array(
'title' => 'Files',
'href' => $scripturl . '?action=tpmod;dl',
'show' => true,
'sub_buttons' => array(
'general' => array(
'title' => 'General',
'href' => $scripturl . '?action=tpmod;dl=files',
'show' => true,
),
'd3files' => array(
'title' => 'Descent 3',
'href' => $scripturl . '?action=tpmod;dl=d3files',
'show' => true,
'sub_buttons' => array(
'd3missions' => array(
'title' => 'Descent 3 Missions',
'href' => $scripturl . '?action=tpmod;dl=cat29',
'show' => true,
),
'd3music' => array(
'title' => 'Descent 3 Music',
'href' => $scripturl . '?action=tpmod;dl=cat30',
'show' => true,
),
),
),
'd1d2files' => array(
'title' => 'Descent 1 & 2',
'href' => $scripturl . '?action=tpmod;dl=d1d2files',
'show' => true,
'sub_buttons' => array(
'd1missions' => array(
'title' => 'Descent 1 Missions',
'href' => $scripturl . '?action=tpmod;dl=d1missions',
'show' => true,
),
'd1music' => array(
'title' => 'Descent 1 Music',
'href' => $scripturl . '?action=tpmod;dl=Descent 1 Music',
'show' => true,
),
'd2missions' => array(
'title' => 'Descent 2 Missions',
'href' => $scripturl . '?action=tpmod;dl=cat50',
'show' => true,
),
'd2music' => array(
'title' => 'Descent 2 Music',
'href' => $scripturl . '?action=tpmod;dl=d2Music',
'show' => true,
),
),
),
),
),
Thanks for your help!
You'll have to add in a check for the parameters in the URL. Something like this:
if (isset($_GET['dl']))
$current_action='files';
If you look in the Subs.php file you'll see there are some other similar checks going on below that section of code you posted.
That worked! Thank you very much!