Advertisement:

Author Topic: Forum Menu  (Read 3211 times)

Offline nathan89

  • Semi-Newbie
  • *
  • Posts: 88
Forum Menu
« on: February 04, 2009, 09:53:37 PM »
My forum is located in a sub folder "community".  I have created a Homepage with SSI, what changes do I need to make so that menu has a home and forum tab correctly?

Offline Joey Smith™

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 6,356
  • Gender: Male
Re: Forum Menu
« Reply #1 on: February 04, 2009, 11:07:44 PM »
You will need to code that into the subs file. What would you like the tab to say (what label)?

Offline nathan89

  • Semi-Newbie
  • *
  • Posts: 88
Re: Forum Menu
« Reply #2 on: February 05, 2009, 06:57:39 AM »
I would like the homepage to be called "Home" and the Forum to be called "Community".

Offline Balaban

  • Full Member
  • ***
  • Posts: 444
  • Gender: Male
Re: Forum Menu
« Reply #3 on: February 05, 2009, 07:16:22 AM »
maybe  :D
in subs.php
 
find
Code: [Select]

 $buttons = array(
   'home' => array(
    'title' => $txt['home'],
    'href' => $scripturl,
    'show' => true,
    'sub_buttons' => array(
    ),
   ),

add after
 
Code: [Select]

 'Community' => array(
'title' => $txt['community'],
'href' => $scripturl . '?action=forums',
'show' => true,
'sub_buttons' => array(
),
),

u must edit,ı don't know  :(   =>  'href' => $scripturl . '?action=forums',

 
and lang file .
$txt['community'] ='Community'
.

Offline tohtori

  • Semi-Newbie
  • *
  • Posts: 12
    • Xxonkforia eroottinen foorumi
Re: Forum Menu
« Reply #4 on: February 05, 2009, 07:39:48 AM »
Easiest way to do this is find code below from Subs.php

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

replace with
Code: [Select]
'frontpage' => array(
    'title' => $txt['home'],
    'href' => 'http://www.url.to.your/frontpage.html',
    'show' => true,
    'sub_buttons' => array(
    ),
   ),
'home' => array(
    'title' => 'Community',
    'href' => $scripturl,
    'show' => true,
    'sub_buttons' => array(
    ),
   ),

This works in case when your forum has only one language.

Always remember to back up the file before making any changes.

Offline Joey Smith™

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 6,356
  • Gender: Male
Re: Forum Menu
« Reply #5 on: February 05, 2009, 03:37:31 PM »
Use this:

Backup all related files (Subs.php, and index.english.php)

Sources/Subs.php
Find:
Code: [Select]
'home' => array(
'title' => $txt['home'],
'href' => $scripturl,
'show' => true,
'sub_buttons' => array(
),
),

Replace with:
Code: [Select]
'home' => array(
     'title' => $txt['home'],
     'href' => $scripturl,
     'show' => true,
     'sub_buttons' => array(
),
 ),
         'frontpage' => array(
             'title' => $txt['frontpage'],
             'href' => 'http://www.url.to.your/frontpage.html',
             'show' => true,
             'sub_buttons' => array(
        ),
   ),

IN index.english.php

Find:
Code: [Select]
$txt['home'] = 'Home';
Replace with:
Code: [Select]
$txt['home'] = 'Community';
Add after:
Code: [Select]
$txt['frontpage'] = 'Home';