News:

Join the Facebook Fan Page.

Main Menu

Adding Buttons

Started by swan, September 07, 2010, 08:10:47 AM

Previous topic - Next topic

swan

I have added a button to my forum but its not showing the right button when its clicked if that makes sense.  I have home and forum but when i click forum it goes there but home stays highlighted. 

I am using SMF 2.0 RC3.

Thanks x

CapadY

Please, don't PM me for support unless invited.
If you don't understand this, you will be blacklisted.

swan

Haha yeah I added it manually and used that.  Didnt really want any mods on yet but might give it a try now.

swan

Nope the mod is the same too.

I know before there was an extra bit u had to add somewhere so that it would highlight it but cant seem to find it on this version.

CapadY

Have a look at forumroot/index.php
Please, don't PM me for support unless invited.
If you don't understand this, you will be blacklisted.

avguste


swan

Sorry dont know what you mean.  What am I looking for in forumroot/index.php

swan

Never mind I have sorted it now as I have set the forum button to be the default.  Its actually better cos the home button sends people to the web site anyway!  Thanks for trying to help xx

Nolt

#8
Hi, I just add an button and it looks like this:
$buttons = array(
            'home' => array(
                'title' => $txt['home'],
                'href' => 'http://www.smf.pl',
                'show' => true,
                'sub_buttons' => array(
                ),
            ),
            'forum' => array(
                'title' => 'Forum',
                'href' => $scripturl,
                'show' => true,
                'sub_buttons' => array(
                ),
                'is_last' => $context['right_to_left'],
                // 'target' => '_blank',
            ),

the problem is when I click and go to Forum section the button is not highlighted. What and where should be edited/added to fix this?

//Edit:

I found a solution in Subs.php find
$current_action = 'forum';
replace with:
if ($_SERVER['SCRIPT_NAME'] == '/index.php')
   $current_action = 'home';
else
   $current_action = 'forum';

Advertisement: