NineChime forum

Furry stuff, oekaki stuff, and other stuff.

You are not logged in.

#1 05-06-2008 18:36:32

acwitness
Member

Need a little menu help

I am in the process of switching my Wax board over to the new Wac. Almost ready to go, but need help with one menu item.

I have a link to a gallery which is available to visitors without having to be logged in. I also have a link to a gallery registration page become available when members log in.

I have this in my header file:


$left_menu[] = '<link to/gallery>'.$langop_gallery.'</a>';

if ($flags['D']) {
$left_menu[] = '<link to registration>'.$langop_gallery_register.'</a>';

}


What I would like to do is remove the separator between these two items (sorry, don't know PHP):

http://dannyssong.org/eh2/help.jpg



Never mind - I did this:

if (!empty ($OekakiU)) {
    // Logged in
   
    $left_menu[] = '<a href="http://eh.dannyssong.org/gallery/">'.$langop_gallery_register.'</a>';
} else {
    // Logged out
    $left_menu[] = '<a href="http://eh.dannyssong.org/gallery/">'.$langop_gallery.'</a>';
}

Last edited by acwitness (05-06-2008 21:55:14)

Offline

#2 05-16-2008 16:44:30

Ashass
Member

Re: Need a little menu help

Be careful about using a generic $oekakiu because if a bad person sets a fake cookie it will still consider it as set, even if its not a valid user in the database

Offline

#3 05-17-2008 03:09:30

Waccoon
Administrator

Re: Need a little menu help

The "boot.php" script validates both $OekakiU and $OekakiPass.  If they don't match up to what's in the database, then they are both set as "empty".  So, if either one is empty, then that person is a guest.

The "proper" way to tell if someone is a member is to test the boolean member flag, as follows:

Code:

if ($flags['member']) {

The $flags array contains a lot of useful information on the member or guest currently viewing the board.  Take a closer look at "boot.php" to see what options are available.

Offline

Board footer

Yep, still running PunBB
© Copyright 2002–2008 PunBB