Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: Shepherd Jim on October 16, 2013, 12:02:41 PM

Title: How to Add Link (URL) to Forum's Menu?
Post by: Shepherd Jim on October 16, 2013, 12:02:41 PM
Hi All --
I'm using:
I have my SMF forum set up as "page" on my WordPress-powered website and that works perfectly: a user clicks on "Forum" on the header's menubar and seamlessly goes to the SMF forum.

Problem: I would like to offer a link back to the website from the forum's menu. I would like to add "Return to Website" or some such to the forum's menu standard items: Home, Help, Search, Logon, Register

How do I add a new item/URL to the menu?

Thanks for the help!
Jim

Title: Re: How to Add Link (URL) to Forum's Menu?
Post by: Burke ♞ Knight on October 16, 2013, 12:07:39 PM
How do I add buttons to SMF 2.0? (http://wiki.simplemachines.org/smf/How_do_I_add_buttons_to_SMF_2.0)
Title: Re: How to Add Link (URL) to Forum's Menu?
Post by: Shepherd Jim on October 17, 2013, 08:49:11 AM
Okay BurkeKnight!

Thank you for that link! It wasn't a cakewalk but I have managed to add a "button" to our forum's menu bar.

You can see my handywork at http://maineshootersforum.com/SMFor/index.php (http://maineshootersforum.com/SMFor/index.php) where the button reading "Return to Website" has been inserted.

I'm a WordPress person, but must admit that it's been a few years since I had to climb around inside a php file and make changes. I probably spent more time figuring out how to remove the "sub menu" item(s) which insisted on appearing when I hovered my mouse over the button.

Here's what I inserted into the file Subs.php
// BEGIN the EC3 mod follow
'menu_action' => array(
'title' => 'Return to Website',
'href' => "http://maineshootersforum.com/",
'show' => true,
'sub_buttons' => array(
),
),
// END the EC3 mod


QUESTION: Will I need to go in and re-do this modification every time the SMF software is updated?

Thanks again! I'm SURE I will be back here soon!   ::)   :-[
Jim
Title: Re: How to Add Link (URL) to Forum's Menu?
Post by: Kindred on October 17, 2013, 09:36:45 AM
well, for convention's sake, you should use single quotes around the http url...   that is what SMF uses throughout.

subversion/security updates - no, if you apply the patch files, you won't have to re-apply changes
jversion upgrades (i.e. 2.1 or 3.0) yes... you would have to re-do your edits