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 and user group (https://vborg.vbsupport.ru/showthread.php?t=48457)

ub3x 02-03-2003 12:14 AM

post count and user group
 
Sorry if this already exists, but i'm looking for a hack for vbulletin 2.2.9 that will change a user's post count automatically when he reaches a certain post count.

Thanks.

Neo 02-03-2003 10:20 AM

if ($post[posts] >= 300) {
$DB_site->query("UPDATE user SET posts='XXXX' WHERE userid='$post[userid]'");
}

something like that?

ub3x 02-03-2003 02:42 PM

ok, where does that go? I am very new to Vbulletin and hacking it (2 days) .

Xenon 02-03-2003 02:47 PM

hmm, put that before the ending ?> tag in global.php:

PHP Code:

if($bbuserinfo['posts'] >= xxx and $bbuserinfo['usergroupid'] == 2) {
$DB_site->query("UPDATE user SET usergroupid=x WHERE userid=$bbuserinfo[userid]");



ub3x 02-03-2003 04:45 PM

that's it? then it'll all work out?

How do I find a groupid?

Xenon 02-04-2003 04:18 PM

yes that's it :)


by highlighting the edit group link in the acp you can see it :)

ub3x 02-04-2003 04:25 PM

dude, arggg, okay, i'm an idiot, explain it to me like I am retarded, because I really have no idea what I should change in what you gave me.

Xenon 02-04-2003 04:29 PM

i don't know the usergroupids of your board....

you have to find out yourself which usergroupid the new usergoup has.

if it's the first custom group it would be 8 or 9 depending if there's the banning group already..

ub3x 02-04-2003 04:33 PM

I want it so that if the number of posts a user has 5 or more posts then he assigned to groupid 8 .

Xenon 02-04-2003 06:43 PM

PHP Code:

if($bbuserinfo['posts'] >= and $bbuserinfo['usergroupid'] == 2) {
$DB_site->query("UPDATE user SET usergroupid=8 WHERE userid=$bbuserinfo[userid]");




All times are GMT. The time now is 11:17 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.01069 seconds
  • Memory Usage 1,733KB
  • 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_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)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