News:

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

Main Menu

Adding links.

Started by Mr Cube, September 04, 2008, 05:22:22 PM

Previous topic - Next topic

Mr Cube

Hey all, just updated to the newest beta from 1.1.5 and got a query.
Before, I'd modified the main default theme to add a button linking back to the rest of my site between "Home" and "Help" using the method here but this doesn't seem to be doable on the newest version.

Wondered if anyone could help me out doing the same thing on the new verison.

Sinan ANDIRMAN

find index.template
// Show the [home] button.
echo ($current_action=='home' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'home' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '">' , $txt[103] , '</a>
</td>' , $current_action == 'home' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';

and add after
// Show the [demo] button.
echo ($current_action=='demo' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'home' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '">demo</a>
</td>' , $current_action == 'demo' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';
you modify "demo" for you (give a link that you want page example: action=demo or ...com/demo)

AJ32

SMF 2.0 uses a different way of adding buttons to the linkbar, here's what you want to do:

Find in /Sources/Subs.php
$buttons = array(
         
'home' => array(
            
'title' => $txt['home'],
            
'href' => $scripturl,
            
'show' => true,
            
'sub_buttons' => array(
            ),
         ),

Then add your menubutton like this, right after the above code:

         
'mysite' => array(
            
'title' => 'My Main Site <title>',
            
'href' => '[url=http://www.yoursite.com]http://www.yoursite.com[/url]',
            
'show' => true,
         ),

Hope that answers your question! :) [/hr][/hr][/hr]

Nathaniel

SMF Friend (Former Support Specialist) | SimplePortal Developer
My SMF Mods | SimplePortal

"Quis custodiet ipsos custodes?" - Who will Guard the Guards?

Please don't send me ANY support related PMs. I will just delete them.

Sinan ANDIRMAN

excuesme i dont see topic :(

Mr Cube

thanks guys  :)
working nicely now!

Advertisement: