The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
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 |
#2
|
|||
|
|||
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?
|
#3
|
|||
|
|||
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. |
#4
|
|||
|
|||
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.
|
#5
|
|||
|
|||
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. |
#6
|
|||
|
|||
Quote:
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. |
#7
|
|||
|
|||
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! |
#8
|
|||
|
|||
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.
|
#9
|
|||
|
|||
I've only got Search Titles Only. Or do you mean I need to go the the Find and Replace section?
|
#10
|
|||
|
|||
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. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|