Help - Search - Members - Calendar
Full Version: Smf Template Help
Zymic Webmaster Forums > Web Design & Development > Server Side Scripting > PHP
Soul Of Me
I have a SMF forum installed on zymics server, everything works fine.

It is only this that i aint so very good to find stuff.
On my template i want to add a new tab whicht redicts to another page.

The code two of the tabs are:

CODE
// The [calendar]!
    if ($context['allow_calendar'])
        echo ($current_action == 'calendar' || $context['browser']['is_ie4']) ? '' : '' , '
                <div class="maintab_' , $current_action == 'calendar' ? 'active_back' : 'back' , '">
                    <a href="', $scripturl, '?action=calendar">' , $txt['calendar24'] , '</a>
                </div>' , $current_action == 'calendar' ? '<div class="seperator"><!--no content--></div>' : '<div class="seperator"><!--no content--></div>';

// the [member] list button
    if ($context['allow_memberlist'])
        echo ($current_action == 'mlist' || $context['browser']['is_ie4']) ? '' : '' , '
                <div class="maintab_' , $current_action == 'mlist' ? 'active_back' : 'back' , '">
                    <a href="', $scripturl, '?action=mlist">' , $txt[331] , '</a>
                </div>' , $current_action == 'mlist' ? '<div class="seperator"><!--no content--></div>' : '<div class="seperator"><!--no content--></div>';




I think that is what u need to know to help me, and i want a tab that redicts to my friends homepage.

I have tried this code, and it works fine, but the text is still "MEMBERS" and i need to change it some way, so the forum wont get bugged.

CODE
// the [team] list button
    if ($context['allow_memberlist'])
        echo ($current_action == 'mlist' || $context['browser']['is_ie4']) ? '' : '' , '
                <div class="maintab_' , $current_action == 'mlist' ? 'active_back' : 'back' , '">
                    <a href="http://ficss.vndv.com/team.php">' , $txt[331] , '</a>
                </div>' , $current_action == 'mlist' ? '<div class="seperator"><!--no content--></div>' : '<div class="seperator"><!--no content--></div>';



I know that i need to change this part of the code:

CODE
<a href="http://ficss.vndv.com/team.php">' , $txt[331] , '</a>


But i dont know how to without getting it bugged.


Please help
fenerli
You can either be lazy:
CODE
                    <a href="http://ficss.vndv.com/team.php">Team</a>

Or do it the proper way:
CODE
                    <a href="http://ficss.vndv.com/team.php">' , $txt['team'] , '</a>

The proper way requires you to find the language file where the $txt array is stored and add another key/value pair.
Soul Of Me
I will try the lazy way, else, if that wont work, i will try the proper way.

Thanks.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.