Simple Machines Community Forum
SMF Support => SMF 2.0.x Support => Topic started by: MultiformeIngegno on August 20, 2008, 09:48:49 AM
-
Hi! :)
I'd like to add a new tab that links to the root of the site, called "home".
But there's already a button called "home" that linmks to the home of the forum... so i'd like to rename the existent button "home" to "forum" and create a new button called "home" that links to the root...
I've read this faq (http://docs.simplemachines.org/index.php?topic=564) but it doesn't work with smf 2!!
Please help me!!
-
attach you index.template.php and I will help you out
-
Here you are.. :)
-
Sorry, I wasn't aware you were using SMF 2.0. Please attach your subs.php file.
Is the home page you want to link to the one in your signature?
-
Hello lorenzone92,
./Sources/Subs.php controls the buttons but requires the button labels from a language file
./Themes/default/languages/index.english.php
Download the files via FTP (How do I use FTP? / What is FTP? (http://docs.simplemachines.org/index.php?topic=480))
Open with wordpad, press Ctrl + F -> Type in home, you would arrive at the label
$txt['home'] = 'Home';
Right after that add,
$txt['Forum_home'] = 'Forum';
In Subs.php, do a search for 'home' ->
'home' => array(
'title' => $txt['home'],
'href' => $scripturl,
'show' => true,
'sub_buttons' => array(
),
Duplicate that block of code, replace these in the duplicated block.
Forum Button
'title' => $txt['Forum_home'],
'href' => $scripturl,
Home Button
'title' => $txt['home'],
'href' => Your-URL,
-[n3rve]
-
Yeah what he said!! Nice avatar n3rve!!
-
Mmh.. I've done what you said, here's my part of Subs.php edited:
$buttons = array(
'home' => array(
'title' => $txt['home'],
'href' => www.rockciclopedia.com,
'show' => true,
'sub_buttons' => array(
),
),
'home' => array(
'title' => $txt['Forum_home'],
'href' => $scripturl,
'show' => true,
'sub_buttons' => array(
),
),
'help' => array(
'title' => $txt['help'],
And here's the poart of index.english.php:
$txt['home'] = 'Home';
$txt['Forum_home'] = 'Forum';
now the forum looks:
(http://img337.imageshack.us/img337/4742/buttonsih7.png)
The new "Forum" button isn't displayed and the old "Home" button is... blank..
-
The second instance.
'home' => array(
'title' => $txt['Forum_home'],
'href' => $scripturl,
'show' => true,
'sub_buttons' => array(
),
),
Should be:
'forum' => array(
'title' => $txt['Forum_home'],
'href' => $scripturl,
'show' => true,
'sub_buttons' => array(
),
),
-
The button is there but missing it's label.
Follow ccbtimewiz's instruction, sorry for that little errror
-[n3rve]
-
Mmmh.. no..
Now the forum looks:
(http://img223.imageshack.us/img223/3351/buttons2nh4.th.png) (http://img223.imageshack.us/my.php?image=buttons2nh4.png)
I've attached my Subs.php and index.english.php...
-
Hello lorenzone92,
Wondering why it didn't work for you,
Attached are two files I tested out here (http://oxynerve.net/forums/index.php).
Remember to rename them ;)
-[n3rve]
-
Hey lorenzone I asked the same question months ago and got some good steps to follow. Just add a new button for your Home to your root site, then change the current Home button to say something like "Forum" or whatever you are using the forum for. Here's the link to my post. This should help if you still have any questions.
http://www.simplemachines.org/community/index.php?topic=232743.msg1497836#msg1497836 (http://www.simplemachines.org/community/index.php?topic=232743.msg1497836#msg1497836)
-
Hello lorenzone92,
Wondering why it didn't work for you,
Attached are two files I tested out here (http://oxynerve.net/forums/index.php).
Remember to rename them ;)
-[n3rve]
Nice!!! ;)
With those files it works: http://forum.rockciclopedia.com !!!
Really thanks!!!! :) :)
-
Ah Nerve, very last thing.. :P
The active button should be "forum", not "home"... O:)
-
Ah Nerve, very last thing.. :P
The active button should be "forum", not "home"... O:)
If you fix this thing I'll venerate you for ever... :P
-
Resolved on my own!! ;)
Hey don't worry, I'll venerate you anyway!!! :P
-
Hello, worked for me too, BUT
This problem is not fully solved!
When viewing the forum at the Forum_home it should be seen that the current page is FORUM and not HOME like it can be seen now
Is it any possibility to change it?
-
I need another answer.. :D
I'd like to create a separator like this "----" between two tabs...
If I add:
'home' => array(
'title' => -----
'href' => NOBODY HERE,
'show' => true,
'sub_buttons' => array(
),
),
where "nobody here" is... nothing (:P) it shows properly this "----" but it points to the forum home..
I'd like to make it without any link..
Thanks!! :D
-
No one can help me? :)