News:

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

Main Menu

Adding a link to my Website to the forums menu

Started by michaeloeser, February 28, 2012, 05:20:23 AM

Previous topic - Next topic

michaeloeser

Hi there,

I´m quite new to SMF and I found several outdated information (or very old post) but nothing that helped me. I want to add a Link to my main website before the forums "home" navigation link. And I want the forum home link call "Forum Home" instead of just "Home".

I found something in my index.template.php that looks like this:

<div class="nav_bar">
<div class="nav_bar_inner" style="width: ', !empty($settings['forum_width']) ? $settings['forum_width'] : '' ,'">
<div class="nav_bar_content">
', template_menu() ,'
</div>
</div>
</div>


I´m using this theme: http://custom.simplemachines.org/themes/index.php?lemma=2561 with some slight css modifications.

How can I do that?

geek_andy

To rename "Home" to "Forum Home":

Open: ./Themes/default/languages/index.english.php

Find: $txt['home'] = 'Home';

Replace with: $txt['home'] = 'Forum Home';

michaeloeser

Awesome. That worked although I had to add that string because it wasn´t there. Anyway do you also have a solution for the other issue? (adding website link)  ;)

Gary

You'd need to edit one of the source files. I don't have current access to them right now. But when I get home, I'll look it up if I'm not beaten.
Gary M. Gadsdon
Do NOT PM me unless I say so
War of the Simpsons
Bongo Comics Fan Forum
Youtube Let's Plays

^ YT is changing monetisation policy, help reach 1000 sub threshold.


michaeloeser

Figured it out. Interesting  ;)

This is what is located in the index.template file

// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
global $context, $settings, $options, $scripturl, $txt;
echo '<div class="nav_bar_item"><a class="nav_bar_item_link" href="http://www.der-prinz.com/">Home</a></div>';

foreach ($context['menu_buttons'] as $act => $button)
{
echo '


<div class="nav_bar_item', $button['active_button'] ? ' active ' : '', '" id="button_', $act, '">
<a class="nav_bar_item_link', $button['active_button'] ? ' active ' : '', '" href="', $button['href'], '"', isset($button['target']) ? ' target="' . $button['target'] . '"' : '', '>
', $button['title'], '
</a>
</div>


';
}

}


I simply added this line and it works.

echo '<div class="nav_bar_item"><a class="nav_bar_item_link" href="http://www.der-prinz.com/">Home</a></div>';


Advertisement: