vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Triggering code on registration completion (https://vborg.vbsupport.ru/showthread.php?t=280719)

Jon12345 03-27-2012 01:23 PM

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

kh99 03-27-2012 01:28 PM

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?

Jon12345 03-27-2012 01:37 PM

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.

kh99 03-27-2012 01:42 PM

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.

Jon12345 03-27-2012 01:46 PM

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.

kh99 03-27-2012 01:54 PM

Quote:

Originally Posted by Jon12345 (Post 2313830)
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. :)

Jon12345 03-27-2012 02:00 PM

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!

kh99 03-27-2012 02:07 PM

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.

Jon12345 03-27-2012 02:18 PM

I've only got Search Titles Only. Or do you mean I need to go the the Find and Replace section?

Pandemikk 03-27-2012 02:29 PM

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.


All times are GMT. The time now is 07:59 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.02231 seconds
  • Memory Usage 1,734KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete