
06-07-2002, 09:12 AM
|
 |
|
|
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили:
0 раз(а) в 0 сообщениях
|
|
Scott,
What do I need to do to have this in the privmsg template for private messages too?
Quote:
Originally posted by PPN
This is a hack to show a small icon next to usernames on a post, when you mouse over you will also get told what rank they are, Admin, Super Mod or Moderator.
Add the following template
postbit_moderator_icon
Code:
<img src="{imagesfolder}/mod.gif" alt="$rank">
save the template
Edit the postbit template and place $mod_logo somewhere on it, i chose next to the username.
open up functions.php
look for
PHP Code:
// do posts from ignored users
if (!$ignore[$post[userid]]) {
ABOVE it put
PHP Code:
switch($post['usergroupid']) {
case "6";
$rank = "Administrator";
eval("\$mod_logo = \"".gettemplate("postbit_moderator_icon")."\";");
break;
case "5";
$rank = "Super Moderator";
eval("\$mod_logo = \"".gettemplate("postbit_moderator_icon")."\";");
break;
case "7";
$rank = "Moderator";
eval("\$mod_logo = \"".gettemplate("postbit_moderator_icon")."\";");
break;
default:
$mod_logo = "";
break;
}
save and upload functions.php
The hack will now work, but if you want to save on the extra query to the database to get the template.
Open showthread.php and add
PHP Code:
,postbit_moderator_icon
to the end of $templatesused you will have to do this twice.
attached is the mod logo i used
|
|