SMF Support > SMF 2.0.x Support

Quick, Simple ?

(1/1)

JavaNerd:
How do I add a custom button to the top of my SMF 3 forum?

It is like this:
forums.example.com

I want the 'Home' button to go to that URL and add a new one called 'Forum'

Thanks, JAVA

karlbenson:
In 2.x the buttons moved into Sources/Subs.php

FIND

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

--- End code ---
If you want to add another you'd need to copy after that

--- Code: --- 'forum' => array(
'title' => 'Forum',
'href' => $scripturl,
'show' => true,
'sub_buttons' => array(
),
),

--- End code ---

$scripturl is an smf variable pointing to the index.php of your forum.
You can change that for another url if you wish.

Replace $scripturl with
--- Code: ---'http://www.yoursite.com'
--- End code ---

JavaNerd:
Ok, but when I do that the buttons dont show up. Or a link or anything. I modified subs, index.template, and index.english :S Still nothing :(

JavaNerd:
Nevermind - I built a new method for loading buttons. I don't need Sub.php anymore.. Although after completing my files my mate told me what to do.. :\

Navigation

[0] Message Index

Go to full version