Advertisement:

Author Topic: Managing menu tabs  (Read 6478 times)

Offline MultiformeIngegno

  • Sophist Member
  • *****
  • Posts: 1,101
  • Gender: Male
  • Id quo maius cogitari nequit
    • RockCiclopedia
Managing menu tabs
« 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 but it doesn't work with smf 2!!

Please help me!!
RockCiclopedia (wiki - forum), Tutta la storia del rock, scritta da voi ...
Rimanere aggiornati sul mondo della musica grazie al nuovo feed "RockCiclopedia Music News"!

Offline cme1st2302

  • Sophist Member
  • *****
  • Posts: 1,075
  • Gender: Male
    • East Coast Astro
Re: Managing menu tabs
« Reply #1 on: August 20, 2008, 10:31:42 AM »
attach you index.template.php and I will help you out
SMF Version: 1.1.11
SimplePortal Version: 2.3.2

Admin

He who waits for perfect conditions sees nothing!!
If you need help adding a button or tab PM me!!

Offline MultiformeIngegno

  • Sophist Member
  • *****
  • Posts: 1,101
  • Gender: Male
  • Id quo maius cogitari nequit
    • RockCiclopedia
Re: Managing menu tabs
« Reply #2 on: August 20, 2008, 11:10:06 AM »
Here you are.. :)
RockCiclopedia (wiki - forum), Tutta la storia del rock, scritta da voi ...
Rimanere aggiornati sul mondo della musica grazie al nuovo feed "RockCiclopedia Music News"!

Offline cme1st2302

  • Sophist Member
  • *****
  • Posts: 1,075
  • Gender: Male
    • East Coast Astro
Re: Managing menu tabs
« Reply #3 on: August 20, 2008, 11:20:54 AM »
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?
« Last Edit: August 20, 2008, 11:23:49 AM by cme1st2302 »
SMF Version: 1.1.11
SimplePortal Version: 2.3.2

Admin

He who waits for perfect conditions sees nothing!!
If you need help adding a button or tab PM me!!

Offline N3RVE

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 8,907
  • Gender: Male
    • N3RVE.COM
Re: Managing menu tabs
« Reply #4 on: August 20, 2008, 11:49:14 AM »
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?)
Open with wordpad, press Ctrl + F -> Type in home, you would arrive at the label
Code: [Select]
$txt['home'] = 'Home';Right after that add,
Code: [Select]
$txt['Forum_home'] = 'Forum';
In Subs.php, do a search for 'home' ->
Code: [Select]
'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
Code: [Select]
'title' => $txt['Forum_home'],
'href' => $scripturl,
Home Button
Code: [Select]
'title' => $txt['home'],
'href' => Your-URL,

-[n3rve]
« Last Edit: August 20, 2008, 11:54:32 AM by [n3rve] »
Ralph "[n3rve]" Otowo
Former Marketing Co-ordinator, Simple Machines.
ralph [at] simplemachines [dot] org                       
Quote
“Somewhere, something incredible is waiting to be known.” - Carl Sagan

Offline cme1st2302

  • Sophist Member
  • *****
  • Posts: 1,075
  • Gender: Male
    • East Coast Astro
Re: Managing menu tabs
« Reply #5 on: August 20, 2008, 12:33:58 PM »
Yeah what he said!!  Nice avatar n3rve!!
SMF Version: 1.1.11
SimplePortal Version: 2.3.2

Admin

He who waits for perfect conditions sees nothing!!
If you need help adding a button or tab PM me!!

Offline MultiformeIngegno

  • Sophist Member
  • *****
  • Posts: 1,101
  • Gender: Male
  • Id quo maius cogitari nequit
    • RockCiclopedia
Re: Managing menu tabs
« Reply #6 on: August 20, 2008, 06:17:40 PM »
Mmh.. I've done what you said, here's my part of Subs.php edited:

Code: [Select]
$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:
Code: [Select]
$txt['home'] = 'Home';
$txt['Forum_home'] = 'Forum';

now the forum looks:


The new "Forum" button isn't displayed and the old "Home" button is... blank..
RockCiclopedia (wiki - forum), Tutta la storia del rock, scritta da voi ...
Rimanere aggiornati sul mondo della musica grazie al nuovo feed "RockCiclopedia Music News"!

Offline ccbtimewiz

  • SMF Hero
  • ******
  • Posts: 5,300
  • Gender: Male
  • OXEN
Re: Managing menu tabs
« Reply #7 on: August 20, 2008, 08:46:10 PM »
The second instance.

Code: [Select]
'home' => array(
'title' => $txt['Forum_home'],
'href' => $scripturl,
'show' => true,
'sub_buttons' => array(
),
),

Should be:
Code: [Select]
'forum' => array(
'title' => $txt['Forum_home'],
'href' => $scripturl,
'show' => true,
'sub_buttons' => array(
),
),

Offline N3RVE

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 8,907
  • Gender: Male
    • N3RVE.COM
Re: Managing menu tabs
« Reply #8 on: August 21, 2008, 04:40:34 AM »
The button is there but missing it's label.
Follow ccbtimewiz's instruction, sorry for that little errror

