vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Inserting java script on the registration page (https://vborg.vbsupport.ru/showthread.php?t=275464)

Quads 12-14-2011 01:14 AM

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.

Chris8 12-14-2011 01:25 AM

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

So, Edit Templates -> Registration -> register

Quads 12-14-2011 01:38 AM

Quote:

Originally Posted by Chris8 (Post 2277564)
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.

Lynne 12-14-2011 03:50 AM

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.)

Quads 12-14-2011 05:53 PM

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.

kh99 12-14-2011 06:00 PM

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).

Quads 12-14-2011 06:41 PM

Quote:

Originally Posted by kh99 (Post 2277768)
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?

kh99 12-14-2011 09:23 PM

I think it can be any html, so I don't see why it couldn't include javascript (inside <script>...</script> tags of course).


All times are GMT. The time now is 08:40 AM.

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.01115 seconds
  • Memory Usage 1,728KB
  • 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_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete