Skip to main content
Topic: Add a menu mode (Read 6185 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Add a menu mode

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!


Re: Add a menu mode

Reply #2

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.

Re: Add a menu mode

Reply #3

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.

Re: Add a menu mode

Reply #4

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
sorry for my bad english