Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=3931)
LUP: Logout Under Profile
Version 1.0.0 For SMF 2.0.x (Hook, No File Modification)
1. Please do your own backup though every installation is backed up automatically.
2. This mod will unset current logout as top menu and reset it under profile sub-menu.
3. Upon its successful installation, you will be brought to the mod settings page to enable it
4. You can test it in lower version too as IMO it should work just fine. ;)
Thank you for using/testing it.
Yours friendly,
Abu Fahim Ismail.
BSD License. Feel free to modify accordingly but keep author's link if it is in there somewhere. ;)
(http://validator.w3.org/images/valid_icons/valid-xhtml10) (http://jigsaw.w3.org/css-validator/images/vcss)
Pictures:
1. LUP @ Logout Under Profile
2. LUP with CPTTA @ Change Profile Text To Avatar (Float Right) (Mod pending approval)
3. LUP with CPTTA and DMOT @ Default Menu To Top.
Nice mod.
Really should have been this way to begin with. :)
Putting the logout under the profile menu is a neat idea but it means people using the Core theme or other themes that don't expose a dropdown menu won't be able to see it :( (which is why it isn't that way to begin with, and in 2.1 people without JS wouldn't be able to log out at all in that situation)
Delete cookies :P
That's not exactly 'user friendly' is it? ;D
Unfortunately, I am diabetic. Otherwise, I will be eating all the cookies rather than throwing it away. Well, actually, I ate them a lot during the recent festive season though I have been severely warned by my family doctor several times not to. ;)
And yes, they are not user friendly except to default theme or other themes that use dropdown menu. :(
Fortunately most themes in 2.0 are Curve- not Core-based so it shouldn't generally be a problem. But themes like Helios don't do the submenu thing.
Works as intended and no errors in the error log... However... Wouldn't it be possible to have the logout button in both places? I would like to see how it looked like.
That would be rather redundant, wouldn't it?
The purpose of this mod, is to remove it from the main menu, and move it to the Profile sub-menu, thereby clearing room from the main menu.
I don't know that's why I asked xD
There is no problem in asking for me. Basically it is very much possible Ninja. If you want to achieve that, all you need to do is, remove two lines (if isset and unset) in the subs file. But as BurkeKnight said, it is redundant and people won't go for logout in profile sub menu when it is available in the main top menu.
Yeah probably I just wanted to know how it would look like that :) thanks :D
No problem. Glad to be of any assistance.
I've made a Dashboard button on our forum, because we were running out of space in the menu-bar of our theme, with the following code in /Sources/Subs.php.
// Dashboard Button
'dashboard' => array(
'title' => 'Dashboard',
'href' => $scripturl . '?page=dashboard',
'show' => true,
'sub_buttons' => array(
'profile' => array(
'title' => 'Profiel',
'href' => $scripturl . '?action=profile',
'show' => true,
),
'bookmarks' => array(
'title' => 'Bladwijzers',
'href' => $scripturl . '?action=bookmarks',
'show' => true,
),
'help' => array(
'title' => 'Help',
'href' => $scripturl . '?action=help',
'show' => true,
),
'mlist' => array(
'title' => 'Leden',
'href' => $scripturl . '?action=mlist',
'show' => true,
),
'events' => array(
'title' => 'Events',
'href' => $scripturl . '?board=36.0',
'show' => true,
),
'calendar' => array(
'title' => 'Kalender',
'href' => $scripturl . '?action=calendar',
'show' => true,
),
'search' => array(
'title' => 'Uitgebreid zoeken',
'href' => $scripturl . '?action=search;advanced',
'show' => true,
),
),
),
This all means that we don't have a Profile button in the menu anymore, it's now located in our Dashboard.
Would it be possible to use LUP to move the logout to our Dashboard instead of to Profile?
And if the answer is yes, what adjustment in the code would be needed?