News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

How to tell if someone's a moderator WITHOUT an extra db hit?

Started by nietzsche, January 08, 2004, 08:11:39 AM

Previous topic - Next topic

nietzsche

I'd like to make a link (under menu_template() in index.php - that's SLICK, BTW) that only admins and moderators can see.

However, the problem I'm running into is this:  a moderator is a normal user, as there is no "moderator" usergroup (that I'm aware of).

Right now, this is what I've got:
Quote   // Petfish email login (mods and admins only)
        if ( ($context['user']['is_admin']) or ($context['user']['is_moderator']) )
        {
            echo $context['menu_separator'] . '<a href=hxxp:petfish.net/squirrelmail/src/login.php [nonactive]>Check your petfish email</a>';
        }
the $context['user']['is_moderator'] is a shot in the dark ...

UPDATE:  I've just noticed something:  it does work, but only after the moderator visits a board that they are a mod on.  So - is that flag set per-board, then?  I ask this because admins can see that menu item the whole time.

nietzsche

Yeah.  I think this is EXACTLY what's going on.

Okay, so is there any way to look at a person's status from the home page before they check out a board?

[Unknown]

A moderator is only a moderator of the board they moderate.  They are not moderators of other boards, or the entire forum. If you want, you can create a group for moderators and stick your moderators in that group.... then check if they are in that group.

Please post future support requests in the Charter Member only boards until public release.

-[Unknown]

pulpitfire

muhuhuaha...so there's a menu template option in index.php.   8)

why don't those guys show as charter members?

[Unknown]

Hmm... this is interesting.  I'm too tired for this.

-[Unknown]

nietzsche

Quote from: [Unknown] on January 08, 2004, 01:37:32 PM
A moderator is only a moderator of the board they moderate.  They are not moderators of other boards, or the entire forum. If you want, you can create a group for moderators and stick your moderators in that group.... then check if they are in that group.

Please post future support requests in the Charter Member only boards until public release.

-[Unknown]

DOH.  Sorry about that.   Feel free to move this post over to its new home.

Advertisement: