News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Menu tab code breaking site

Started by mysimplesite, August 05, 2017, 11:35:57 AM

Previous topic - Next topic

mysimplesite

Site is 2.0.14, default template, php7

When I open Sources > Sub.php and find

'search' => array(
            'title' => $txt['search'],
            'href' => $scripturl . '?action=search',
            'show' => $context['allow_search'],
            'sub_buttons' => array(
            ),
         ),

placing this code above it breaks site. I end up with a white screen.

'mysitename' => array(
            'title' => 'My Site Name',
            'href' => 'https://blahblah***/',
            'show' => true,
            'sub_buttons' => array(
            ),
         ),
I've tried placing code in other menu array areas but always get a blank screen.

Both codes look the same to me, so I'm obviously missing something as my code doesn't work.

All I want to do is add another menu tab to the navigation bar.

bestnow

Nothing wrong with the code.
Quote from: mysimplesite on August 05, 2017, 11:35:57 AM
Site is 2.0.14, default template, php7

When I open Sources > Sub.php and find

'search' => array(
            'title' => $txt['search'],
            'href' => $scripturl . '?action=search',
            'show' => $context['allow_search'],
            'sub_buttons' => array(
            ),
         ),

placing this code above it breaks site. I end up with a white screen.

'mysitename' => array(
            'title' => 'My Site Name',
            'href' => 'https://blahblah***/',
            'show' => true,
            'sub_buttons' => array(
            ),
         ),
I've tried placing code in other menu array areas but always get a blank screen.

Both codes look the same to me, so I'm obviously missing something as my code doesn't work.

All I want to do is add another menu tab to the navigation bar.

Nothing wrong with the code

Quote
'mysitename' => array(
            'title' => 'My Site Name',
            'href' => 'https://blahblah***/',
            'show' => true,
            'sub_buttons' => array(
            ),
         ),

Shambles

Add your code again but don't publish it to your forum folder. Instead, attach it here and we'll have a ganders at it (or you could copy/paste it to https://www.piliapp.com/php-syntax-check/)

shawnb61

Are you sure you're https?   Cert installed?

I'm wondering of the blahblah link is the issue...
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

d3vcho

Quote from: mysimplesite on August 05, 2017, 11:35:57 AM
I've tried placing code in other menu array areas but always get a blank screen.

Check your error log in SMF, and in case it's empty, check as well you server error log. There should be something that can tell us what's wrong.
"Greeting Death as an old friend, they departed this life as equals"

Shambles

Quote from: shawnb61 on August 05, 2017, 02:43:47 PM
Are you sure you're https?   Cert installed?
How would that give a WSOD?

vbgamer45

And attach your file you edit so we can double check the whole file.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Shambles


Advertisement: