1

Topic: Becoming Crazy with <pun_navlinks> > How to change ?

<pun_navlinks> = in fact ...

<div id="brdmenu" class="inbox">
            <ul>
                <li id="navindex"><a href="index.php">Index</a></li>
                <li id="navuserlist"><a href="userlist.php">Liste des membres</a></li>
                <li id="navrules"><a href="misc.php?action=rules">Règles</a></li>
                <li id="navsearch"><a href="search.php">Recherche</a></li>
                <li id="navprofile"><a href="profile.php?id=2">Profil</a></li>
                <li id="navadmin"><a href="admin_index.php">Administration</a></li>
                <li id="navlogout"><a href="login.php?action=out&id=2">Déconnexion</a></li>
            </ul>
        </div>

It generates not only unordered list, but add a div !!!

I have searched everywhere (in particular in functions.php) but I have seen nowhere where CHANGE this. Is someone able to help me ?

2 (edited by zaher 2005-08-01 08:45)

Re: Becoming Crazy with <pun_navlinks> > How to change ?

header.php line 149

// START SUBST - <pun_navlinks>


include\functions.php line 230

function generate_navlinks()

You can add a link before return line

$links[] = '<li id="aid"><a href="someurl'</a>';
If your people come crazy, you will not need to your mind any more.

3

Re: Becoming Crazy with <pun_navlinks> > How to change ?

Thanx a lot smile

Re: Becoming Crazy with <pun_navlinks> > How to change ?

I have wanted to add navigation links into the forum menu myself. i.e. a "Home" link, similar to the PunBB.org link at the top of this page. It doesn't seem easy. I tried adding (functions.php line 230 on):

function generate_navlinks()
{
    global $pun_config, $lang_common, $pun_user;

    // Index and Userlist should always be displayed
    $links[] = '<li id="navhome"><a href="http://someURL.com/">'.$lang_common['Home'].'</a>';
    $links[] = '<li id="navindex"><a href="index.php">'.$lang_common['Index'].'</a>';
    $links[] = '<li id="navgallery"><a href="http://someURL.com/gallery/">'.$lang_common['Gallery'].'</a>';
    $links[] = '<li id="navuserlist"><a href="userlist.php">'.$lang_common['User list'].'</a>';

But this did not seem to work... What am I doing wrong?

Also, this would seem to be a feature that should be added to the administration panel. (Enter your desired navlink names, URLs, and positions in the nav menu). So if we update PunBB, we wouldn't need to manage versioning of functions.php.

Thanks.

James

James Melhuish

5

Re: Becoming Crazy with <pun_navlinks> > How to change ?

It is in the admin panel. 'Additional Menu Items' on the options page.

6 (edited by JMelhuish 2005-08-26 01:32)

Re: Becoming Crazy with <pun_navlinks> > How to change ?

Oh wow!  Thanks Elzar. I have been through this Options page so many times, but never exactly understood what "Additional Menu Items" meant, until I read your post and read the description under the entry field. Obvious now...

Thanks also Rikard!

James
------------------------------------

UPDATE:

Ooops, this is not working for me. Every time I enter a link, when I save changes, PunBB updates, but no menu item is created AND my link text is removed from the "Additional menu items" editing box.  I tried a bunch of different options, none worked, including things like:

0 = <a href="http://fullrangedriver.com/">Home</a>
1 = <a href="http://fullrangedriver.com">Home</a>
1=<a href="http://fullrangedriver.com/">Home</a>
7 = <a href="http://fullrangedriver.com/">Home</a>
1 = <a href="http://fullrangedriver.com/">Home</a>;
1 = <a href="http://fullrangedriver.com/index.html">Home</a>

What's up? Thanks.

version 1.2.6 running...

James

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

UPDATE 2:

Found the solution, bug in 1.2.6 , see http://punbb.org/forums/viewtopic.php?id=8086

James

James Melhuish