Forum Index   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
RogueOffline



Joined: Apr 16, 2005
Posts: 4

Status: Offline
Post   Posted: Jun 15, 2005 - 05:52 AM Reply with quote Back to top

Hi All,
I was wondering how you would add the members user status (eg: Admin, Mod, User) to the end of the welcome message.

Thanx in advance

Regards,
Rogue

_________________
Dream as if you'll live Forever.
Live as if you'll die Tomorrow.
- Unknown
View user's profile Send private message Visit poster's website
Chestnut
Site Admin


Joined: Oct 08, 2003
Posts: 1065
Location: Paris - France
Post   Posted: Jun 15, 2005 - 10:45 AM Reply with quote Back to top

mmm Wich welcome message ?

And although it is not necessarily difficult, the difficulty rises with the fact that a user can be a member of multiple groups. So the question could be : If a user is a member of X and Y and Z ... wich one has the priority ?
Wink

_________________
Chestnut ! Cool
Administrator
PNConcept.com
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
RogueOffline



Joined: Apr 16, 2005
Posts: 4

Status: Offline
Post   Posted: Jun 15, 2005 - 02:58 PM Reply with quote Back to top

Quote:
mmm Wich welcome message ?

In the header section of the theme.

This is what i have but it only shows the Admin.

Code:

echo "<td align=\"left\" width=\"25%\">&nbsp;&nbsp;<font color=\"$textcolor2\">Welcome, ".pnUserGetVar('uname')." ";
if (pnUserLoggedIn() and (!isset($op) or ($op == 'adminMain'))) {
echo " ( Admin )";
        } else {
echo " ( User )";
        };
echo "      </font>";


I think I am way off the mark Confused

_________________
Dream as if you'll live Forever.
Live as if you'll die Tomorrow.
- Unknown
View user's profile Send private message Visit poster's website
Chestnut
Site Admin


Joined: Oct 08, 2003
Posts: 1065
Location: Paris - France
Post   Posted: Jun 15, 2005 - 03:04 PM Reply with quote Back to top

mmm not... off yes but not a lot Wink

If you are on 750 and have legacy functions enabled (see your Settings), you can use this :

Code:

if (pnUserLoggedIn()) {
    if (is_admin()) {
        echo " ( Admin )";
    } else {
        echo " ( User )";
    }
} else {
    echo " ( Visitor )";
}

_________________
Chestnut ! Cool
Administrator
PNConcept.com
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
Display posts from previous:     
Jump to:  
All times are GMT + 1 Hour
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits
DarkMindZ