[EN] How to ... add your own menu items

Locked
User avatar

Topic author
thomas.d
Former Team Member
Posts: 625
Joined: 19. January 2008 23:56
phpBB.de User: thomas.d
phpBB.com User: thomas.d
Contact:

[EN] How to ... add your own menu items

Post by thomas.d »

FAQ Table Of Contents / Inhaltsverzeichnis

Many users intend to add their own menu items to the portal menu (left column, top).

In this FAQ we talk about 3 kinds of links:

1. Internal forum links to functions already defined (already installed MODs etc.)
2. Internal forum links to functions which are not yet defined
3. External links to other websites

1. Instructions to add a link to the Arcade-MOD (Internal forum link):

Open

root/styles/*your_style*/template/portal/block/main_menu.html

Find

Code: Select all

	<li><a href="{U_INDEX}">{L_INDEX}</a></li>
Add after (or whereelse you want to place the link)

Code: Select all

	<li><a href="{U_ARCADE}">{L_ARCADE}</a></li>
Save, upload, purge cache, that's it.

---------------------------------------------------------------------------------

2. Instructions to add a link to a function which is not yet defined (maybe your own php-file ...):

Öffne

root/styles/*your_style*/template/portal/block/main_menu.html

Finde

Code: Select all

	<li><a href="{U_INDEX}">{L_INDEX}</a></li>
Add after (or whereelse you want to place the link)

Code: Select all

	<li><a href="{U_MY_LINK}">{L_MY_LINK}</a></li>
Open

root/includes/functions.php

Find

Code: Select all

    'U_PORTAL'         => append_sid("{$phpbb_root_path}portal.$phpEx"),   
Add after

Code: Select all

    'U_MY_LINK'         => append_sid("{$phpbb_root_path}my_link.$phpEx"),   
Open

root/language/en/mods/lang_portal.php (Example when your're using english lang files)

Find

Code: Select all

    'M_SEARCH'                        => 'Search',   
Add after

Code: Select all

    'MY_LINK'                        => 'My link',   
U_MY_LINK und L_MY_LINK may now be used in all templates.

Save, upload, purge cache, that's it.

---------------------------------------------------------------------------------

3. Instructions to add an external link (to another website):

Open

root/styles/*your_style*/templates/portal/block/main_menu.html

Find

Code: Select all

	<li><a href="{U_MEMBERLIST}">{L_MEMBERLIST}</a></li>
Add before (or whereelse you want to place the link)

Code: Select all

<li><a href="http://www.domain.com/" title="My internet link">My internet link</a></li>
If you want to have the link opened in a new browser window or -tab, please write

Code: Select all

<li><a href="http://www.domain.com/" title="My internet link" onclick="window.open(this.href); return false;">My internet link</a></li>
This code is then according to XHTML 1.0 STRICT, but it works with activated JavaScript only.

Instead of

Code: Select all

onclick="window.open(this.href); return false;"
you could write

Code: Select all

Target="_blank"
but this is not valid to XHTML 1.0 STRICT anymore.

Save, upload, purge cache, that's it.

FAQ Table Of Contents / Inhaltsverzeichnis
Viele Grüße

Thomas

Deutsche Sprachdateien für
[Alpha] phpBB Calendar 0.0.8 (alightner) | [RC] phpBB Arcade 1.0.RC8 |
ACP Add User MOD 1.0.0 |
Locked

Return to “KB-Archiv”