Avatar

add a link (Todo)

by Auge ⌂, Monday, February 26, 2018, 08:35 (2223 days ago) @ michael

Hello

[image]

I would like to add a link to a specific forum before username.


Let's summarise: You want to add a lik to the user menu. In your last posting your wish was to add it "after logout" (on the right side of logout link?), in this posting "before username" (in front of the username or on the left side of username?).

Easy way with side effects:

Open the file themes/default/main.tpl, go to line number 56 and add a new list item with your link to the line. If the link should arise in front of the username, add the new code directly after {if $user} at the start of the line. If you want it to follow it to the logout link, search for {#log_out_link#}</a></li>{else} and insert the HTML-code beween the </li> and the {else}.

The HTML-code for your link should look like one of the following examples.

Link to an external site:

<li><a href="https://www.example.net/possibly/path/to/the/page.html">Linktext</a></li>

Link to an internal page

<li><a href="path/to/the/page.html">Linktext</a></li>

The side effect is the unintended possibly overwrite of your changes when you performing an forum update with a new main.tpl. It's your task to bear your changes in mind.

The other, clean but laborious way:

Copy the default template to a new directory beside themes/default and apply the above mentioned changes to this new theme. The directory name would also be the themes name in the admins form (i.e. themes/your_theme => "your_theme"). An unintended overwrite during a forum update is impossible on that way but you would have the task to check all files of your theme for necessary updates and to apply these changes. To be fair, if the main.tpl would be the only file you changed yourself, this would only be a simple transfer of the other files from the default theme.

Tschö, Auge

--
Trenne niemals Müll, denn er hat nur eine Silbe!


Complete thread:

 RSS Feed of thread