Topic: How to!?

How do I make a new text in the "Navigation bar"?

For an example:

Index   User List   Search   Profile   Logout

I want it to look like this

Index   User List   Search   Profile   IRC Chat   Logout


Please help me fast! smile

Need help with PunBB! Please PM me or add me on MSN if you wish to help!
[img]http://img488.imageshack.us/img488/1405/orcix4.png[/img]

Re: How to!?

In Admin Panel > Options put it under Additional Navigation Links smile

Re: How to!?

Thank you! smile

Need help with PunBB! Please PM me or add me on MSN if you wish to help!
[img]http://img488.imageshack.us/img488/1405/orcix4.png[/img]

4

Re: How to!?

if you want the link to not be there when not logged in, you could do it in functions.php
that way is a little tricky if you dont know your way around the coding though.

Re: How to!?

Mark wrote:

if you want the link to not be there when not logged in, you could do it in functions.php
that way is a little tricky if you dont know your way around the coding though.

Let's say Xariov would have wanted his IRC chat menu to appear only for Mods, wouldn't had it been as easy as entering a new line in the Pun_Mod section of functions.php?
Something like:
$links[] = '<li id="navsearch"><a href="ircchat.html">'.$lang_common['IRC Chat'].'</a>';
?

Re: How to!?

Vanslyde wrote:
Mark wrote:

if you want the link to not be there when not logged in, you could do it in functions.php
that way is a little tricky if you dont know your way around the coding though.

Let's say Xariov would have wanted his IRC chat menu to appear only for Mods, wouldn't had it been as easy as entering a new line in the Pun_Mod section of functions.php?
Something like:
$links[] = '<li id="navsearch"><a href="ircchat.html">'.$lang_common['IRC Chat'].'</a>';
?

Yep, that's pretty much it, except it would be in the else section of the conditional.

                if ($pun_user['g_id'] > PUN_MOD)
                {
                        if ($pun_user['g_search'] == '1')
                                $links[] = '<li id="navsearch"><a href="search.php">'.$lang_common['Search'].'</a>';

                        $links[] = '<li id="navprofile"><a href="profile.php?id='.$pun_user['id'].'">'.$lang_common['Profile'].'</a>';
                        $links[] = '<li id="navlogout"><a href="login.php?action=out&id='.$pun_user['id'].'">'.$lang_common['Logout'].'</a>';
                }
                else
                {
                        $links[] = '<li id="navsearch"><a href="search.php">'.$lang_common['Search'].'</a>';
                        $links[] = '<li id="navprofile"><a href="profile.php?id='.$pun_user['id'].'">'.$lang_common['Profile'].'</a>';
                        $links[] = '<li id="navadmin"><a href="admin_index.php">'.$lang_common['Admin'].'</a>';
                        $links[] = '<li id="navlogout"><a href="login.php?action=out&id='.$pun_user['id'].'">'.$lang_common['Logout'].'</a>';
                }
Looking for a certain modification for your forum? Please take a look here before posting.

7

Re: How to!?

yeah thats relatively simple.....i still dont see why it works that way seeing as how its saying if pun user group id is greater than PUN_MOD....in this case the ">" means less than?

Re: How to!?

No, > means greater than wink

PUN_MOD is 2
PUN_ADMIN is 1
All other groups are > 2 wink

The group IDs are just set up that way

Re: How to!?

pogenwurst wrote:

Yep, that's pretty much it, except it would be in the else section of the conditional.

Is there anything specific I should enter as a li id tag?
I tried
$links[] = '<li id="online"><a href="online.php">'.$lang_common['Online'].'</a>';
and
$links[] = '<a href="online.php">'.$lang_common['Online'].'</a>';
but all it did was adding a little blank space in the menu... Should I add the code in another page as well?

10

Re: How to!?

Have you got "Online" in your lang/english/common.php file?

Re: How to!?

Just added it
Thanks! smile