Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: NexusXENU on December 10, 2018, 08:53:29 PM

Title: How can I edit the main menu buttons?
Post by: NexusXENU on December 10, 2018, 08:53:29 PM
Hello,

I'm looking for a way to edit the main menu buttons and adding new buttons. is there a mod for it?

Picture for explanation:

(https://i.imgur.com/VtAd3FC.png)
Title: Re: How can I edit the main menu buttons?
Post by: Kindred on December 10, 2018, 09:46:11 PM
https://wiki.simplemachines.org/smf/Buttons_-_How_do_I_add_buttons_to_SMF_2.0
Title: Re: How can I edit the main menu buttons?
Post by: NexusXENU on December 12, 2018, 04:22:59 AM
Quote from: Kindred on December 10, 2018, 09:46:11 PM
https://wiki.simplemachines.org/smf/Buttons_-_How_do_I_add_buttons_to_SMF_2.0

Is that the only way? There is no mod for it? Thanks
Title: Re: How can I edit the main menu buttons?
Post by: Arantor on December 12, 2018, 05:06:45 AM
There are mods for it but they have other side effects and don't play nicely with other mods that may add to the menu.
Title: Re: How can I edit the main menu buttons?
Post by: NexusXENU on December 12, 2018, 03:33:21 PM
Quote from: Arantor on December 12, 2018, 05:06:45 AM
There are mods for it but they have other side effects and don't play nicely with other mods that may add to the menu.

And if i edit the menu buttons with the guide, it will not have side effects?
Title: Re: How can I edit the main menu buttons?
Post by: Arantor on December 12, 2018, 03:48:57 PM
Nope. If you can tell us what you're trying to do we can help you with it.
Title: Re: How can I edit the main menu buttons?
Post by: live627 on December 13, 2018, 12:31:18 PM
Topic split
Title: Re: How can I edit the main menu buttons?
Post by: NexusXENU on December 16, 2018, 02:54:33 PM
Quote from: Arantor on December 12, 2018, 03:48:57 PM
Nope. If you can tell us what you're trying to do we can help you with it.

I want the main menu to have these buttons (order from left to right):
1. Home Button
2. Register Button (with a link to a topic with register options in the forum) **not forum register**
3. Download Button (with a link to a topic with download the forum)
4. Admin Button
5. Profile Button
6. Messages Button
7. Logout Button

I also want to make the buttons with a text easier to read and bold.

How can I do it?
Title: Re: How can I edit the main menu buttons?
Post by: Arantor on December 16, 2018, 04:03:47 PM
You could always give me the URLs in question so I can write the PHP code you'll need...
Title: Re: How can I edit the main menu buttons?
Post by: Kindred on December 16, 2018, 04:54:20 PM
regarding the menu text....   that is determined by CSS. You can adjust the CSS as you need to in the theme's css file.
Title: Re: How can I edit the main menu buttons?
Post by: Arantor on December 16, 2018, 05:45:05 PM
Quote from: Kindred on December 16, 2018, 04:54:20 PM
regarding the menu text....   that is determined by CSS. You can adjust the CSS as you need to in the theme's css file.

Is it?? News to me.
Title: Re: How can I edit the main menu buttons?
Post by: Gwenwyfar on December 16, 2018, 06:02:39 PM
I think Kindred meant for the "text easier to read and bold" part.
Title: Re: How can I edit the main menu buttons?
Post by: NexusXENU on December 17, 2018, 06:16:56 AM
Quote from: Arantor on December 16, 2018, 04:03:47 PM
You could always give me the URLs in question so I can write the PHP code you'll need...

MagicPT.net
Title: Re: How can I edit the main menu buttons?
Post by: Arantor on December 17, 2018, 07:26:18 AM
I need all of them... you want to link to a topic... what topic?
Title: Re: How can I edit the main menu buttons?
Post by: NexusXENU on December 17, 2018, 12:51:29 PM
Quote from: Arantor on December 17, 2018, 07:26:18 AM
I need all of them... you want to link to a topic... what topic?

Links:
Register Board: magicpt.net/index.php?board=3.0
Download Board: magicpt.net/index.php?board=2.0
Title: Re: How can I edit the main menu buttons?
Post by: Arantor on December 17, 2018, 01:35:35 PM
Should the login button be left on the board for logged out users? Should logged in users see the register link?
Title: Re: How can I edit the main menu buttons?
Post by: NexusXENU on December 17, 2018, 03:45:20 PM
Quote from: Arantor on December 17, 2018, 01:35:35 PM
Should the login button be left on the board for logged out users? Should logged in users see the register link?

logged out users should see these buttons (from left to right):
Home
Login
Register (forum registration)
Facebook (leads to this address: facebook.com/MagicPT)

----------------------

Logged in users should see:

1. Home Button
2. Register Button (with a link to this board: magicpt.net/index.php?board=3.0) **not forum register**
3. Download Button (with a link to this board: magicpt.net/index.php?board=2.0)
4. Admin Button
5. Profile Button
6. Messages Button
7. Logout Button



Title: Re: How can I edit the main menu buttons?
Post by: Arantor on December 17, 2018, 05:13:16 PM
Hmm, you really know how to make it complicated. Note that going to the specific board will not magically highlight the items on the menu like that, that will require *much* more deftness than I've put in here. Maybe if work lets up I might figure out how to do that. Note that I have as per your outline removed the moderate menu, hope you don't need it.

Sources/Subs.php

Code (find) Select
$buttons = array(
'home' => array(
'title' => $txt['home'],
'href' => $scripturl,
'show' => true,
'sub_buttons' => array(
),
'is_last' => $context['right_to_left'],
),
'help' => array(
'title' => $txt['help'],
'href' => $scripturl . '?action=help',
'show' => true,
'sub_buttons' => array(
),
),
'search' => array(
'title' => $txt['search'],
'href' => $scripturl . '?action=search',
'show' => $context['allow_search'],
'sub_buttons' => array(
),
),
'admin' => array(
'title' => $txt['admin'],
'href' => $scripturl . '?action=admin',
'show' => $context['allow_admin'],
'sub_buttons' => array(
'featuresettings' => array(
'title' => $txt['modSettings_title'],
'href' => $scripturl . '?action=admin;area=featuresettings',
'show' => allowedTo('admin_forum'),
),
'packages' => array(
'title' => $txt['package'],
'href' => $scripturl . '?action=admin;area=packages',
'show' => allowedTo('admin_forum'),
),
'errorlog' => array(
'title' => $txt['errlog'],
'href' => $scripturl . '?action=admin;area=logs;sa=errorlog;desc',
'show' => allowedTo('admin_forum') && !empty($modSettings['enableErrorLogging']),
),
'permissions' => array(
'title' => $txt['edit_permissions'],
'href' => $scripturl . '?action=admin;area=permissions',
'show' => allowedTo('manage_permissions'),
'is_last' => true,
),
),
),
'moderate' => array(
'title' => $txt['moderate'],
'href' => $scripturl . '?action=moderate',
'show' => $context['allow_moderation_center'],
'sub_buttons' => array(
'modlog' => array(
'title' => $txt['modlog_view'],
'href' => $scripturl . '?action=moderate;area=modlog',
'show' => !empty($modSettings['modlog_enabled']) && !empty($user_info['mod_cache']) && $user_info['mod_cache']['bq'] != '0=1',
),
'poststopics' => array(
'title' => $txt['mc_unapproved_poststopics'],
'href' => $scripturl . '?action=moderate;area=postmod;sa=posts',
'show' => $modSettings['postmod_active'] && !empty($user_info['mod_cache']['ap']),
),
'attachments' => array(
'title' => $txt['mc_unapproved_attachments'],
'href' => $scripturl . '?action=moderate;area=attachmod;sa=attachments',
'show' => $modSettings['postmod_active'] && !empty($user_info['mod_cache']['ap']),
),
'reports' => array(
'title' => $txt['mc_reported_posts'],
'href' => $scripturl . '?action=moderate;area=reports',
'show' => !empty($user_info['mod_cache']) && $user_info['mod_cache']['bq'] != '0=1',
'is_last' => true,
),
),
),
'profile' => array(
'title' => $txt['profile'],
'href' => $scripturl . '?action=profile',
'show' => $context['allow_edit_profile'],
'sub_buttons' => array(
'summary' => array(
'title' => $txt['summary'],
'href' => $scripturl . '?action=profile',
'show' => true,
),
'account' => array(
'title' => $txt['account'],
'href' => $scripturl . '?action=profile;area=account',
'show' => allowedTo(array('profile_identity_any', 'profile_identity_own', 'manage_membergroups')),
),
'profile' => array(
'title' => $txt['forumprofile'],
'href' => $scripturl . '?action=profile;area=forumprofile',
'show' => allowedTo(array('profile_extra_any', 'profile_extra_own')),
'is_last' => true,
),
),
),
'pm' => array(
'title' => $txt['pm_short'],
'href' => $scripturl . '?action=pm',
'show' => $context['allow_pm'],
'sub_buttons' => array(
'pm_read' => array(
'title' => $txt['pm_menu_read'],
'href' => $scripturl . '?action=pm',
'show' => allowedTo('pm_read'),
),
'pm_send' => array(
'title' => $txt['pm_menu_send'],
'href' => $scripturl . '?action=pm;sa=send',
'show' => allowedTo('pm_send'),
'is_last' => true,
),
),
),
'calendar' => array(
'title' => $txt['calendar'],
'href' => $scripturl . '?action=calendar',
'show' => $context['allow_calendar'],
'sub_buttons' => array(
'view' => array(
'title' => $txt['calendar_menu'],
'href' => $scripturl . '?action=calendar',
'show' => allowedTo('calendar_post'),
),
'post' => array(
'title' => $txt['calendar_post_event'],
'href' => $scripturl . '?action=calendar;sa=post',
'show' => allowedTo('calendar_post'),
'is_last' => true,
),
),
),
'mlist' => array(
'title' => $txt['members_title'],
'href' => $scripturl . '?action=mlist',
'show' => $context['allow_memberlist'],
'sub_buttons' => array(
'mlist_view' => array(
'title' => $txt['mlist_menu_view'],
'href' => $scripturl . '?action=mlist',
'show' => true,
),
'mlist_search' => array(
'title' => $txt['mlist_search'],
'href' => $scripturl . '?action=mlist;sa=search',
'show' => true,
'is_last' => true,
),
),
),
'login' => array(
'title' => $txt['login'],
'href' => $scripturl . '?action=login',
'show' => $user_info['is_guest'],
'sub_buttons' => array(
),
),
'register' => array(
'title' => $txt['register'],
'href' => $scripturl . '?action=register',
'show' => $user_info['is_guest'],
'sub_buttons' => array(
),
'is_last' => !$context['right_to_left'],
),
'logout' => array(
'title' => $txt['logout'],
'href' => $scripturl . '?action=logout;%1$s=%2$s',
'show' => !$user_info['is_guest'],
'sub_buttons' => array(
),
'is_last' => !$context['right_to_left'],
),
);


Code (replace) Select
$buttons = array(
'home' => array(
'title' => $txt['home'],
'href' => $scripturl,
'show' => true,
'sub_buttons' => array(
),
'is_last' => $context['right_to_left'],
),
'register_loggedin' => array(
'title' => $txt['register'],
'href' => $scripturl . '?board=3.0',
'show' => !$user_info['is_guest'],
'sub_buttons' => array(
),
),
'download' => array(
'title' => 'Download',
'href' => $scripturl . '?board=2.0',
'show' => !$user_info['is_guest'],
'sub_buttons' => array(
),
),
'admin' => array(
'title' => $txt['admin'],
'href' => $scripturl . '?action=admin',
'show' => $context['allow_admin'],
'sub_buttons' => array(
'featuresettings' => array(
'title' => $txt['modSettings_title'],
'href' => $scripturl . '?action=admin;area=featuresettings',
'show' => allowedTo('admin_forum'),
),
'packages' => array(
'title' => $txt['package'],
'href' => $scripturl . '?action=admin;area=packages',
'show' => allowedTo('admin_forum'),
),
'errorlog' => array(
'title' => $txt['errlog'],
'href' => $scripturl . '?action=admin;area=logs;sa=errorlog;desc',
'show' => allowedTo('admin_forum') && !empty($modSettings['enableErrorLogging']),
),
'permissions' => array(
'title' => $txt['edit_permissions'],
'href' => $scripturl . '?action=admin;area=permissions',
'show' => allowedTo('manage_permissions'),
'is_last' => true,
),
),
),
'profile' => array(
'title' => $txt['profile'],
'href' => $scripturl . '?action=profile',
'show' => $context['allow_edit_profile'],
'sub_buttons' => array(
'summary' => array(
'title' => $txt['summary'],
'href' => $scripturl . '?action=profile',
'show' => true,
),
'account' => array(
'title' => $txt['account'],
'href' => $scripturl . '?action=profile;area=account',
'show' => allowedTo(array('profile_identity_any', 'profile_identity_own', 'manage_membergroups')),
),
'profile' => array(
'title' => $txt['forumprofile'],
'href' => $scripturl . '?action=profile;area=forumprofile',
'show' => allowedTo(array('profile_extra_any', 'profile_extra_own')),
'is_last' => true,
),
),
),
'pm' => array(
'title' => $txt['pm_short'],
'href' => $scripturl . '?action=pm',
'show' => $context['allow_pm'],
'sub_buttons' => array(
'pm_read' => array(
'title' => $txt['pm_menu_read'],
'href' => $scripturl . '?action=pm',
'show' => allowedTo('pm_read'),
),
'pm_send' => array(
'title' => $txt['pm_menu_send'],
'href' => $scripturl . '?action=pm;sa=send',
'show' => allowedTo('pm_send'),
'is_last' => true,
),
),
),
'login' => array(
'title' => $txt['login'],
'href' => $scripturl . '?action=login',
'show' => $user_info['is_guest'],
'sub_buttons' => array(
),
),
'register_loggeout' => array(
'title' => $txt['register'],
'href' => $scripturl . '?board=3.0',
'show' => $user_info['is_guest'],
'sub_buttons' => array(
),
),
'facebook' => array(
'title' => 'Facebook',
'href' => 'https://facebook.com/MagicPT',
'show' => $user_info['is_guest'],
'sub_buttons' => array(
),
'is_last' => !$context['right_to_left'],
),
'logout' => array(
'title' => $txt['logout'],
'href' => $scripturl . '?action=logout;%1$s=%2$s',
'show' => !$user_info['is_guest'],
'sub_buttons' => array(
),
'is_last' => !$context['right_to_left'],
),
);
Title: Re: How can I edit the main menu buttons?
Post by: NexusXENU on December 17, 2018, 06:31:51 PM
Quote from: Arantor on December 17, 2018, 05:13:16 PM
Hmm, you really know how to make it complicated. Note that going to the specific board will not magically highlight the items on the menu like that, that will require *much* more deftness than I've put in here. Maybe if work lets up I might figure out how to do that. Note that I have as per your outline removed the moderate menu, hope you don't need it.

Sources/Subs.php

Code (find) Select
$buttons = array(
'home' => array(
'title' => $txt['home'],
'href' => $scripturl,
'show' => true,
'sub_buttons' => array(
),
'is_last' => $context['right_to_left'],
),
'help' => array(
'title' => $txt['help'],
'href' => $scripturl . '?action=help',
'show' => true,
'sub_buttons' => array(
),
),
'search' => array(
'title' => $txt['search'],
'href' => $scripturl . '?action=search',
'show' => $context['allow_search'],
'sub_buttons' => array(
),
),
'admin' => array(
'title' => $txt['admin'],
'href' => $scripturl . '?action=admin',
'show' => $context['allow_admin'],
'sub_buttons' => array(
'featuresettings' => array(
'title' => $txt['modSettings_title'],
'href' => $scripturl . '?action=admin;area=featuresettings',
'show' => allowedTo('admin_forum'),
),
'packages' => array(
'title' => $txt['package'],
'href' => $scripturl . '?action=admin;area=packages',
'show' => allowedTo('admin_forum'),
),
'errorlog' => array(
'title' => $txt['errlog'],
'href' => $scripturl . '?action=admin;area=logs;sa=errorlog;desc',
'show' => allowedTo('admin_forum') && !empty($modSettings['enableErrorLogging']),
),
'permissions' => array(
'title' => $txt['edit_permissions'],
'href' => $scripturl . '?action=admin;area=permissions',
'show' => allowedTo('manage_permissions'),
'is_last' => true,
),
),
),
'moderate' => array(
'title' => $txt['moderate'],
'href' => $scripturl . '?action=moderate',
'show' => $context['allow_moderation_center'],
'sub_buttons' => array(
'modlog' => array(
'title' => $txt['modlog_view'],
'href' => $scripturl . '?action=moderate;area=modlog',
'show' => !empty($modSettings['modlog_enabled']) && !empty($user_info['mod_cache']) && $user_info['mod_cache']['bq'] != '0=1',
),
'poststopics' => array(
'title' => $txt['mc_unapproved_poststopics'],
'href' => $scripturl . '?action=moderate;area=postmod;sa=posts',
'show' => $modSettings['postmod_active'] && !empty($user_info['mod_cache']['ap']),
),
'attachments' => array(
'title' => $txt['mc_unapproved_attachments'],
'href' => $scripturl . '?action=moderate;area=attachmod;sa=attachments',
'show' => $modSettings['postmod_active'] && !empty($user_info['mod_cache']['ap']),
),
'reports' => array(
'title' => $txt['mc_reported_posts'],
'href' => $scripturl . '?action=moderate;area=reports',
'show' => !empty($user_info['mod_cache']) && $user_info['mod_cache']['bq'] != '0=1',
'is_last' => true,
),
),
),
'profile' => array(
'title' => $txt['profile'],
'href' => $scripturl . '?action=profile',
'show' => $context['allow_edit_profile'],
'sub_buttons' => array(
'summary' => array(
'title' => $txt['summary'],
'href' => $scripturl . '?action=profile',
'show' => true,
),
'account' => array(
'title' => $txt['account'],
'href' => $scripturl . '?action=profile;area=account',
'show' => allowedTo(array('profile_identity_any', 'profile_identity_own', 'manage_membergroups')),
),
'profile' => array(
'title' => $txt['forumprofile'],
'href' => $scripturl . '?action=profile;area=forumprofile',
'show' => allowedTo(array('profile_extra_any', 'profile_extra_own')),
'is_last' => true,
),
),
),
'pm' => array(
'title' => $txt['pm_short'],
'href' => $scripturl . '?action=pm',
'show' => $context['allow_pm'],
'sub_buttons' => array(
'pm_read' => array(
'title' => $txt['pm_menu_read'],
'href' => $scripturl . '?action=pm',
'show' => allowedTo('pm_read'),
),
'pm_send' => array(
'title' => $txt['pm_menu_send'],
'href' => $scripturl . '?action=pm;sa=send',
'show' => allowedTo('pm_send'),
'is_last' => true,
),
),
),
'calendar' => array(
'title' => $txt['calendar'],
'href' => $scripturl . '?action=calendar',
'show' => $context['allow_calendar'],
'sub_buttons' => array(
'view' => array(
'title' => $txt['calendar_menu'],
'href' => $scripturl . '?action=calendar',
'show' => allowedTo('calendar_post'),
),
'post' => array(
'title' => $txt['calendar_post_event'],
'href' => $scripturl . '?action=calendar;sa=post',
'show' => allowedTo('calendar_post'),
'is_last' => true,
),
),
),
'mlist' => array(
'title' => $txt['members_title'],
'href' => $scripturl . '?action=mlist',
'show' => $context['allow_memberlist'],
'sub_buttons' => array(
'mlist_view' => array(
'title' => $txt['mlist_menu_view'],
'href' => $scripturl . '?action=mlist',
'show' => true,
),
'mlist_search' => array(
'title' => $txt['mlist_search'],
'href' => $scripturl . '?action=mlist;sa=search',
'show' => true,
'is_last' => true,
),
),
),
'login' => array(
'title' => $txt['login'],
'href' => $scripturl . '?action=login',
'show' => $user_info['is_guest'],
'sub_buttons' => array(
),
),
'register' => array(
'title' => $txt['register'],
'href' => $scripturl . '?action=register',
'show' => $user_info['is_guest'],
'sub_buttons' => array(
),
'is_last' => !$context['right_to_left'],
),
'logout' => array(
'title' => $txt['logout'],
'href' => $scripturl . '?action=logout;%1$s=%2$s',
'show' => !$user_info['is_guest'],
'sub_buttons' => array(
),
'is_last' => !$context['right_to_left'],
),
);


Code (replace) Select
$buttons = array(
'home' => array(
'title' => $txt['home'],
'href' => $scripturl,
'show' => true,
'sub_buttons' => array(
),
'is_last' => $context['right_to_left'],
),
'register_loggedin' => array(
'title' => $txt['register'],
'href' => $scripturl . '?board=3.0',
'show' => !$user_info['is_guest'],
'sub_buttons' => array(
),
),
'download' => array(
'title' => 'Download',
'href' => $scripturl . '?board=2.0',
'show' => !$user_info['is_guest'],
'sub_buttons' => array(
),
),
'admin' => array(
'title' => $txt['admin'],
'href' => $scripturl . '?action=admin',
'show' => $context['allow_admin'],
'sub_buttons' => array(
'featuresettings' => array(
'title' => $txt['modSettings_title'],
'href' => $scripturl . '?action=admin;area=featuresettings',
'show' => allowedTo('admin_forum'),
),
'packages' => array(
'title' => $txt['package'],
'href' => $scripturl . '?action=admin;area=packages',
'show' => allowedTo('admin_forum'),
),
'errorlog' => array(
'title' => $txt['errlog'],
'href' => $scripturl . '?action=admin;area=logs;sa=errorlog;desc',
'show' => allowedTo('admin_forum') && !empty($modSettings['enableErrorLogging']),
),
'permissions' => array(
'title' => $txt['edit_permissions'],
'href' => $scripturl . '?action=admin;area=permissions',
'show' => allowedTo('manage_permissions'),
'is_last' => true,
),
),
),
'profile' => array(
'title' => $txt['profile'],
'href' => $scripturl . '?action=profile',
'show' => $context['allow_edit_profile'],
'sub_buttons' => array(
'summary' => array(
'title' => $txt['summary'],
'href' => $scripturl . '?action=profile',
'show' => true,
),
'account' => array(
'title' => $txt['account'],
'href' => $scripturl . '?action=profile;area=account',
'show' => allowedTo(array('profile_identity_any', 'profile_identity_own', 'manage_membergroups')),
),
'profile' => array(
'title' => $txt['forumprofile'],
'href' => $scripturl . '?action=profile;area=forumprofile',
'show' => allowedTo(array('profile_extra_any', 'profile_extra_own')),
'is_last' => true,
),
),
),
'pm' => array(
'title' => $txt['pm_short'],
'href' => $scripturl . '?action=pm',
'show' => $context['allow_pm'],
'sub_buttons' => array(
'pm_read' => array(
'title' => $txt['pm_menu_read'],
'href' => $scripturl . '?action=pm',
'show' => allowedTo('pm_read'),
),
'pm_send' => array(
'title' => $txt['pm_menu_send'],
'href' => $scripturl . '?action=pm;sa=send',
'show' => allowedTo('pm_send'),
'is_last' => true,
),
),
),
'login' => array(
'title' => $txt['login'],
'href' => $scripturl . '?action=login',
'show' => $user_info['is_guest'],
'sub_buttons' => array(
),
),
'register_loggeout' => array(
'title' => $txt['register'],
'href' => $scripturl . '?board=3.0',
'show' => $user_info['is_guest'],
'sub_buttons' => array(
),
),
'facebook' => array(
'title' => 'Facebook',
'href' => 'https://facebook.com/MagicPT',
'show' => $user_info['is_guest'],
'sub_buttons' => array(
),
'is_last' => !$context['right_to_left'],
),
'logout' => array(
'title' => $txt['logout'],
'href' => $scripturl . '?action=logout;%1$s=%2$s',
'show' => !$user_info['is_guest'],
'sub_buttons' => array(
),
'is_last' => !$context['right_to_left'],
),
);


Thanks a lot  :)

