News:

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

Main Menu

Need a BACK TO HOMEPAGE button :)

Started by sparkyj, September 01, 2008, 01:35:24 AM

Previous topic - Next topic

sparkyj

Hi, I can't seem to find any info on how to do this but this is probably a common request.
(I posted this question befor but it seems to have been deleted or didn't take)

How do I add a back to homepage button at the top of the message board? or add a link to the placed PNG file at the top?

Thanks.

spearfish

What's your SMF version?

I know on SMF 2.0 you can add to the menubar by editing Subs.php, which is found at yorusite.com/forum/Sources/Subs.php, starting at line ~3800.

For 1.x I believe you make a template change.

Nathaniel

SMF Friend (Former Support Specialist) | SimplePortal Developer
My SMF Mods | SimplePortal

"Quis custodiet ipsos custodes?" - Who will Guard the Guards?

Please don't send me ANY support related PMs. I will just delete them.

sparkyj

running Version: 1.1.5.

This may be over my head, This example is using some sort of "home" page idea. the site itself has a Home button. I don't understand where a link is supposed to go. hmm

Nathaniel

Basically that tutorial helps you to add new menu buttons to your forum, the menu buttons/tabs are the links like 'Home', 'Help', 'Search' and 'Admin' that you see at the top of your forum. You can add your own which says 'Main Website' or something similar.

I can show you exactly where to add them if you can tell me which theme you are using and where you want it, you will also have to post your 'index.template.php' file. ;)

I will also need to know some more information about the button that you want to add, 'url', 'title' and etc.
SMF Friend (Former Support Specialist) | SimplePortal Developer
My SMF Mods | SimplePortal

"Quis custodiet ipsos custodes?" - Who will Guard the Guards?

Please don't send me ANY support related PMs. I will just delete them.

jlb11

Me too please.  Just setting up and need a button to go back to one page on my main website.  I'm using the Classic YaBB SE Theme and it would work fine to be side by side with the other buttons.

[SiNaN]

../Themes/classic/index.template.php

Find:

// Show the [home] and [help] buttons.

Replace:

// Show the [new] button.
echo '
<a href="SITE_URL">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/home.gif" alt="HOME_PAGE_TITLE" border="0" />' : 'HOME_PAGE_TITLE'), '</a>', $context['menu_separator'];

// Show the [home] and [help] buttons.


Change SITE_URL as your site url. Change HOME_PAGE_TITLE with the title you want to use for your homepage.

You can use this tool to create your own menu image.
Former SMF Core Developer | My Mods | SimplePortal

jlb11

Sorry to be so dense.  I followed your instructions and now I have two 'home' buttons on my forum.  How do I change one of them to have my website name on it?  And what directory does it go into?

jlb11

It's OK.  Got it.  It just takes some rooting around.  I couldn't figure out the button generator so I edited the 'home' one and it looks perfect.

Advertisement: