Advertisement:

Author Topic: Change the nav menu a lil bit  (Read 4288 times)

Offline marinesct

  • Semi-Newbie
  • *
  • Posts: 59
Change the nav menu a lil bit
« on: December 16, 2008, 11:19:24 PM »
I'm looking at doing two things with my forums.

1) redirect the 'Home' menu item to our sites static page and then also
2) rename the 'Forum' menu item to something else.

Which files would I have to modify for the changes to take affect properly?
« Last Edit: January 10, 2009, 07:08:54 PM by marinesct »

Offline sherpa サイバー侍

  • Sophist Member
  • *****
  • Posts: 1,057
  • Gender: Male
    • Bridge to Nepal and Nepali
Re: Change the nav menu a lil bit
« Reply #1 on: December 17, 2008, 04:10:16 AM »
modify is subs.php

Offline marinesct

  • Semi-Newbie
  • *
  • Posts: 59
[SOLVED]: Change the nav menu a lil bit
« Reply #2 on: December 17, 2008, 11:25:34 PM »
Great! Thanks Sherpa!

Offline deFain

  • Semi-Newbie
  • *
  • Posts: 30
Re: Change the nav menu a lil bit
« Reply #3 on: December 18, 2008, 12:02:40 AM »
Try this mod. It adds a custom tab on the menu.
http://custom.simplemachines.org/mods/index.php?mod=1402


Offline marinesct

  • Semi-Newbie
  • *
  • Posts: 59
Re: Change the nav menu a lil bit
« Reply #4 on: December 18, 2008, 12:50:06 AM »
The mod wasn't what I was looking for.  What I should have mentioned was that I was using the Simple Portal mod, which changed the menu up a bit to add a 'Forum' menu item.  I had to go into the mods SPortal.english.php file and change the name of the menu item there.

The thread here helped out a little bit.

To change the 'Home' redirect, in the subs.php, I searched for:

Code: [Select]
'home' => array(
'title' => $txt['home'],
'href' => $scripturl,

and replaced with:

Code: [Select]
'home' => array(
'title' => $txt['home'],
'href' => 'http://www.usmcg.org/test',

I also replaced a few instances of 'Forum' with 'Squadbay' throughout the file, just for a cosmetic effect.

For renaming the menu 'Forum,' I had to refer to 'sp-forum' in the SPortal.english.php file:

Find:

Code: [Select]
$txt['sp-forum'] = 'Forum';

and replaced with:

Code: [Select]
$txt['sp-forum'] = 'Squadbay';
« Last Edit: December 18, 2008, 12:52:28 AM by marinesct »

Offline sherpa サイバー侍

  • Sophist Member
  • *****
  • Posts: 1,057
  • Gender: Male
    • Bridge to Nepal and Nepali
Re: Change the nav menu a lil bit
« Reply #5 on: December 18, 2008, 12:54:24 AM »
That mod only adds new tab but he want Home tab to redirect to his website

$buttons = array(
         'home' => array(
            'title' => $txt['home'],
            'href' => something.com
            'show' => true,
            'sub_buttons' => array(
            ),
$buttons = array(
         'Forum' => array(
            'title' => $txt['Forum'],
            'href' => $scripturl,
            'show' => true,
            'sub_buttons' => array(
            ),
In index.english.php add
$txt['Forum'] = 'Forum';

Offline JimM

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 11,980
  • Gender: Male
    • Southern Spirit Hunters
Re: Change the nav menu a lil bit
« Reply #6 on: January 09, 2009, 11:54:11 PM »
If this is solved feel free to mark it as solved otherwise reply with some details of what isn't working.
 
Jim "JimM" Moore
Former Support Specialist

Please do not PM me for support!                   
Installing SMF
Upgrade SMF
Manual Installation of Mods