[EN] How to ... add your own menu items
Posted: 25. May 2008 20:32
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
Add after (or whereelse you want to place the link)
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
Add after (or whereelse you want to place the link)
Open
root/includes/functions.php
Find
Add after
Open
root/language/en/mods/lang_portal.php (Example when your're using english lang files)
Find
Add after
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
Add before (or whereelse you want to place the link)
If you want to have the link opened in a new browser window or -tab, please write
This code is then according to XHTML 1.0 STRICT, but it works with activated JavaScript only.
Instead of
you could write
but this is not valid to XHTML 1.0 STRICT anymore.
Save, upload, purge cache, that's it.
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>
Code: Select all
<li><a href="{U_ARCADE}">{L_ARCADE}</a></li>
---------------------------------------------------------------------------------
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>
Code: Select all
<li><a href="{U_MY_LINK}">{L_MY_LINK}</a></li>
root/includes/functions.php
Find
Code: Select all
'U_PORTAL' => append_sid("{$phpbb_root_path}portal.$phpEx"),
Code: Select all
'U_MY_LINK' => append_sid("{$phpbb_root_path}my_link.$phpEx"),
root/language/en/mods/lang_portal.php (Example when your're using english lang files)
Find
Code: Select all
'M_SEARCH' => 'Search',
Code: Select all
'MY_LINK' => 'My link',
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>
Code: Select all
<li><a href="http://www.domain.com/" title="My internet link">My internet link</a></li>
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>
Instead of
Code: Select all
onclick="window.open(this.href); return false;"
Code: Select all
Target="_blank"
Save, upload, purge cache, that's it.
FAQ Table Of Contents / Inhaltsverzeichnis