Link to Mod (https://custom.simplemachines.org/mods/index.php?mod=3884)
This mod fixes a minor annoyance in the default admin/profile/pm drop menu system, namely the lack of functioning links on the top level tabs.
Installing this mod turns the top level tabs for the admin/profile/PM areas into normal, functioning tabs, just like on the main menu.
This is just a backport of the code that is used in SMF 2.1.
This mod is licensed under the WTFPL (http://www.wtfpl.net/).
If the possibility of seeing profanity means you would prefer to not read the actual license terms, rest assured that you can do whatever you like with this mod's code.
January 09, 2015: Minor bug fix. Thanks to ♦ Ninja ZX-10RR ♦
Does exactly what it says, on the tin.
Nice one, Ant! :)
Took me a little while to see what you meant. So when you click the top level tab, it takes you to the first choice in the dropdown, right?
Yup. It's not a huge deal, but it's just one of those things that bugs people sometimes. People expect buttons to do something. I have no idea why it was decided to make them duds in 2.0.x, since to my way of thinking it makes no more sense than doing the same on the main menu. Hey ho.
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.bkm.cc.nf%2Fthankyou.gif&hash=4bd1cc1515a52d105929d91945a90e391db904da)
Thanks. :D
I had never noticed that slight bug but anyway thank you for the fix :D I love the license XD
This mod can occasionally lead to undefined indexes or invalid arguments for foreach().
Errors such as these:
Quote
Type of error: General
http://vige.altervista.org/forum/index.php?action=profile;u=46
2: Invalid argument supplied for foreach()
File: /Sources/Subs-Menu.php
Line: 237
QuoteType of error: Undefined
http://vige.altervista.org/forum/index.php?action=profile;u=46
8: Undefined index: sections
File: /Sources/Subs-Menu.php
Line: 237
In Subs-Menu the code is
foreach ($menu_context['sections'] as $section_id => $section)
{
foreach ($section['areas'] as $area_id => $area)
{
if (!isset($menu_context['sections'][$section_id]['url']))
{
$menu_context['sections'][$section_id]['url'] = isset($area['url']) ? $area['url'] : $menu_context['base_url'] . ';area=' . $area_id;
break;
}
}
}
Should have been
if (!empty($menu_context['sections']))
{
foreach ($menu_context['sections'] as $section_id => $section)
{
foreach ($section['areas'] as $area_id => $area)
{
if (!isset($menu_context['sections'][$section_id]['url']))
{
$menu_context['sections'][$section_id]['url'] = isset($area['url']) ? $area['url'] : $menu_context['base_url'] . ';area=' . $area_id;
break;
}
}
}
}
Credits to a former dev for this one, he refrains from posting (and I kinda understand him, pretty much), but since you have been very kind to me in the past Ant I would like to help you out if I get the chance, and now I have one :) cheers!
Aha. Good catch. I'll update the package tonight.
Well that was slack. I just got around to applying the bug fix. I blame Christmas. :D
ETA: Good thing I tried this out too. It alerted me to a bug in the theme I'm working on (wasn't compatible with this mod, but is now).