Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: nathan89 on February 04, 2009, 09:53:37 PM

Title: Forum Menu
Post by: nathan89 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?
Title: Re: Forum Menu
Post by: Tyrsson 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)?
Title: Re: Forum Menu
Post by: nathan89 on February 05, 2009, 06:57:39 AM
I would like the homepage to be called "Home" and the Forum to be called "Community".
Title: Re: Forum Menu
Post by: Balaban on February 05, 2009, 07:16:22 AM
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'
Title: Re: Forum Menu
Post by: tohtori on February 05, 2009, 07:39:48 AM
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.
Title: Re: Forum Menu
Post by: Tyrsson on February 05, 2009, 03:37:31 PM
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';