Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Template Modifications

Reply
 
Thread Tools
Select Usergroup on registration Details »»
Select Usergroup on registration
Version: 1.00, by lympboy lympboy is offline
Developer Last Online: Jan 2013 Show Printable Version Email this Page

Category: Integration with vBulletin - Version: 4.x.x Rating:
Released: 07-27-2011 Last Update: Never Installs: 13
Additional Files  
No support by the author.

Well, here I will explain them to VBuletin 4.x, how to make the register can select a user group

I demonstrate using for Men and Women.

1_ Let User Profile Fields ---> Create new profile field ---> Single Selection

Code:
  Title:   Select your Sex 
 Description:  Here you select your sex 
 Options:   Man 
            Women 
 Set Default:   Yes, including a first option blank 
 Field editable by the user:   Just to register 
(Leave everything else default, or put it in your opinion)

2_ Open the file register.php (It is located in the folder that your forum dode)

3_ Search:

PHP Code:
if ($vbulletin->options['verifyemail'])
    {
        
$newusergroupid 3;
    }
    else if (
$vbulletin->options['moderatenewmembers'] OR $vbulletin->GPC['coppauser'])
    {
        
$newusergroupid 4;
    }
    else
    {
        
$newusergroupid 2;
    } 
Replace:

PHP Code:
if ($vbulletin->options['verifyemail'])
    {
        
$newusergroupid 3;
    }
    else if (
$vbulletin->options['moderatenewmembers'] OR $vbulletin->GPC['coppauser'])
    {
        
$newusergroupid 4;
    }
    else if (
$vbulletin->userinfo['fieldX'] == "Women")
    {
        
$newusergroupid W;
    }
    else
    {
    
$newusergroupid 2;
    } 

NOTE:
Here where is the X put the number of field of field of user profile created
Aca says the number of the field:


This line is the X
PHP Code:
else if ($vbulletin->userinfo['fieldX'] == "Women"
And where is the W put the ID number of the user group, which in this case is the woman.
Here tells you the ID number, which in this case the user group is called Women.


This line is the W
PHP Code:
$newusergroupid W

NOTE:
With all this echo up here, provided they are registered and NO is selected confirmation email, provided that register and selects men are assigned the default user group that is the id number 2, and when women are chosen will select the user group that you placed the corresponding id.
But should they be assigned the confirmation email option, you must also replace this in the register.php.
(both steps are recommended in order to always be able or may not have the option to confirmation by email)

4_ Search:

PHP Code:
if ($vbulletin->options['verifyemail'])
            {
                
$activateid build_user_activation_id($userid, (($vbulletin->options['moderatenewmembers'] OR $vbulletin->GPC['coppauser']) ? 2), 0);

                eval(
fetch_email_phrases('activateaccount'));

                
vbmail($email$subject$messagetrue);

            } 
Replace:

PHP Code:
if ($vbulletin->options['verifyemail'])
            {
                if (
$vbulletin->userinfo['fieldX'] == "Mujer")
                {
                    
$activateid build_user_activation_id($userid, (($vbulletin->options['moderatenewmembers'] OR $vbulletin->GPC['coppauser']) ? 16), 0);
                }
                else
                {    
                    
$activateid build_user_activation_id($userid, (($vbulletin->options['moderatenewmembers'] OR $vbulletin->GPC['coppauser']) ? 2), 0);
                }

                eval(
fetch_email_phrases('activateaccount'));

                
vbmail($email$subject$messagetrue);
            } 

NOTE:
Again, where is the X put the number of field of field of user profile created
Aca says the number of the field:


This line is the X
PHP Code:
if ($vbulletin->userinfo['fieldX'] == "Mujer"
5_ Al and have edited the register.php , there is only replaced by that of his board, and ready, at the time of registration, if they choose the women will have group sex user in this case would be if women and men choose will have the default is the user group man.

Credits: 3xtr4 3xtr4
Example

Sorry my english!

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
2 благодарности(ей) от:

Comments
  #22  
Old 04-08-2012, 07:40 PM
rophi60 rophi60 is offline
 
Join Date: Nov 2011
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

just tried it, didnt work...
Reply With Quote
  #23  
Old 05-28-2012, 05:14 PM
Crystal Shards Crystal Shards is offline
 
Join Date: Nov 2006
Location: Illinois
Posts: 80
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Boofo View Post
My point was that is can be done as a product, without any file edits.
But if that product is unavailable, it's not of any use to anyone who can't make them. So really, it's still not constructive.
Reply With Quote
  #24  
Old 05-28-2012, 05:23 PM
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 vBNinja View Post
just tried it, didnt work...
maybe it's because i have confirmation emails disabled?
Yes, that would be the cause.
Reply With Quote
  #25  
Old 05-28-2012, 05:25 PM
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 Crystal Shards View Post
But if that product is unavailable, it's not of any use to anyone who can't make them. So really, it's still not constructive.
You're right. I digress.
Reply With Quote
  #26  
Old 05-31-2012, 09:15 PM
FTG LIQUID CL FTG LIQUID CL is offline
 
Join Date: Jan 2012
Posts: 158
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

any chance you would share boofo
Reply With Quote
  #27  
Old 06-29-2012, 12:05 AM
Cognitio Cognitio is offline
 
Join Date: Jun 2012
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

For those it's not working, he missed one modification detail in the coding on the last step if using email verification:

PHP Code:
if ($vbulletin->userinfo['fieldX'] == "Mujer")
                {
                    
$activateid build_user_activation_id($userid, (($vbulletin->options['moderatenewmembers'] OR $vbulletin->GPC['coppauser']) ? 16), 0);
                } 
1) Where 'fieldX' is, change the X to your field code on the registration form
2) Where "Mujer" is, change that to your criteria of your form (in his example 'Women')
3) Where the query coding says "? 4: 16), 0);", change the 16 to your usergroupid number which you wish them to go to.

He failed to mention to identify the usergroupid stated in step 3 there.
Reply With Quote
  #28  
Old 10-22-2012, 11:44 AM
raghhav raghhav is offline
 
Join Date: Oct 2012
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have successfully installed this on my VB 4.2 patch level 2. If some one needs this to be done, let me know, I can help. Just post your fieldid, usergroup ids, title of the custom field. I would give you the exact code and you can easily install it.

If you need to see a live, then ask me... I have included 3 usergroup on register page.
Reply With Quote
  #29  
Old 10-23-2012, 07:09 PM
grey_goose grey_goose is offline
 
Join Date: Jun 2009
Posts: 284
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

field117
usergroup 50
Character
Reply With Quote
  #30  
Old 10-23-2012, 07:22 PM
raghhav raghhav is offline
 
Join Date: Oct 2012
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by grey_goose View Post
field117
usergroup 50
Character
Character is the title name?
Reply With Quote
  #31  
Old 10-23-2012, 07:33 PM
grey_goose grey_goose is offline
 
Join Date: Jun 2009
Posts: 284
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yeppers, it's an option in field117
Reply With Quote
Reply

Thread Tools

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 02:16 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.05158 seconds
  • Memory Usage 2,352KB
  • Queries Executed 26 (?)
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)bbcode_code
  • (8)bbcode_php
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_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