News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Home Button

Started by Jared867, July 07, 2006, 05:27:51 PM

Previous topic - Next topic

Jared867

I need help please

My homebutton on top of my SMF forums goes to my SMF forums but I want to set it to go to my actual homepage but I cant figure how to do it. I tried to change some of the code where I thoght it was but it just gave me an error. I am really new at this coding stuff and could really use a hand here.

Thanks, Jared


unrelenting

What theme are you using?

Jared867

I am using the default theme though I changed out some of the graphics... but the code is all the same.

unrelenting

#3
Just look in the Themes/Default folder and open the index.template.php and look for this line:





// Show the [home] button.
	
echo (
$current_action=='home' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
	
	
	
	
<td valign="top" class="maintab_' 
$current_action == 'home' 'active_back' 'back' '">
	
	
	
	
	
<a href="'
$scripturl'">' $txt[103] , '</a>
	
	
	
	
</td>' 
$current_action == 'home' '<td class="maintab_active_' $last '">&nbsp;</td>' '';





Change the <a href="', $scripturl, '">' , $txt[103] , '</a> to something like this:



<a href="http://linktoyourhomepage.com/index.html">' , "WhateverYouWantTheNameOfTheButtonToBe" , '</a>

Jared867

I dont seem to find the exact code you have shown me above so I am not sure where to paste what you suggest... here is the code in my index.template.php that refers to the home button (atleast I  think it does)

// Show the [home] and [help] buttons.
echo '
<a href="', $scripturl, '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/home.gif" alt="' . $txt[103] . '" style="margin: 2px 0;" border="0" />' : $txt[103]), '</a>', $context['menu_separator'], '
<a href="', $scripturl, '?action=help" target="_blank">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/help.gif" alt="' . $txt[119] . '" style="margin: 2px 0;" border="0" />' : $txt[119]), '</a>', $context['menu_separator'];


I know somewhere in there is where id change the area my home button points to, right? I just dont knwo where hehe

unrelenting

Quote from: Jared867 on July 08, 2006, 12:06:38 PM
I dont seem to find the exact code you have shown me above so I am not sure where to paste what you suggest... here is the code in my index.template.php that refers to the home button (atleast I  think it does)

// Show the [home] and [help] buttons.
echo '
<a href="', $scripturl, '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/home.gif" alt="' . $txt[103] . '" style="margin: 2px 0;" border="0" />' : $txt[103]), '</a>', $context['menu_separator'], '
<a href="', $scripturl, '?action=help" target="_blank">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/help.gif" alt="' . $txt[119] . '" style="margin: 2px 0;" border="0" />' : $txt[119]), '</a>', $context['menu_separator'];


I know somewhere in there is where id change the area my home button points to, right? I just dont knwo where hehe

You must have something other than 1.1 RC2 which is what I am using. I can only guess and here is my guess:

In the first <a href line replace this:

<a href="', $scripturl, '">

With this:

<a href="http://linktoyourhomepage.com/index.html">

The button will still say HOME but clicking on it should lead to the link that you put in there.

Advertisement: