vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   How do I freeze post counts (https://vborg.vbsupport.ru/showthread.php?t=127435)

domokun 09-24-2006 02:16 PM

How do I freeze post counts
 
How do I freeze a post count. For example: If I set my post count to be 500 in the UserCP, how do I set it so that it always stays at 500 even if I continue posting? Thanks in advance ;)

Domokun

Adrian. 09-25-2006 08:12 AM

Hi,

You have to edit all the forums...
Forum Manager > Edit (Forum).

Set "Count Posts Made in this Forum Towards User Post Counts" to No. :)

Adrian

Hornstar 09-25-2006 09:20 AM

I think he may have only been wanting this for specific users maybe. eg. make your post count 1337 and leave it there lol. iono ^^

domokun 09-25-2006 10:28 AM

Yes, to set this for specific users is what I'm looking for.

Domokun

domokun 09-28-2006 12:45 AM

Bump, somebody has to know how to do this for an individual user.

Domokun

blacklancer 09-28-2006 05:24 PM

I just did it on my vBulletin 3.6 like so and its working good.

Plugin Manager -> Add New Plugin -> Input the following

Product - vBulletin
Hook Location - userdata_presave
Title - Freeze postcount
Execution Order - 5
Plugin PHP Code -
Code:

if ($this->fetch_field('userid') == X)
{
$this->do_unset('posts');
}

Replace X with the userid

Plugin is Active - Yes

Save and enjoy

Be sure to change the post count to whatever number you want it to be first, and then make the plugin active.

domokun 09-30-2006 02:03 PM

Wow, this is exactly what I'm looking for :D . Thank you soo much.

Sincerely,

Domokun

domokun 10-06-2006 10:42 AM

Hmm, the post count freeze code you gave me works great, but I was wondering, how do you add more than one user? I tried separating the UserID's with a comma but that didn't work. Thanks again :)

Domokun

GriZzm0 10-07-2006 07:55 AM

Quote:

Originally Posted by domokun
Hmm, the post count freeze code you gave me works great, but I was wondering, how do you add more than one user? I tried separating the UserID's with a comma but that didn't work. Thanks again :)

Domokun

Code:

if ($this->fetch_field('userid') == X || $this->fetch_field('userid') == X)
{
$this->do_unset('posts');
}

|| = or.
Or you could create an array with the user ids and use in_array http://php.net/in_array


All times are GMT. The time now is 09:31 AM.

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.01053 seconds
  • Memory Usage 1,726KB
  • 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
  • (2)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)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