-[n3rve]
Ralph "[n3rve]" Otowo
Former Marketing Co-ordinator, Simple Machines.
ralph [at] simplemachines [dot] org                       
Quote
“Somewhere, something incredible is waiting to be known.” - Carl Sagan

Offline MultiformeIngegno

  • Sophist Member
  • *****
  • Posts: 1,101
  • Gender: Male
  • Id quo maius cogitari nequit
    • RockCiclopedia
Re: Managing menu tabs
« Reply #9 on: August 21, 2008, 05:27:34 AM »
Mmmh.. no..
Now the forum looks:



I've attached my Subs.php and index.english.php...
RockCiclopedia (wiki - forum), Tutta la storia del rock, scritta da voi ...
Rimanere aggiornati sul mondo della musica grazie al nuovo feed "RockCiclopedia Music News"!

Offline N3RVE

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 8,907
  • Gender: Male
    • N3RVE.COM
Re: Managing menu tabs
« Reply #10 on: August 21, 2008, 11:06:10 AM »
Hello lorenzone92,
Wondering why it didn't work for you,
Attached are two files I tested out here.

Remember to rename them ;)

-[n3rve]
« Last Edit: August 21, 2008, 11:17:29 AM by [n3rve] »
Ralph "[n3rve]" Otowo
Former Marketing Co-ordinator, Simple Machines.
ralph [at] simplemachines [dot] org                       
Quote
“Somewhere, something incredible is waiting to be known.” - Carl Sagan

Offline RL Joneson

  • Jr. Member
  • **
  • Posts: 100
  • Gender: Male
  • RL Joneson. Design. Web. Print.
    • RL Joneson. Design. Web. Print.
Re: Managing menu tabs
« Reply #11 on: August 21, 2008, 02:04:11 PM »
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

Offline MultiformeIngegno

  • Sophist Member
  • *****
  • Posts: 1,101
  • Gender: Male
  • Id quo maius cogitari nequit
    • RockCiclopedia
Re: Managing menu tabs
« Reply #12 on: August 21, 2008, 07:10:29 PM »
Hello lorenzone92,
Wondering why it didn't work for you,
Attached are two files I tested out here.

Remember to rename them ;)

-[n3rve]
Nice!!! ;)
With those files it works: http://forum.rockciclopedia.com !!!

Really thanks!!!! :) :)
RockCiclopedia (wiki - forum), Tutta la storia del rock, scritta da voi ...
Rimanere aggiornati sul mondo della musica grazie al nuovo feed "RockCiclopedia Music News"!

Offline MultiformeIngegno

  • Sophist Member
  • *****
  • Posts: 1,101
  • Gender: Male
  • Id quo maius cogitari nequit
    • RockCiclopedia
Re: Managing menu tabs
« Reply #13 on: August 21, 2008, 07:13:55 PM »
Ah Nerve, very last thing.. :P
The active button should be "forum", not "home"... O:)
RockCiclopedia (wiki - forum), Tutta la storia del rock, scritta da voi ...
Rimanere aggiornati sul mondo della musica grazie al nuovo feed "RockCiclopedia Music News"!

Offline MultiformeIngegno

  • Sophist Member
  • *****
  • Posts: 1,101
  • Gender: Male
  • Id quo maius cogitari nequit
    • RockCiclopedia
Re: Managing menu tabs
« Reply #14 on: August 23, 2008, 07:37:11 PM »
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
RockCiclopedia (wiki - forum), Tutta la storia del rock, scritta da voi ...
Rimanere aggiornati sul mondo della musica grazie al nuovo feed "RockCiclopedia Music News"!

Offline MultiformeIngegno

  • Sophist Member
  • *****
  • Posts: 1,101
  • Gender: Male
  • Id quo maius cogitari nequit
    • RockCiclopedia
Re: Managing menu tabs
« Reply #15 on: August 24, 2008, 05:17:06 PM »
Resolved on my own!! ;)
Hey don't worry, I'll venerate you anyway!!! :P
RockCiclopedia (wiki - forum), Tutta la storia del rock, scritta da voi ...
Rimanere aggiornati sul mondo della musica grazie al nuovo feed "RockCiclopedia Music News"!

Offline jazz1

  • Semi-Newbie
  • *
  • Posts: 49
Re: Managing menu tabs
« Reply #16 on: September 01, 2008, 02:17:48 PM »
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?

Offline MultiformeIngegno

  • Sophist Member
  • *****
  • Posts: 1,101
  • Gender: Male
  • Id quo maius cogitari nequit
    • RockCiclopedia
Re: Managing menu tabs
« Reply #17 on: January 25, 2009, 05:29:45 AM »
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
RockCiclopedia (wiki - forum), Tutta la storia del rock, scritta da voi ...
Rimanere aggiornati sul mondo della musica grazie al nuovo feed "RockCiclopedia Music News"!

Offline MultiformeIngegno

  • Sophist Member
  • *****
  • Posts: 1,101
  • Gender: Male
  • Id quo maius cogitari nequit
    • RockCiclopedia
Re: Managing menu tabs
« Reply #18 on: February 08, 2009, 08:54:34 AM »
No one can help me? :)
RockCiclopedia (wiki - forum), Tutta la storia del rock, scritta da voi ...
Rimanere aggiornati sul mondo della musica grazie al nuovo feed "RockCiclopedia Music News"!