ElkArte Community

Project Support => Support => Topic started by: TaliaJoy on November 02, 2019, 09:36:35 pm

Title: Add a menu mode
Post by: TaliaJoy on November 02, 2019, 09:36:35 pm
What's the best way to add a new top menu item (i.e. to the section that hast the options Community, My Messages, Notifications, New Posts, New Replies)? I found a couple of threads relevant to this (https://www.elkarte.net/community/index.php?topic=5158 and https://www.elkarte.net/community/index.php?topic=3106), but they're pretty old and/or non-specific. I am not experienced in PHP programming (though I know really basic stuff), so if it requires that, you'll have to be pretty specific as to what I should do. Thanks!
Title: Re: Add a menu mode
Post by: badmonkey on November 02, 2019, 10:05:49 pm
Here's an Elkarte addon that should do what you want.  Good luck!

https://addons.elkarte.net/enhancement/Ultimate-Menu.html
Title: Re: Add a menu mode
Post by: TaliaJoy on November 03, 2019, 12:20:07 am
I saw that, but it doesn't look like it's been updated for ElkArte 1.1.x? I guess I could try it anyway.
Title: Re: Add a menu mode
Post by: badmonkey on November 03, 2019, 03:36:09 am
Quote from: TaliaJoy – I saw that, but it doesn't look like it's been updated for ElkArte 1.1.x? I guess I could try it anyway.
 
 It's hook based rather than requiring code edits, so it should work. Just be mindful of installation errors. If there are none you should be golden.
Title: Re: Add a menu mode
Post by: radu81 on November 03, 2019, 09:57:00 am
It all depends on your needs, if you need to add and update often the menu entries you probably nedd and add-on, if you only need to add an entry to menu and forget about it just edit the file sources/subs/Menu.subs.php.

here an example, I added the entry "Guide" which points to mydomain/index.php?page=guide_e_tutorial,  just after the Likes Stats:

find:
Code: [Select]
				'like_stats' => array(
'title' => $txt['like_post_stats'],
'href' => $scripturl . '?action=likes;sa=likestats',
'show' => !empty($modSettings['likes_enabled']) && allowedTo('like_posts_stats'),
),

and add after:
Code: [Select]
				'custom_link_guide' => array(
'title' => 'Guide e tutorial',
'href' => $scripturl . '?page=guide_e_tutorial',
'show' => true,
),

sources/subs/Menu.subs.php only for Elkarte 1.1.x
sources/Subs.php for Elkarte 1.0.x
Title: Re: Add a menu mode
Post by: TaliaJoy on November 04, 2019, 09:53:37 pm
Thanks for the tips, guys. I'll try them out later. :)