News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

How to change the home page of my forum

Started by danster, June 18, 2017, 05:53:20 AM

Previous topic - Next topic

danster

Hi..! all I'm using smf 2.0.14 and I just want to change my forum home link to another page I mean for now when clicking on the home button it will direct to my forum index page so I want to change it to another link so pls some one can help me to do that

Thank you..

Kindred

well, you are going to confuse your users... they expect the home button to go back to the forum home page...   so, if you do this, you had better also add a forum-home button.

you have to edit the menu array in Subs.php
https://wiki.simplemachines.org/smf/Buttons_-_How_do_I_add_buttons_to_SMF_2.0
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

danster

hi Kindred., Thanks for reply me i try to find that but it's hard for me pls can you tell me to find the home button which code i have to search in  the subs.php

thank you

d3vcho

Hey! It's from line 3930, the first one. You can edit the 'href' field with a full URL, if you want. It depends on where do you actually want to redirect users when they click that button.

'home' => array(
'title' => $txt['home'],
'href' => $scripturl,
'show' => true,
'sub_buttons' => array(
),
'is_last' => $context['right_to_left'],
),
"Greeting Death as an old friend, they departed this life as equals"

danster

hi thanks for replay me I try it like this but it's not working pls look at this and check the way I did correct


'home' => array(
'title' => $txt['home'],
'href' => http://mydomain.com/general-chatdiscussion/,
'show' => true,
'sub_buttons' => array(
),
'is_last' => $context['right_to_left'],
),


pls let me know if it is not correct how it correct
thank you

d3vcho

#5
The URL must be between '', like this: 'http://simplemachines.org'. Leave the single quote out ^^

[edit] it is not a comma ;) Illori
"Greeting Death as an old friend, they departed this life as equals"

Kindred

Illori...   that's not a good edit.
There IS a comma there, and it must be left outside of the single quotes, as d3vcho mentioned originally....


'href' => 'http://your.url.com',
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Illori

it read to me to leave it out completely, that is what we get for not giving a complete sample, sorry.

danster


Advertisement: