1 (edited by Jimi 2006-02-20 04:59)

Topic: adding a link to Navlink

In functions.php what do I have to change in the array to add another link to the Navlink Bar. I'd just use Options in Admin but I need it to be only acccsesible to members.

        // Are there any additional navlinks we should insert into the array before imploding it?
    if ($pun_config['o_additional_navlinks'] != '')
    {
        if (preg_match_all('#([0-9]+)\s*=\s*(.*?)\n#s', $pun_config['o_additional_navlinks']."\n", $extra_links))
        {
            // Insert any additional links into the $links array (at the correct index)
            for ($i = 0; $i < count($extra_links[1]); ++$i)
                array_splice($links, $extra_links[1][$i], 0, array('<li id="navextra'.($i + 1).'">'.$extra_links[2][$i]));
        }
    }

Is the array but I'm not that great at php yet...yet.

Re: adding a link to Navlink

Can't you add extra links in the admin CP?

Through the awful grace of God

"Dude, CSS and XHTML are like two boys who are deeply in love.  They're perfect for each other, but no one can acccept it."

Re: adding a link to Navlink

Read the first line on top Bradyn wink

Jimi, better do it right underneath the PUN_MOD check, where the Profile link and such is added smile

Re: adding a link to Navlink

Ohhhhh, my bad.

Through the awful grace of God

"Dude, CSS and XHTML are like two boys who are deeply in love.  They're perfect for each other, but no one can acccept it."

5 (edited by Jimi 2006-02-20 19:48)

Re: adding a link to Navlink

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="navupload"><a href="http://x10temp.woolie.co.uk/uploader/index.php">'.$lang_common['Uploader'].'</a>';[/b]
                                
                        $links[] = '<li id="navlogout"><a href="login.php?action=out&id='.$pun_user['id'].'">'.$lang_common['Logout'].'</a>';

This is what I am doing but it fails to work and I don't know why.

Re: adding a link to Navlink

Remove the bold BBCode at the end of the line.

Looking for a certain modification for your forum? Please take a look here before posting.

7 (edited by Jimi 2006-02-20 20:37)

Re: adding a link to Navlink

That was only there because I was going to make that line bold in the post but remebered that the [ code] tag acts as a nophrase. It's not in the actually code in my functions.php.

Re: adding a link to Navlink

Have you added "uploader" to the language file yet?

Looking for a certain modification for your forum? Please take a look here before posting.

9

Re: adding a link to Navlink

Okay I did that now, but it still dosen't work. I think there is a problem with the link ID I'm not sure what I'm actually sussposed to do with that somewhere else.

10

Re: adding a link to Navlink

Can you make changes like that on mypunbb?

11 (edited by Jimi 2006-02-20 22:22)

Re: adding a link to Navlink

No because you dont have accses to files past the templates on mypunbb.

Re: adding a link to Navlink

Try making the id navlogout or something like that smile

13

Re: adding a link to Navlink

Yeah I figured it out basically it was me being dumb and not thinking. smile Thanks everybody.