View Full Version : Post Count Viewing
Christine
07-01-2002, 06:58 PM
My members are having fits because I pruned the board back to minimize the database to upgrade from 2.0.3 to 2.2.6.
We have decided to eliminate post count view from the posts because of the problems it is causing, but want this still viewable by the admins and mods.
Can anyone tell me how to modify postbit so that only usergroups 5 and 6 can view postcount and make it invisible to all other users?
Thanks!! :)
Logician
07-01-2002, 07:32 PM
Edit postbit template and replace
Posts: $post[posts]
As:
$post_num_var
Edit admin/functions.php, find:
$post[message]=bbcodeparse($post[pagetext],$forum[forumid],$post[allowsmilie]);
after add:
if ($bbuserinfo[usergroupid]==6 OR $bbuserinfo[usergroupid]==5)
{
$post_num_var='Posts : '.$post[posts];
}
else
{
unset($post_num_var);
}
not tested, holler if it doesnt work.. :)
Xenon
07-01-2002, 07:43 PM
works perfectly like always teammate ;)
just a suggestion if you want to do it more comfortable:
make a new template called adminpostbit put inside $post[posts] and whatever postbitvariable you just want to show up to your admins/mods
then open functions.php
find:
// do posts from ignored users
if (!$ignore[$post[userid]]) {
eval("\$retval = \"".gettemplate("postbit")."\";");
} else {
eval("\$retval = \"".gettemplate("postbit_ignore")."\";");
}
before it add:
if ($bbuserinfo[usergroupid] == 6 or $bbuserinfo[usergroupid]==5) {
eval("\$adminpostbit = \"".gettemplate("adminpostbit")."\";");
} else {
$adminpostbit = "";
}
last step replace the $post[posts] in your postbit with $adminpostbit.
ok, its little more work than logicians way, but so you can easyly add other variables to, without codechanges :)
Christine
07-01-2002, 07:48 PM
Right on the money!! Thanks! :)
Logician
07-01-2002, 07:59 PM
nice approach pal, I liked it.. :)
Chris M
07-01-2002, 08:05 PM
So did I...
This will be useful:)
Satan
Xenon
07-01-2002, 08:08 PM
i like when you like it ;)
i have made this for me a long time ago, but never released, because it's too small *g*
Chris M
07-01-2002, 08:11 PM
So unless people look in here, it remains exclusive:)
Satan
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.