Can I add multiple Custom Tabs if I install this mod more than once?

Started by RedPanda2013, December 26, 2016, 11:49:56 AM

Previous topic - Next topic

RedPanda2013

Can I add multiple Custom Tabs if I install this mod more than once?

http://custom.simplemachines.org/mods/index.php?mod=2209

I got it working the first time but I need more than 1 custom tab now.

Cheers

Sir Osis of Liver

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

RedPanda2013

Quote from: Sir Osis of Liver on December 26, 2016, 11:59:58 AM
Installing a mod twice is a really bad idea.

right...sorry but I got the double effect with a social icons mod (which has been a pain to remove then because it removed only one installation so I had to manually edit the code) so I was hoping this time I could benefit from a double installation  :-[

Kindred

no...   because the mod reads from the exact same field for both installs....   and also would have code conflicts.

if you want to add new menu items

http://wiki.simplemachines.org/smf/Buttons_-_How_do_I_add_buttons_to_SMF_2.0
Сл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."

Colin

"If everybody is thinking alike, then somebody is not thinking." - Gen. George S. Patton Jr.

Colin

Sir Osis of Liver

Don't think OP wants just buttons.  That mod creates a custom page with the button.  The page is probably the main thing.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Illori


Steve

Or possibly this one: http://custom.simplemachines.org/mods/index.php?mod=2657 though it doesn't add pages I don't think.

A little outdated but works fine on my 2.0.12 ...
DO NOT pm me for support!

RedPanda2013

Quote from: Kindred on December 26, 2016, 01:16:00 PM
no...   because the mod reads from the exact same field for both installs....   and also would have code conflicts.

if you want to add new menu items

http://wiki.simplemachines.org/smf/Buttons_-_How_do_I_add_buttons_to_SMF_2.0


I tried...and failed.

I followed this giude:

http://www.simplemachines.org/community/index.php?topic=261880.0

I tried adding 2 new tabs after the custom tab created by the first mod I used.


// All the buttons we can possible want and then some, try pulling the final list of buttons from cache first.
if (($menu_buttons = cache_get_data('menu_buttons-' . implode('_', $user_info['groups']) . '-' . $user_info['language'], $cacheTime)) === null || time() - $cacheTime <= $modSettings['settings_updated'])
{
$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(
),
),
'custom' => array(
'title' => !empty($modSettings['custom_tab_label']) ? $modSettings['custom_tab_label'] : $txt['custom_tab_label_default'],
'href' => !empty($modSettings['custom_tab_execute_url']) ? $modSettings['custom_tab_execute_url'] : $scripturl,
'show' => $user_info['is_guest'] ? !empty($modSettings['custom_tab_enable_guest_access']) : !empty($modSettings['custom_tab_enable_member_access']),
'sub_buttons' => array(
),
),
'nuovimessaggi' => array(
'title' => 'Nuovi Messaggi',
'href' => 'http://www.investireinborsa.club/forum/index.php?action=unread',
'show' => 'show' => !$user_info['is_guest'],
'sub_buttons' => array(
),
),
'nuoverisposte' => array(
'title' => 'Nuove Risposte',
'href' => 'http://www.investireinborsa.club/forum/index.php?action=unreadreplies',
'show' => 'show' => !$user_info['is_guest'],
'sub_buttons' => array(
),
),
'search' => array(
'title' => $txt['search'],
'href' => $scripturl . '?action=search',
'show' => $context['allow_search'],
'sub_buttons' => array(
),
),



After uploading that, my forum does not show anything, just a blank white screen.  ???

Shambles

'show' => 'show' => !$user_info['is_guest'],

is incorrect in both places.

Code (replace with) Select
'show' => !$user_info['is_guest'],

RedPanda2013

Quote from: Shambles on April 17, 2017, 02:19:56 PM
'show' => 'show' => !$user_info['is_guest'],

is incorrect in both places.

Code (replace with) Select
'show' => !$user_info['is_guest'],

Thank you!

Advertisement: