Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #21  
Old 09-08-2002, 01:33 PM
wolfe wolfe is offline
 
Join Date: Jan 2002
Posts: 900
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

right i also what it ot change usertitile when it gets 10 posts i have tried adding this

Code:
if($bbuserinfo[posts] == 10 AND $bbuserinfo[usergroupid]== 2 AND $bbuserinfo[usertitle] == Trial Member<br><img src="http://www.s2k2.com/forums/images/0stars.gif">) {
  $DB_site->query("UPDATE user SET usergroupid='10' WHERE userid='$bbuserinfo[userid]'");
  $DB_site->query("UPDATE user SET usertitle='1' WHERE usertitle='$bbuserinfo[usertitle]'");
}
what else do i add
Reply With Quote
  #22  
Old 09-08-2002, 01:40 PM
wolfe wolfe is offline
 
Join Date: Jan 2002
Posts: 900
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

would this work
Reply With Quote
  #23  
Old 09-09-2002, 01:04 PM
wolfe wolfe is offline
 
Join Date: Jan 2002
Posts: 900
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i am having problems with this code

i added it and it works it moved people to another group on so many posts but there user title is not updating so i tried the second bit of code bu noe look please hey me

Code:
echo "Your User Group Is ".$bbuserinfo[usergroupid]."<br>";
echo "My Post Count is ".$bbuserinfo[posts]."<br>";

if($bbuserinfo[posts] == 9 AND $bbuserinfo[usergroupid]== 2) {
  $DB_site->query("UPDATE user SET usergroupid='10' WHERE userid='$bbuserinfo[userid]'");
}
this one is after they have moved groups

Code:
if($bbuserinfo[posts] == 10 AND $bbuserinfo[usergroupid]== 10) {
  $DB_site->query("UPDATE user SET usertitle='New Member<br><img src="http://www.s2k2.com/forums/images/1stars.gif">' WHERE usertitle='$bbuserinfo[usertitle]'");
}
but i get an error when i add it why
Reply With Quote
  #24  
Old 10-02-2002, 02:08 AM
clubdub clubdub is offline
 
Join Date: May 2002
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i know this is old, but what Logician posted didn't work for me.

This one did.
PHP Code:
if($bbuserinfo[posts] >= 10 AND $bbuserinfo[usergroupid]==2) {
$DB_site->query("UPDATE user SET usergroupid='{theusergroupidhere}' WHERE usergroupid='2'"); 
Reply With Quote
  #25  
Old 10-02-2002, 07:26 AM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by clubdub
i know this is old, but what Logician posted didn't work for me.

This one did.
PHP Code:
if($bbuserinfo[posts] >= 10 AND $bbuserinfo[usergroupid]==2) {
$DB_site->query("UPDATE user SET usergroupid='{theusergroupidhere}' WHERE usergroupid='2'"); 
Well, I dont suggest using this code..

Your code is not only changing the usergroup of the poster, but updating the usergroup for ALL USERS in your database. (ones who are from usergroup 2 and post >=10). This might not be a problem to you but I want to remind you the unnecessary MYSQL server load you are creating for every post your members sent..This can especially be a problem if your post number or user number gets bigger..

The reason my code didnt work for you is probably because you didnt test it when you have exactly 10 posts. As I said in my message it will work ONLY when you are on the exact post number, not less, not much..

If you change $bbuserinfo[posts] == 10 to $bbuserinfo[posts] >= 10 in my code as I mentioned, your problem should be cured..
Reply With Quote
  #26  
Old 10-18-2002, 05:55 PM
Learner29's Avatar
Learner29 Learner29 is offline
 
Join Date: Nov 2001
Posts: 174
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thank you logician ......
Reply With Quote
  #27  
Old 10-18-2002, 06:02 PM
Learner29's Avatar
Learner29 Learner29 is offline
 
Join Date: Nov 2001
Posts: 174
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I highly appreciate your help
Reply With Quote
  #28  
Old 06-23-2003, 03:33 AM
xs1 xs1 is offline
 
Join Date: Apr 2003
Posts: 82
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

its so confusing!!!! can anyone tell me wat exactly to be added and where ?
Reply With Quote
  #29  
Old 06-23-2003, 03:55 AM
insanctus's Avatar
insanctus insanctus is offline
 
Join Date: Feb 2003
Location: Michigan
Posts: 582
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there any way to add an age check into this.

Say if they hit 50 posts and are 18 or over then it changes them?

The reason I ask is I have a section I want only 18 and older in and only after so many posts.

This will make my life alot easier.
Reply With Quote
  #30  
Old 08-29-2003, 12:12 PM
allan grossman allan grossman is offline
 
Join Date: Apr 2003
Location: surreal city, usa
Posts: 163
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm gonna need something like this this weekend but would prefer to run it as a job in cron.daily

What I need to do is scan the database for users who are in usergroup 2 that have more than 249 posts and change their usergroup to usergroup xx.

Could someone hook me up, please?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:01 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.04402 seconds
  • Memory Usage 2,278KB
  • Queries Executed 12 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_code
  • (2)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete