| Author |
Message |
Rogue
Joined: Apr 16, 2005
Posts: 4
Status: Offline
|
  Posted:
Jun 15, 2005 - 05:52 AM |
|
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 |
|
|
 |
Chestnut
Site Admin
Joined: Oct 08, 2003
Posts: 1065
Location: Paris - France
|
  Posted:
Jun 15, 2005 - 10:45 AM |
|
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 ?
 |
_________________ Chestnut !
Administrator
PNConcept.com |
|
 |
 |
Rogue
Joined: Apr 16, 2005
Posts: 4
Status: Offline
|
  Posted:
Jun 15, 2005 - 02:58 PM |
|
| 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%\"> <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  |
_________________ Dream as if you'll live Forever.
Live as if you'll die Tomorrow.
- Unknown |
|
|
 |
Chestnut
Site Admin
Joined: Oct 08, 2003
Posts: 1065
Location: Paris - France
|
  Posted:
Jun 15, 2005 - 03:04 PM |
|
mmm not... off yes but not a lot
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 !
Administrator
PNConcept.com |
|
 |
 |
|
|
| |