Simple Machines Community Forum

General Community => Scripting Help => Aiheen aloitti: wilcosky - maaliskuu 21, 2007, 05:49:45 AP

Otsikko: There must be a simple solution
Kirjoitti: wilcosky - maaliskuu 21, 2007, 05:49:45 AP
I'm sure this has been asked before, but honestly, I'm lazy and don't want to search the boards for the answer.  All I want to do is add a link to the main menu, you know the menu that says "home", "help", "search", "profile", etc... I just want to add a link that will take visitors back to the main page on my site.

But how?
Otsikko: Re: There must be a simple solution
Kirjoitti: Herman's Mixen - maaliskuu 21, 2007, 10:21:53 AP
http://docs.simplemachines.org/index.php?topic=564.msg927#msg927
Otsikko: Re: There must be a simple solution
Kirjoitti: wilcosky - maaliskuu 22, 2007, 04:17:14 AP
Lainaus käyttäjältä: The Burglar! - maaliskuu 21, 2007, 10:21:53 AP
http://docs.simplemachines.org/index.php?topic=564.msg927#msg927

I remember now, I found that tutorial once before, but I gave up, and I remember why now, it doesn't work for me... I add the code just like it says to add the code and a new menu item never appears. Someone really should make a mod that lets you add menu items easily. 

All I want to do it add a link that will take visitors to the back to the main part of my site, because my message boards are seperate from the rest of my site.  What could I be doing wrong, how would I do this.. I need the link to be something like http://www.mysite.com... sigh
Otsikko: Re: There must be a simple solution
Kirjoitti: Herman's Mixen - maaliskuu 23, 2007, 05:44:14 AP
open you index.template.php and search

// How about the [search] button?
if ($context['allow_search'])
echo ($current_action == 'search' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'search' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=search">' , $txt[182] , '</a>
</td>' , $current_action == 'search' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';


after that place this

// How about the [website] button?
if ($context['allow_search'])
echo ($current_action == 'search' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'search' ? 'active_back' : 'back' , '">
<a href="', $scripturl, 'http://www.yourwebsitelinkhere.com">Website' , '</a>
</td>' , $current_action == 'search' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';


and play along with it this is just a sample

Otsikko: Re: There must be a simple solution
Kirjoitti: Gwydion Frost - maaliskuu 24, 2007, 04:28:00 AP
You also have to create the button for the menu, as well... ;)