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 12-14-2011, 01:14 AM
Quads Quads is offline
 
Join Date: Jul 2008
Posts: 35
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Inserting java script on the registration page

Hello,

I'm trying to insert a java script at the registration page, and the registration confirmation page.
Would one of you be so kind as to point me towards the template or file(s) I need to modify to do this?

I've found registration.php but am unable to find the registration completion page.
I'm assuming the best way to insert this is through the template manager?

The script is pretty basic:
Code:
<input type="hidden" name="OI_FORM_IDENTIFIER" value=""/>
<SCRIPT LANGUAGE="JavaScript" SRC="http://www.blahblahblah.js"></SCRIPT>
I need to insert one in the registration page, and the another in the registration confirmation page where it tells users to verify their email, etc.

Any help would be much appreciated. I've searched the forum, the manual, the docs, google, etc.
Reply With Quote
  #2  
Old 12-14-2011, 01:25 AM
Chris8's Avatar
Chris8 Chris8 is offline
 
Join Date: Nov 2009
Posts: 188
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

templategroup name="Registration"
template name="register"

So, Edit Templates -> Registration -> register
Reply With Quote
  #3  
Old 12-14-2011, 01:38 AM
Quads Quads is offline
 
Join Date: Jul 2008
Posts: 35
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Chris8 View Post
templategroup name="Registration"
template name="register"

So, Edit Templates -> Registration -> register
Yes, I got that far, as per my OP, but am looking specifically for the registration confirmation page. I need to add it to the "register.php?do=addmember" page.
Reply With Quote
  #4  
Old 12-14-2011, 03:50 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

To find the template to modify, do this - vboptions > General Settings > Add Template Name in HTML Comments > set to Yes . Then go back to your page and view the source code and you will see the name of the template called around your part of the code. (Sometimes the template is the one mentioned at the very top of the page source.)
Reply With Quote
  #5  
Old 12-14-2011, 05:53 PM
Quads Quads is offline
 
Join Date: Jul 2008
Posts: 35
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Lynne-

By using your instructions, I've found where I can insert the script to run in the registration template, however am still having a tough time finding where to add the second part of the script at the "register.php?do=addmember" page which displays the registration confirmation and instructions to check email. It looks like it uses the same template, but drops a few other things in that second registration page.

What I'm wanting to add is to that specific "register.php?do=addmember" page where the java script will insert opt-in type offers for new users that register. Basically, once a new user completes registration, they're given a couple of banners which they can click (banners provided from the script). I can't find where / which template I'd use in that do=addmember page where I can safely do this. Other than headers, footers, error messages, etc, which won't work as those are used in other places in the forum and I only want the script to run at that one single page.

Again, I appreciate your help, and any further guidance.
Reply With Quote
  #6  
Old 12-14-2011, 06:00 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The "registration complete" page is actually a standard "error" page displaying a phrase (registration_complete). You could add stuff to that phrase, or you could redirect to another page, although that looks to be a little tricky to do via plugins because there are a couple other things that could happen at that point (handling COPPA users and email confirmation).
Reply With Quote
  #7  
Old 12-14-2011, 06:41 PM
Quads Quads is offline
 
Join Date: Jul 2008
Posts: 35
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kh99 View Post
The "registration complete" page is actually a standard "error" page displaying a phrase (registration_complete). You could add stuff to that phrase, or you could redirect to another page, although that looks to be a little tricky to do via plugins because there are a couple other things that could happen at that point (handling COPPA users and email confirmation).
I'm guessing adding a java script to that standard error is not going to work. Text only?
Reply With Quote
  #8  
Old 12-14-2011, 09:23 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think it can be any html, so I don't see why it couldn't include javascript (inside <script>...</script> tags of course).
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 11:41 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.04339 seconds
  • Memory Usage 2,230KB
  • Queries Executed 13 (?)
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_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (8)postbit
  • (8)postbit_onlinestatus
  • (8)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_postinfo_query
  • fetch_postinfo
  • 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