1 (edited by Jeff 2004-12-17 23:19)

Topic: nav links

I edited the way the navlinks home, user list etc.. are displayed in the functions.php but they dont show properly on the SEARCH, LOGIN or REGISTRATION page but they are fine everywhere else.

is there a way to fix this?

edit: they also dont get formatted from the
admin on these functions
Users, Censoring, Ranks, Bans,     Prune, or Maintenance

Re: nav links

what files did you change the links for? i think you just changed them for index.php, which you cant. if you did. you need to get a fresh index.php and reupload it.

to edit the links, find the function generate_navlinks in include/functions.php.

then you just need to copy/paste the punbb code to rearange the links

Indocron
$theQuestion = (2*b) || !(2*b);

Re: nav links

if you did edit functions.php paste what you did here

4

Re: nav links

function generate_navlinks()
{
    global $pun_config, $lang_common, $cookie, $cur_user;

        $links    =    '<table class="cats_list_table" align="center"><tr>';

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

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

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

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

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

5 (edited by Connorhd 2004-12-18 00:37)

Re: nav links

works fine for me

maybe clear your cache?

6

Re: nav links

I found the problem, I left off a " from the end of

echo ' "onLoad="document.getElementById(\''.$form_name.'\').'.$focus_element.'.focus()"';

thanks anyways.