There are just 2 little bugs:

1.
(https://i.imgur.com/O2t2sgW.png)

the register has no icon above

2.
for logged out users the register button leads to the register board (it should lead to forum register: http://magicpt.net/index.php?action=register)

(https://i.imgur.com/MbgHDDZ.png)
Title: Re: How can I edit the main menu buttons?
Post by: Arantor on December 17, 2018, 06:57:47 PM
For the links themselves, I just got confused trying to figure out the ordering of all the things (you will notice some things are there twice), but this should fix it:

$buttons = array(
'home' => array(
'title' => $txt['home'],
'href' => $scripturl,
'show' => true,
'sub_buttons' => array(
),
'is_last' => $context['right_to_left'],
),
'register_loggedin' => array(
'title' => $txt['register'],
'href' => $scripturl . '?board=3.0',
'show' => !$user_info['is_guest'],
'sub_buttons' => array(
),
),
'download' => array(
'title' => 'Download',
'href' => $scripturl . '?board=2.0',
'show' => !$user_info['is_guest'],
'sub_buttons' => array(
),
),
'admin' => array(
'title' => $txt['admin'],
'href' => $scripturl . '?action=admin',
'show' => $context['allow_admin'],
'sub_buttons' => array(
'featuresettings' => array(
'title' => $txt['modSettings_title'],
'href' => $scripturl . '?action=admin;area=featuresettings',
'show' => allowedTo('admin_forum'),
),
'packages' => array(
'title' => $txt['package'],
'href' => $scripturl . '?action=admin;area=packages',
'show' => allowedTo('admin_forum'),
),
'errorlog' => array(
'title' => $txt['errlog'],
'href' => $scripturl . '?action=admin;area=logs;sa=errorlog;desc',
'show' => allowedTo('admin_forum') && !empty($modSettings['enableErrorLogging']),
),
'permissions' => array(
'title' => $txt['edit_permissions'],
'href' => $scripturl . '?action=admin;area=permissions',
'show' => allowedTo('manage_permissions'),
'is_last' => true,
),
),
),
'profile' => array(
'title' => $txt['profile'],
'href' => $scripturl . '?action=profile',
'show' => $context['allow_edit_profile'],
'sub_buttons' => array(
'summary' => array(
'title' => $txt['summary'],
'href' => $scripturl . '?action=profile',
'show' => true,
),
'account' => array(
'title' => $txt['account'],
'href' => $scripturl . '?action=profile;area=account',
'show' => allowedTo(array('profile_identity_any', 'profile_identity_own', 'manage_membergroups')),
),
'profile' => array(
'title' => $txt['forumprofile'],
'href' => $scripturl . '?action=profile;area=forumprofile',
'show' => allowedTo(array('profile_extra_any', 'profile_extra_own')),
'is_last' => true,
),
),
),
'pm' => array(
'title' => $txt['pm_short'],
'href' => $scripturl . '?action=pm',
'show' => $context['allow_pm'],
'sub_buttons' => array(
'pm_read' => array(
'title' => $txt['pm_menu_read'],
'href' => $scripturl . '?action=pm',
'show' => allowedTo('pm_read'),
),
'pm_send' => array(
'title' => $txt['pm_menu_send'],
'href' => $scripturl . '?action=pm;sa=send',
'show' => allowedTo('pm_send'),
'is_last' => true,
),
),
),
'login' => array(
'title' => $txt['login'],
'href' => $scripturl . '?action=login',
'show' => $user_info['is_guest'],
'sub_buttons' => array(
),
),
'register_loggeout' => array(
'title' => $txt['register'],
'href' => $scripturl . '?action=register',
'show' => $user_info['is_guest'],
'sub_buttons' => array(
),
),
'facebook' => array(
'title' => 'Facebook',
'href' => 'https://facebook.com/MagicPT',
'show' => $user_info['is_guest'],
'sub_buttons' => array(
),
'is_last' => !$context['right_to_left'],
),
'logout' => array(
'title' => $txt['logout'],
'href' => $scripturl . '?action=logout;%1$s=%2$s',
'show' => !$user_info['is_guest'],
'sub_buttons' => array(
),
'is_last' => !$context['right_to_left'],
),
);


Fixing the icons is a lot more complex than I have energy for right now (it is nearly midnight here) but careful CSS should be able to fix that. If you hadn't insisted on two different registration buttons in two different places, that would have worked without any changes (since I would have just given it the correct class).
Title: Re: How can I edit the main menu buttons?
Post by: NexusXENU on December 17, 2018, 07:56:40 PM
Quote from: Arantor on December 17, 2018, 06:57:47 PM
For the links themselves, I just got confused trying to figure out the ordering of all the things (you will notice some things are there twice), but this should fix it:

$buttons = array(
'home' => array(
'title' => $txt['home'],
'href' => $scripturl,
'show' => true,
'sub_buttons' => array(
),
'is_last' => $context['right_to_left'],
),
'register_loggedin' => array(
'title' => $txt['register'],
'href' => $scripturl . '?board=3.0',
'show' => !$user_info['is_guest'],
'sub_buttons' => array(
),
),
'download' => array(
'title' => 'Download',
'href' => $scripturl . '?board=2.0',
'show' => !$user_info['is_guest'],
'sub_buttons' => array(
),
),
'admin' => array(
'title' => $txt['admin'],
'href' => $scripturl . '?action=admin',
'show' => $context['allow_admin'],
'sub_buttons' => array(
'featuresettings' => array(
'title' => $txt['modSettings_title'],
'href' => $scripturl . '?action=admin;area=featuresettings',
'show' => allowedTo('admin_forum'),
),
'packages' => array(
'title' => $txt['package'],
'href' => $scripturl . '?action=admin;area=packages',
'show' => allowedTo('admin_forum'),
),
'errorlog' => array(
'title' => $txt['errlog'],
'href' => $scripturl . '?action=admin;area=logs;sa=errorlog;desc',
'show' => allowedTo('admin_forum') && !empty($modSettings['enableErrorLogging']),
),
'permissions' => array(
'title' => $txt['edit_permissions'],
'href' => $scripturl . '?action=admin;area=permissions',
'show' => allowedTo('manage_permissions'),
'is_last' => true,
),
),
),
'profile' => array(
'title' => $txt['profile'],
'href' => $scripturl . '?action=profile',
'show' => $context['allow_edit_profile'],
'sub_buttons' => array(
'summary' => array(
'title' => $txt['summary'],
'href' => $scripturl . '?action=profile',
'show' => true,
),
'account' => array(
'title' => $txt['account'],
'href' => $scripturl . '?action=profile;area=account',
'show' => allowedTo(array('profile_identity_any', 'profile_identity_own', 'manage_membergroups')),
),
'profile' => array(
'title' => $txt['forumprofile'],
'href' => $scripturl . '?action=profile;area=forumprofile',
'show' => allowedTo(array('profile_extra_any', 'profile_extra_own')),
'is_last' => true,
),
),
),
'pm' => array(
'title' => $txt['pm_short'],
'href' => $scripturl . '?action=pm',
'show' => $context['allow_pm'],
'sub_buttons' => array(
'pm_read' => array(
'title' => $txt['pm_menu_read'],
'href' => $scripturl . '?action=pm',
'show' => allowedTo('pm_read'),
),
'pm_send' => array(
'title' => $txt['pm_menu_send'],
'href' => $scripturl . '?action=pm;sa=send',
'show' => allowedTo('pm_send'),
'is_last' => true,
),
),
),
'login' => array(
'title' => $txt['login'],
'href' => $scripturl . '?action=login',
'show' => $user_info['is_guest'],
'sub_buttons' => array(
),
),
'register_loggeout' => array(
'title' => $txt['register'],
'href' => $scripturl . '?action=register',
'show' => $user_info['is_guest'],
'sub_buttons' => array(
),
),
'facebook' => array(
'title' => 'Facebook',
'href' => 'https://facebook.com/MagicPT',
'show' => $user_info['is_guest'],
'sub_buttons' => array(
),
'is_last' => !$context['right_to_left'],
),
'logout' => array(
'title' => $txt['logout'],
'href' => $scripturl . '?action=logout;%1$s=%2$s',
'show' => !$user_info['is_guest'],
'sub_buttons' => array(
),
'is_last' => !$context['right_to_left'],
),
);


Fixing the icons is a lot more complex than I have energy for right now (it is nearly midnight here) but careful CSS should be able to fix that. If you hadn't insisted on two different registration buttons in two different places, that would have worked without any changes (since I would have just given it the correct class).

Ok now the register link works.

Have a great night no hurry
Title: Re: How can I edit the main menu buttons?
Post by: NexusXENU on December 18, 2018, 12:35:19 PM
Quote from: Arantor on December 17, 2018, 06:57:47 PM
For the links themselves, I just got confused trying to figure out the ordering of all the things (you will notice some things are there twice), but this should fix it:

$buttons = array(
'home' => array(
'title' => $txt['home'],
'href' => $scripturl,
'show' => true,
'sub_buttons' => array(
),
'is_last' => $context['right_to_left'],
),
'register_loggedin' => array(
'title' => $txt['register'],
'href' => $scripturl . '?board=3.0',
'show' => !$user_info['is_guest'],
'sub_buttons' => array(
),
),
'download' => array(
'title' => 'Download',
'href' => $scripturl . '?board=2.0',
'show' => !$user_info['is_guest'],
'sub_buttons' => array(
),
),
'admin' => array(
'title' => $txt['admin'],
'href' => $scripturl . '?action=admin',
'show' => $context['allow_admin'],
'sub_buttons' => array(
'featuresettings' => array(
'title' => $txt['modSettings_title'],
'href' => $scripturl . '?action=admin;area=featuresettings',
'show' => allowedTo('admin_forum'),
),
'packages' => array(
'title' => $txt['package'],
'href' => $scripturl . '?action=admin;area=packages',
'show' => allowedTo('admin_forum'),
),
'errorlog' => array(
'title' => $txt['errlog'],
'href' => $scripturl . '?action=admin;area=logs;sa=errorlog;desc',
'show' => allowedTo('admin_forum') && !empty($modSettings['enableErrorLogging']),
),
'permissions' => array(
'title' => $txt['edit_permissions'],
'href' => $scripturl . '?action=admin;area=permissions',
'show' => allowedTo('manage_permissions'),
'is_last' => true,
),
),
),
'profile' => array(
'title' => $txt['profile'],
'href' => $scripturl . '?action=profile',
'show' => $context['allow_edit_profile'],
'sub_buttons' => array(
'summary' => array(
'title' => $txt['summary'],
'href' => $scripturl . '?action=profile',
'show' => true,
),
'account' => array(
'title' => $txt['account'],
'href' => $scripturl . '?action=profile;area=account',
'show' => allowedTo(array('profile_identity_any', 'profile_identity_own', 'manage_membergroups')),
),
'profile' => array(
'title' => $txt['forumprofile'],
'href' => $scripturl . '?action=profile;area=forumprofile',
'show' => allowedTo(array('profile_extra_any', 'profile_extra_own')),
'is_last' => true,
),
),
),
'pm' => array(
'title' => $txt['pm_short'],
'href' => $scripturl . '?action=pm',
'show' => $context['allow_pm'],
'sub_buttons' => array(
'pm_read' => array(
'title' => $txt['pm_menu_read'],
'href' => $scripturl . '?action=pm',
'show' => allowedTo('pm_read'),
),
'pm_send' => array(
'title' => $txt['pm_menu_send'],
'href' => $scripturl . '?action=pm;sa=send',
'show' => allowedTo('pm_send'),
'is_last' => true,
),
),
),
'login' => array(
'title' => $txt['login'],
'href' => $scripturl . '?action=login',
'show' => $user_info['is_guest'],
'sub_buttons' => array(
),
),
'register_loggeout' => array(
'title' => $txt['register'],
'href' => $scripturl . '?action=register',
'show' => $user_info['is_guest'],
'sub_buttons' => array(
),
),
'facebook' => array(
'title' => 'Facebook',
'href' => 'https://facebook.com/MagicPT',
'show' => $user_info['is_guest'],
'sub_buttons' => array(
),
'is_last' => !$context['right_to_left'],
),
'logout' => array(
'title' => $txt['logout'],
'href' => $scripturl . '?action=logout;%1$s=%2$s',
'show' => !$user_info['is_guest'],
'sub_buttons' => array(
),
'is_last' => !$context['right_to_left'],
),
);


Fixing the icons is a lot more complex than I have energy for right now (it is nearly midnight here) but careful CSS should be able to fix that. If you hadn't insisted on two different registration buttons in two different places, that would have worked without any changes (since I would have just given it the correct class).

How can I fix the icon?
Title: Re: How can I edit the main menu buttons?
Post by: Arantor on December 18, 2018, 01:37:03 PM
Jeesh, impatient much? I said it was late in my last reply, then I went to bed, and I'm just home from work, where this is something I couldn't fix at work because this requires more than 15 seconds of brainpower to fix.

I'll get to this when I get to this.

EDIT: Add the following to your theme's index.css file:

.fa-register_loggeout:before, .fa-register_loggedin:before {
    content: "\f084";
}
Title: Re: How can I edit the main menu buttons?
Post by: NexusXENU on December 18, 2018, 03:01:14 PM
Quote from: Arantor on December 18, 2018, 01:37:03 PM
Jeesh, impatient much? I said it was late in my last reply, then I went to bed, and I'm just home from work, where this is something I couldn't fix at work because this requires more than 15 seconds of brainpower to fix.

I'll get to this when I get to this.

EDIT: Add the following to your theme's index.css file:

.fa-register_loggeout:before, .fa-register_loggedin:before {
    content: "\f084";
}


I just thought you forgot me. Sorry for the impatient  ;)

Where to add it inside the index.css?
Title: Re: How can I edit the main menu buttons?
Post by: Arantor on December 18, 2018, 03:10:11 PM
Anywhere is fine.
Title: Re: How can I edit the main menu buttons?
Post by: Illori on December 18, 2018, 03:12:02 PM
Quote from: Arantor on December 18, 2018, 03:10:11 PM
Anywhere is fine.

that is not between a set of curly brackets, you want it outside them.
Title: Re: How can I edit the main menu buttons?
Post by: Arantor on December 18, 2018, 03:13:18 PM
I assumed slightly more intelligence than just to pick a totally random place ;)
Title: Re: How can I edit the main menu buttons?
Post by: NexusXENU on December 22, 2018, 02:01:00 PM
Quote from: Arantor on December 18, 2018, 03:10:11 PM
Anywhere is fine.

I added it. still no icon for register button
Title: Re: How can I edit the main menu buttons?
Post by: Arantor on December 22, 2018, 02:08:04 PM
Where did you add it to? I don't see the code in Themes/BarbarianTheme/css/index.css.
Title: Re: How can I edit the main menu buttons?
Post by: NexusXENU on December 23, 2018, 06:09:44 PM
Quote from: Arantor on December 22, 2018, 02:08:04 PM
Where did you add it to? I don't see the code in Themes/BarbarianTheme/css/index.css.

I added now again. still no icon.
Title: Re: How can I edit the main menu buttons?
Post by: Arantor on December 23, 2018, 06:36:58 PM
I see you added it - I suspect your browser has the old code because it shows up for me just fine...
Title: Re: How can I edit the main menu buttons?
Post by: GigaWatt on December 23, 2018, 07:29:58 PM
Hit Ctrl + F5 in your browser ;).
Title: Re: How can I edit the main menu buttons?
Post by: NexusXENU on December 24, 2018, 06:37:11 PM
Quote from: Arantor on December 23, 2018, 06:36:58 PM
I see you added it - I suspect your browser has the old code because it shows up for me just fine...

It works now. Looks like it took some time until it was updated. Thanks a lot Arantor I appreciate your help