News:

Wondering if this will always be free?  See why free is better.

Main Menu

How can I edit the main menu buttons?

Started by NexusXENU, December 10, 2018, 08:53:29 PM

Previous topic - Next topic

NexusXENU

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:


Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."


Arantor

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.

NexusXENU

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?

Arantor

Nope. If you can tell us what you're trying to do we can help you with it.

live627


NexusXENU

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?

Arantor

You could always give me the URLs in question so I can write the PHP code you'll need...

Kindred

regarding the menu text....   that is determined by CSS. You can adjust the CSS as you need to in the theme's css file.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Arantor

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.

Gwenwyfar

I think Kindred meant for the "text easier to read and bold" part.
"It is impossible to communicate with one that does not wish to communicate"

NexusXENU

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

Arantor

I need all of them... you want to link to a topic... what topic?

NexusXENU

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 [nofollow]
Download Board: magicpt.net/index.php?board=2.0 [nofollow]

Arantor

Should the login button be left on the board for logged out users? Should logged in users see the register link?

NexusXENU

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 [nofollow])

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

Logged in users should see:

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




Arantor

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'],
),
);

NexusXENU

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.


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 [nofollow])



Arantor

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

Advertisement: