View Full Version : Adding Custom Field To ShowThread
Brian
02-09-2002, 08:03 PM
I have been having a heck of a time getting the following to work. If some one can help I would very much appreciate it :)
I would like to add a field to showthread, and only have that field viewable to moderators/admin.
The field $userinfo[field5]
And I would like it to look like:
Registered: Nov 1999
Location: Europe, Slovenia, Lovrenc
Posts: 48
FIELD HERE
and if they are not an admin or mod they wouldnt see that.
-Brian
Xenon
02-10-2002, 10:24 PM
i think theres no way to do that just in the templates, you have to hack some codelines.
i have hacked my board to have this effekt you want:
open functions.php in your admin folder
find the lines
// do posts from ignored users
if (!$ignore[$post[userid]]) {
eval("\$retval = \"".gettemplate("postbit")."\";");
} else {
eval("\$retval = \"".gettemplate("postbit_ignore")."\";");
}
return $retval;
round line 271
before it add:
// Admin Postbit Hack
if ($bbuserinfo[usergroupid] == 6) {
eval("\$adminpostbit = \"".gettemplate("adminpostbit")."\";");
} else {
$adminpostbit = "";
}
add other usergroupids in the if-clause for your mods
then make a custom template adminpostbit which contains the line $userinfo[field5] an all the other stuff you want to show only your admins and mods
laststep in the postbit template add the line $adminpostbit after $userinfo[posts]
this should be all
Brian
02-11-2002, 04:24 AM
Thanks so much!! Worked like a charm!
-Brian
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.