Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions

Reply
 
Thread Tools Display Modes
  #1  
Old 07-07-2008, 07:40 PM
Kanustep Kanustep is offline
 
Join Date: Jul 2005
Posts: 103
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Register and go to a specific usergroup on select a option

Hiz,

I would like to set a function on registration so if users select the proper option from a drop down menu they will be included into a user group.

For example:
>> Company (go to company_usergroup)
>> Freelancer (go to freelance_usergoup)
>> Normal user (go to register_members)

Is this possible? is there a mod to simplify this?

thanks
Reply With Quote
  #2  
Old 07-09-2008, 03:31 PM
Princeton's Avatar
Princeton Princeton is offline
 
Join Date: Nov 2001
Location: Vineland, NJ
Posts: 6,693
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

anything is possible - you just need to code the script (or hire someone to do it for you)

not sure if there is a modification available
Reply With Quote
  #3  
Old 07-13-2008, 10:02 PM
Kanustep Kanustep is offline
 
Join Date: Jul 2005
Posts: 103
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you, any recommendation for a programmer?
Reply With Quote
  #4  
Old 07-14-2008, 01:33 AM
RLShare RLShare is offline
 
Join Date: Jun 2008
Posts: 499
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is just an educated guess, but you could edit the 'register' template to add the drop down menu. Then in the register.php file find either '$_REQUEST['do'] == 'addmember'' or '$_POST['do'] == 'addmember''. In that section there should be some line that looks similar to $Userdata->set('usergroupid', 3). Based on the the data you get from the drop down menu change the usergroup ID thats passed to that member function call.
Reply With Quote
  #5  
Old 07-14-2008, 03:41 AM
Kanustep Kanustep is offline
 
Join Date: Jul 2005
Posts: 103
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you for the tip RLShare, are you willing to accept a job to do it for me?
Reply With Quote
  #6  
Old 07-14-2008, 05:04 AM
RLShare RLShare is offline
 
Join Date: Jun 2008
Posts: 499
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OK here is a quick go at it.....


first a template edit...

go to,
Styles and Templates->Style Manager->Your Style->Edit Templates->Registration Templates->register

Find:
PHP Code:
$human_verify 
Above it add this...

PHP Code:
<fieldset class="fieldset">
                <
legend>Account Type</legend>
                <
table cellpadding="0" cellspacing="$stylevar[formspacer]border="0" width="400">
                <
tr>
                    <
td colspan="2">Type:</td>
                </
tr>
                <
tr>
                    <
td>
                        
Please choose the account type.<br />
                        <
select name="accounttype">
                        <
option value="2">Registered User</option>
                        <
option value="5">SuperMod</option>
                        <
option value="7">Moderator</option>
                        </
select>
                    </
td>

                </
table>
            </
fieldset
Edit the 'value' and name of each option to correspond to the names and usergroup ID's you set up. Then save it.


Next take the plug-in I attached and open it up in a text editor.

Find:
PHP Code:
if(in_array($accountusergroupid,array(2,5,7))){ 
and replace the numbers 2,5,7 with the usergroup ID's that correspond to the usergroups you set up.


Then save and import the plug-in.
Attached Files
File Type: xml vbulletin-plugins.xml (474 Bytes, 19 views)
Reply With Quote
  #7  
Old 07-22-2008, 06:16 PM
newwayforum newwayforum is offline
 
Join Date: Jul 2008
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for this! Is there a way to still use email confirmation along with this? Can I make additional 'waiting for confirmation' type groups that will then become these specified usergroups after confirmed?

Thank you!!
Reply With Quote
  #8  
Old 07-22-2008, 07:31 PM
RLShare RLShare is offline
 
Join Date: Jun 2008
Posts: 499
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, Ive figured out how to get it working if with or without email validation... Let me package it up into a product and I will upload it for you in a little bit
Reply With Quote
  #9  
Old 07-22-2008, 08:21 PM
newwayforum newwayforum is offline
 
Join Date: Jul 2008
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by RLShare View Post
Ok, Ive figured out how to get it working if with or without email validation... Let me package it up into a product and I will upload it for you in a little bit
You're the best!!
Reply With Quote
  #10  
Old 07-22-2008, 09:20 PM
Kanustep Kanustep is offline
 
Join Date: Jul 2005
Posts: 103
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you very much RLShare! I'm sending a PM so you can see if you can help me.
Reply With Quote
Reply

Thread Tools
Display Modes

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 06:29 PM.


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.07277 seconds
  • Memory Usage 2,274KB
  • 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_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
  • (1)postbit_attachment
  • (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
  • postbit_attachment
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete