Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 03-27-2012, 01:23 PM
Jon12345 Jon12345 is offline
 
Join Date: Nov 2002
Posts: 127
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Triggering code on registration completion

I'm noticing that the registration page - even though there are several steps - seems to be all on the same page, even the "thank you for registering" part.

This is causing me a headache! I want to put some tracking code that is only triggered when someone is finally registered.

How can I do that, considering its all on one page?

Thanks,

Jon
Reply With Quote
  #2  
Old 03-27-2012, 01:28 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You'd have to check the 'do' parameter which can either be on the url or part of the posted information. How were you planning to add tracking code?
Reply With Quote
  #3  
Old 03-27-2012, 01:37 PM
Jon12345 Jon12345 is offline
 
Join Date: Nov 2002
Posts: 127
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The code I need to add - that should only get triggered on registration completion - is just a few lines of javascript.

There must be code in the template that gets triggered to display the thank you text, but I can't seem to see any if statements in there. I find it a bit confusing! I would have thought there would be something like this...

<IF>$registered="Yes":
show text
</IF>

But I can't see anything like that.

If each step of the registration process was on a seperate page, it would be easy to implement.
Reply With Quote
  #4  
Old 03-27-2012, 01:42 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you're talking about the "Your registration is now complete" message, that's actually an "error" message page that the user is redirected to, and the text is a phrase. But it's html so you might be able to edit that phrase and put in a <script> tag for your js.
Reply With Quote
  #5  
Old 03-27-2012, 01:46 PM
Jon12345 Jon12345 is offline
 
Join Date: Nov 2002
Posts: 127
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Oh wow, I never knew that. You must know your stuff kh99! So phrases can have embedded code then? Its certainly given me food for thought.

I'm also hoping to find a plugin so that I can have registration on one page too, so it includes forum rules and age.
Reply With Quote
  #6  
Old 03-27-2012, 01:54 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Jon12345 View Post
Oh wow, I never knew that. You must know your stuff kh99! So phrases can have embedded code then?

It depends what the phrase is used for. I think most are html so you can put in anything you could put in html, others are used for email so you can't really include html. As far as me "knowing my stuff" the fact is that I have to go and read the php code to answer a lot of questions, so it only looks like I know this stuff.
Reply With Quote
  #7  
Old 03-27-2012, 02:00 PM
Jon12345 Jon12345 is offline
 
Join Date: Nov 2002
Posts: 127
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well, if its any consolation, I've been reading the php code for ages and I'm finding it a bit mind bloggling! The funny thing is, when I go to phrase search and put in a phrase, I still can't find the location of the phrase variable in the template.

e.g. "Your registration is now complete" is the phrase, registration_complete is the variable. I go to Search Templates and enter in registration_complete. I do the search but nothing comes up. Puzzled!
Reply With Quote
  #8  
Old 03-27-2012, 02:07 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Lower down in that box there are some "Search in..." radio buttons, you have to choose the 2nd or 3rd if you want to search for phrase variable names.
Reply With Quote
  #9  
Old 03-27-2012, 02:18 PM
Jon12345 Jon12345 is offline
 
Join Date: Nov 2002
Posts: 127
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've only got Search Titles Only. Or do you mean I need to go the the Find and Replace section?
Reply With Quote
  #10  
Old 03-27-2012, 02:29 PM
Pandemikk Pandemikk is offline
 
Join Date: Jul 2009
Posts: 292
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

register_member_complete

That's the hook. Simply add echo 'html code here'; to that hook. Any code (like javascript) in that will be outputted to the browser.

Let me know if that hook isn't available in vB3. I'm going based off vB4.
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 04:30 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.10090 seconds
  • Memory Usage 2,251KB
  • 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
  • (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