News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Forum Menu

Started by nathan89, February 04, 2009, 09:53:37 PM

Previous topic - Next topic

nathan89

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?

Tyrsson

You will need to code that into the subs file. What would you like the tab to say (what label)?
PM at your own risk, some I answer, if they are interesting, some I ignore.

nathan89

I would like the homepage to be called "Home" and the Forum to be called "Community".

Balaban

maybe  :D
in subs.php

find

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


add after


'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'
.

tohtori

Easiest way to do this is find code below from Subs.php


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


replace with

'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.

Tyrsson

Use this:

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

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


Replace with:
'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:
$txt['home'] = 'Home';

Replace with:
$txt['home'] = 'Community';

Add after:
$txt['frontpage'] = 'Home';
PM at your own risk, some I answer, if they are interesting, some I ignore.

Advertisement: