vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Hide Post Counts - visible to admins and moderators (https://vborg.vbsupport.ru/showthread.php?t=35173)

telc 02-18-2002 01:26 AM

I want to hide post counts from normal users, but if you are logged in as Admin or Moderator I want to be able to see users post counts.

I find in my forums that users are posting nonsense replies just to get thier post count up.

XFLBret 06-01-2002 02:37 AM

yeah, i want this too. where is it. i know its possible, because I can see that the admin of this board has pulled it okk...

Xenon 06-01-2002 10:04 AM

this is easily done, so i haven't released it as a full hack, because one block one change and one new template isn't reallly much ^^

open functions.php
goto section getpostbit

there find:
PHP Code:

// do posts from ignored users
    
if (!$ignore[$post[userid]]) {
        eval(
"\$retval = \"".gettemplate("postbit")."\";");
    } else {
        eval(
"\$retval = \"".gettemplate("postbit_ignore")."\";");
    } 

just before add:
PHP Code:

// Admin Postbit Hack
        
if ($bbuserinfo[usergroupid] == 6) {
          eval(
"\$adminpostbit = \"".gettemplate("adminpostbit")."\";");
        } else {
          
$adminpostbit "";
        } 

change or add other usergroupids if you want in the if-clause

then edit your postbittemplate, replace $post[posts] with $adminpostbit

and last step add template adminpostbit within there must be the line $post[posts] and whatever you want just to show up for your admins/mods and so on :)

lucky64 05-08-2005 03:09 AM

Quote:

Originally Posted by Xenon
this is easily done, so i haven't released it as a full hack, because one block one change and one new template isn't reallly much ^^

open functions.php
goto section getpostbit

there find:
PHP Code:

// do posts from ignored users
    
if (!$ignore[$post[userid]]) {
        eval(
"\$retval = \"".gettemplate("postbit")."\";");
    } else {
        eval(
"\$retval = \"".gettemplate("postbit_ignore")."\";");
    } 

just before add:
PHP Code:

// Admin Postbit Hack
        
if ($bbuserinfo[usergroupid] == 6) {
          eval(
"\$adminpostbit = \"".gettemplate("adminpostbit")."\";");
        } else {
          
$adminpostbit "";
        } 

change or add other usergroupids if you want in the if-clause

then edit your postbittemplate, replace $post[posts] with $adminpostbit

and last step add template adminpostbit within there must be the line $post[posts] and whatever you want just to show up for your admins/mods and so on :)

Sorry to bring this thread back, but your sig said no pm's.....do you have any code changes for the latest vbb to do this?

Thanks.

--Lucky

N8 05-08-2005 05:20 AM

<if condition="$bbuserinfo[usergroupid] == 6">

blah blah...
</if>

Just put that around the code in your postbit template.

Adrian Schneider 05-08-2005 05:47 AM

You'll have to do that in member profiles as well as any other places that show the post count.

N8 05-08-2005 05:53 AM

Well, I think you could just go to your Replacement Variable Manager, and replace $post[posts] with <if condition="$bbuserinfo[usergroupid] == 6">$post[posts]</if>

Xenon 05-09-2005 07:38 AM

nope, as the replacement is done AFTER the variable parsing, so this would replace nothing at all ;)

dcpaq2xx 11-22-2005 09:53 PM

Is it possible we could get this in a plugin or plugin program?

Doug

akanevsky 11-22-2005 09:59 PM

If anyone wants this released as a hack, please specify the target vB version. Thanks.


All times are GMT. The time now is 03:22 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01107 seconds
  • Memory Usage 1,746KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete