News:

SMF 2.1.2 has been released! Take it for a spin! Read more.

Main Menu

LUP: Logout Under Profile For SMF 2.0.x (Hook Version!)

Started by Hj Ahmad Rasyid Hj Ismail, September 04, 2014, 03:41:03 PM

Previous topic - Next topic

Hj Ahmad Rasyid Hj Ismail

Link to Mod

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. ;)

 

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.

Burke ♞ Knight

Nice mod.
Really should have been this way to begin with. :)

Arantor

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)

margarett

Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Arantor


Hj Ahmad Rasyid Hj Ismail

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. :(

Arantor

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.

Ninja ZX-10RR

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.
Quote from: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

Burke ♞ Knight

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.

Ninja ZX-10RR

Quote from: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

Hj Ahmad Rasyid Hj Ismail

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.

Ninja ZX-10RR

Yeah probably I just wanted to know how it would look like that :) thanks :D
Quote from: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

Hj Ahmad Rasyid Hj Ismail


Dwev

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?

Advertisement: