SMF Support > SMF 2.0.x Support
Adding links.
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
--- Code: ---// Show the [home] button.
echo ($current_action=='home' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </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 . '"> </td>' : '';
--- End code ---
and add after
--- Code: ---// Show the [demo] button.
echo ($current_action=='demo' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </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 . '"> </td>' : '';
you modify "demo" for you (give a link that you want page example: action=demo or ...com/demo)
--- End code ---
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:
@Sinan ANDIRMAN,
Its different for SMF 2 Beta.
Have a read of this topic:
http://www.simplemachines.org/community/index.php?topic=253467.msg1644703#msg1644703
Sinan ANDIRMAN:
excuesme i dont see topic :(
Navigation
[0] Message Index
[#] Next page
Go to full version