Topic: Adding more links to top

I wanna know that how to add more links to top of the forums. I mean that place where is all "User list", "Rules", "Search" etc. Example link "Downloads" which go to myserv.com/downloads/index.php

[img]http://www.kaffir.org/images/sigs/pauliesig6.jpg[/img]

Re: Adding more links to top

look for the Additional Menu items in admin options (v1.2.1 only)

Re: Adding more links to top

Sorry, I didn't say that I use punBB1.1.5 tongue
I tried to update it to 1.2, but when I runned updater file, it destroyed my mySQL database.
So I wanna keep 1.1.5, help?

[img]http://www.kaffir.org/images/sigs/pauliesig6.jpg[/img]

Re: Adding more links to top

you need to edit the function generate_navlinks in functions.php

Re: Adding more links to top

I doubt the 1.2 update script "destroyed" your database. What happened?

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: Adding more links to top

I runned updater, then when I tried go to forums, I got msg "mySQL error" or something like that.
But anyway, I got backup from mySQL db so..
Someone know that how to add more links to the top ( with punBB 1.1.5 ) ?

[img]http://www.kaffir.org/images/sigs/pauliesig6.jpg[/img]

Re: Adding more links to top

Have you installed any mods or anything that might have changed the database? What was the MySQL error? I'm sure it can be fixed rather easily.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: Adding more links to top

I have installed 3 mods.
Private msg system for 1.1.5
Colouring usernames for 1.1.5
And Multigroup mod for 1.1.5
None of that working. Private msg system didn't make link "Messages" to the top. All mods said "installed successfully" but they didn't make multigroups or colour usernames.
But anyway, dont mind, I still wanna know that how to add links to the top.. ?

[img]http://www.kaffir.org/images/sigs/pauliesig6.jpg[/img]

Re: Adding more links to top

Connorhd wrote:

you need to edit the function generate_navlinks in functions.php

10

Re: Adding more links to top

Hmm what I need to edit in there?
Can you help me, what I do if I wanna link "Downloads" to the top?

[img]http://www.kaffir.org/images/sigs/pauliesig6.jpg[/img]

11 (edited by Dr.Jeckyl 2005-02-22 20:06)

Re: Adding more links to top

look for this. this is a STOCK UNTOUCHED version of the code in question in functions.php file in punbb 1.1.5:

//
// Generate the "navigator" that appears at the top of every page
//
function generate_navlinks()
{
    global $pun_config, $lang_common, $cookie, $cur_user;

    // Home and Userlist should always be displayed
    $links[] = '<a href="index.php">'.$lang_common['Home'].'</a> | <a href="userlist.php">'.$lang_common['User list'].'</a>';

    if ($pun_config['o_rules'] == '1')
        $links[] = '<a href="misc.php?action=rules">'.$lang_common['Rules'].'</a>';

    if ($cookie['is_guest'])
    {
        if ($pun_config['o_search'] == '1' && $pun_config['p_guests_search'] == '1')
            $links[] = '<a href="search.php">'.$lang_common['Search'].'</a>';

        $links[] = '<a href="register.php">'.$lang_common['Register'].'</a> | <a href="login.php">'.$lang_common['Login'].'</a>';
        
        $info = $lang_common['Not logged in'];
    }
    else
    {
        if ($cur_user['status'] < PUN_MOD)
        {
            if ($pun_config['o_search'] == '1')
                $links[] = '<a href="search.php">'.$lang_common['Search'].'</a>';

            $links[] = '<a href="profile.php?id='.$cur_user['id'].'">'.$lang_common['Profile'].'</a>';
            $links[] = '<a href="login.php?action=out">'.$lang_common['Logout'].'</a>';
        }
        else
        {
            $links[] = '<a href="search.php">'.$lang_common['Search'].'</a>';
            $links[] = '<a href="profile.php?id='.$cur_user['id'].'">'.$lang_common['Profile'].'</a>';
            $links[] = '<a href="admin_index.php">'.$lang_common['Admin'].'</a>';
            $links[] = '<a href="login.php?action=out">'.$lang_common['Logout'].'</a>';
        }
    }

    return implode(' | ', $links);
}

you will need to edit this section to add you own links to the list.

~James
FluxBB - Less is more

12

Re: Adding more links to top

Didn't work:

//
// Generate the "navigator" that appears at the top of every page
//
function generate_navlinks()
{
    global $pun_config, $lang_common, $cookie, $cur_user;

    // Home and Userlist should always be displayed
    $links[] = '<a href="index.php">'.$lang_common['Home'].'</a> | <a href="userlist.php">'.$lang_common['User list'].'</a> | <a href="downloads/index.php">'.$lang_common['Downloads'].'</a>';

    if ($pun_config['o_rules'] == '1')
        $links[] = '<a href="misc.php?action=rules">'.$lang_common['Rules'].'</a>';

    if ($cookie['is_guest'])
    {
        if ($pun_config['o_search'] == '1' && $pun_config['p_guests_search'] == '1')
            $links[] = '<a href="search.php">'.$lang_common['Search'].'</a>';

        $links[] = '<a href="register.php">'.$lang_common['Register'].'</a> | <a href="login.php">'.$lang_common['Login'].'</a>';
        
        $info = $lang_common['Not logged in'];
    }
    else
    {
        if ($cur_user['status'] < PUN_MOD)
        {
            if ($pun_config['o_search'] == '1')
                $links[] = '<a href="search.php">'.$lang_common['Search'].'</a>';

            $links[] = '<a href="profile.php?id='.$cur_user['id'].'">'.$lang_common['Profile'].'</a>';
            $links[] = '<a href="login.php?action=out">'.$lang_common['Logout'].'</a>';
        }
        else
        {
            $links[] = '<a href="search.php">'.$lang_common['Search'].'</a>';
            $links[] = '<a href="profile.php?id='.$cur_user['id'].'">'.$lang_common['Profile'].'</a>';
            $links[] = '<a href="admin_index.php">'.$lang_common['Admin'].'</a>';
            $links[] = '<a href="login.php?action=out">'.$lang_common['Logout'].'</a>';
        }
    }

    return implode(' | ', $links);
}
[img]http://www.kaffir.org/images/sigs/pauliesig6.jpg[/img]

13 (edited by Dr.Jeckyl 2005-02-23 09:25)

Re: Adding more links to top

if he is to use

 $lang_common['Downloads'].

someone please correct me if i'm wrong but shouldn't he have to add "downloads" to this list(in \lang\en\en_common.php)?

// Stuff for the navigator (top of every page)
'Home'                    =>    'Home',
'User list'                =>    'User list',
'Rules'                    =>  'Rules',
'Search'                =>  'Search',
'Register'                =>  'Register',
'Login'                    =>  'Login',
'Not logged in'            =>  'You are not logged in.',
'Profile'                =>    'Profile',
'Logout'                =>    'Logout',
'Logged in as'            =>    'Logged in as',
'Admin'                    =>    'Admin',
'Last visit'            =>    'Last visit',
~James
FluxBB - Less is more

Re: Adding more links to top

yeh, but isntead of using  $lang_common['Downloads'] just use Downloads tongue