Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
  #1  
Old 06-20-2006, 07:31 PM
ThePiston ThePiston is offline
 
Join Date: Jun 2006
Posts: 56
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default change hack hook from activation to completing registration

I'm using this hack that puts people into a certain usergroup based on a custom registration field. The plugin is called into play when the activation link is used in the confirmation email. I'd rather not have email confirmation. Is there a way to hack the mod so that the plugin works without the email activation?
Reply With Quote
  #2  
Old 06-20-2006, 07:42 PM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes, but it takes some tinkering because of what variables are in scope and what variable names are used at that stage. I chose not to release another version because I just don't have time to support it. But, I am personally using one that works without activation. I'll pm you the code.
Reply With Quote
  #3  
Old 06-21-2006, 12:33 AM
ThePiston ThePiston is offline
 
Join Date: Jun 2006
Posts: 56
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks for the code... my problem is that I have to use the primary usergroup mod. The activation hook works, but that new hook doesn't work for the mod I'm using:
PHP Code:
switch($userinfo['field5']) 

    case 
"goup1":     
        
$userdata->set('usergroupid'15); 
    break; 
    case 
"group2"
        
$userdata->set('usergroupid'92); 
    break; 
    case 
"group3"
        
$userdata->set('usergroupid'17); 
    break; 

I'll keep trying other stuff, thanks...
Reply With Quote
  #4  
Old 06-21-2006, 02:27 AM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The hook works, but the variable names were different in that area if I recall correctly. You need to go read register.php around that hook and see what variables they were using. I'm not at home right now and can't access the code.
Reply With Quote
  #5  
Old 06-21-2006, 01:01 PM
ThePiston ThePiston is offline
 
Join Date: Jun 2006
Posts: 56
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

looks like this is the hook in register.php:
PHP Code:
    // register IP address
    
$userdata->set('ipaddress'IPADDRESS);

    (
$hook vBulletinHook::fetch_hook('register_addmember_process')) ? eval($hook) : false;

    
$userdata->pre_save();

    
// check for errors 
I added
PHP Code:
$userdata->set('usergroupid'$user['usergroupid']); 
under
PHP Code:
$userdata->set('ipaddress'IPADDRESS); 
but that didn't work either... i'll keep trying.

actually nevermind - we decided to require email activation - problem solved
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 02:59 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.04413 seconds
  • Memory Usage 2,198KB
  • 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
  • (4)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (5)postbit
  • (5)postbit_onlinestatus
  • (5)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete