vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Post Count Viewing (https://vborg.vbsupport.ru/showthread.php?t=40528)

Christine 07-01-2002 06:58 PM

Post Count Viewing
 
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

PHP Code:

Posts$post[posts

As:

PHP Code:

$post_num_var 

Edit admin/functions.php, find:
PHP Code:

$post[message]=bbcodeparse($post[pagetext],$forum[forumid],$post[allowsmilie]); 

after add:

PHP Code:

if ($bbuserinfo[usergroupid]==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:
PHP Code:

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

before it add:
PHP Code:

if ($bbuserinfo[usergroupid] == 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


All times are GMT. The time now is 02:10 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.01021 seconds
  • Memory Usage 1,730KB
  • 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
  • (6)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete