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

Reply
 
Thread Tools Display Modes
  #1  
Old 07-07-2004, 05:12 PM
isla142 isla142 is offline
 
Join Date: Jun 2004
Location: Warks, UK
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Randomly sort users on signup

I am searching for a hack to randomly sort users into one of four usergroups upon signup to my website. This needs to be able to be over-ridden, and once sorted, the user cannot change group. I know this is possible, since I have seen it done on another forum. However, when I asked the admin of that forum, she had forgotten the code.

Please help.

Isla
Reply With Quote
  #2  
Old 07-07-2004, 06:08 PM
Berethorn Berethorn is offline
 
Join Date: Jun 2004
Posts: 69
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That's a great idea for a Harry Potter forum! I can see how without this hack, 98.5% of the members would choose Gryffendor or Slytherin.

It looks like no one has done this hack yet, but maybe someone could.
Reply With Quote
  #3  
Old 07-07-2004, 07:10 PM
isla142 isla142 is offline
 
Join Date: Jun 2004
Location: Warks, UK
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How did you know it was for a Harry Potter forum? I've seen it on one already, so it must work. I really need more Hufflepuffs, because none on the old forum were active. I'd like the code before I activate the forum if possible. That may not be for a couple of days yet.
Reply With Quote
  #4  
Old 07-07-2004, 07:34 PM
Berethorn Berethorn is offline
 
Join Date: Jun 2004
Posts: 69
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

First of all, I guessed, since it was the first thing I could think of that would "sorting". Then I went to your homepage, and it was obvious.
Reply With Quote
  #5  
Old 07-09-2004, 06:13 AM
isla142 isla142 is offline
 
Join Date: Jun 2004
Location: Warks, UK
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well... I know this thread has gone down to the second page... PLEASE help! I really really need to get this hack. I don't want people just to be sorted by a quiz, that's old. Please help (still).

Isla
Reply With Quote
  #6  
Old 07-09-2004, 06:21 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by isla142
Well... I know this thread has gone down to the second page... PLEASE help! I really really need to get this hack. I don't want people just to be sorted by a quiz, that's old. Please help (still).

Isla
Someone has just done that code on my site. I will ask them if it is allright to release it or have them do it. Will that work?
Reply With Quote
  #7  
Old 07-09-2004, 02:15 PM
Modin Modin is offline
 
Join Date: Jun 2004
Posts: 162
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Boofo pointed me to this thread

I haven't tested this but it "should" work...

open up register.php and find
PHP Code:
// ### DO THE UG/TITLE UPDATE ###
        
$DB_site->query("UPDATE " TABLE_PREFIX "user SET usergroupid=$user[usergroupid] $dotitle WHERE userid=$u"); 
and replace it with (filling in the array with the groups you want to randomize)

PHP Code:
// ### DO THE UG/TITLE UPDATE ###
        
$rnd_grps = array('7''9');
        
$user['usergroupid'] = $rnd_grps[rand(0,count($rnd_grps) + 1) - 1];
        
$DB_site->query("UPDATE " TABLE_PREFIX "user SET usergroupid=$user[usergroupid] $dotitle WHERE userid=$u"); 
This assumes your users have to activate their accounts before they can use them, if that's not the case I can modify it.

Hope it works for ya
Reply With Quote
  #8  
Old 07-15-2004, 06:46 AM
isla142 isla142 is offline
 
Join Date: Jun 2004
Location: Warks, UK
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Oh. No. They don't have to activate their accounts before signup. Can you modify it for me? All my users are in Gryffindor at the moment, except the manually changed ones.
Reply With Quote
  #9  
Old 08-20-2004, 05:21 PM
isla142 isla142 is offline
 
Join Date: Jun 2004
Location: Warks, UK
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry for double posting, but I really need help with this! It's been well over a month, and I need this hack! Can someone help me with a hack to randomly sort users on signup with no need to have activation of account?

Love the help!

Isla
Reply With Quote
  #10  
Old 08-20-2004, 05:53 PM
dstruct2k's Avatar
dstruct2k dstruct2k is offline
 
Join Date: Dec 2002
Location: Winnipeg
Posts: 318
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yeah, I'll take a look at the code... Give me a couple minutes.
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 09:23 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04374 seconds
  • Memory Usage 2,260KB
  • Queries Executed 11 (?)
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
  • (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
  • (1)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