Inserting java script on the registration page

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • _Quads_
    Member
    • Jul 2008
    • 55
    • 3.7.x

    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. (register.php?do=addmember)

    Any help would be much appreciated. I've searched the forum, the manual, the docs, google, etc.

    TIA, I appreciate any assistance.
  • Trevor Hannant
    vBulletin Support
    • Aug 2002
    • 24351
    • 5.7.X

    #2
    You shouldn't edit the files, only the templates. An easy way to see what templates are used is to go to:

    AdminCP > vBulletin Options > General Settings > Add Template Name in HTML Comments > 'Yes'

    Then, when you view the source code of the page, you will see where each template starts/stops and can add the code to the relvant template(s)
    Vote for:

    - Admin Settable Paid Subscription Reminder Timeframe (vB6)
    - Add Admin ability to auto-subscribe users to specific channel(s) (vB6)

    Comment

    • _Quads_
      Member
      • Jul 2008
      • 55
      • 3.7.x

      #3
      Thanks Trevor-

      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.

      ~Q

      Comment

      • Trevor Hannant
        vBulletin Support
        • Aug 2002
        • 24351
        • 5.7.X

        #4
        That's tougher as that is actually using a generic template that's used for all (error) messages. Haven't tried this but you could try editing the 'registration_complete' phrase and add it below there - although I can't guarantee that it will parse the code correctly. Otherwise, I'd suggest posting at our customisation site, www.vbulletin.org, for further assistance with this
        Vote for:

        - Admin Settable Paid Subscription Reminder Timeframe (vB6)
        - Add Admin ability to auto-subscribe users to specific channel(s) (vB6)

        Comment

        • _Quads_
          Member
          • Jul 2008
          • 55
          • 3.7.x

          #5
          Thanks Trevor-
          I also posted the question at .org to get some input there as well.
          I'll try the phrase method on a test box and see if that doesn't blow it up. What would be the easiest way to modify the registration compete phrase? Through the adminCP? I seem to remember doing it some time back for something else but am drawing a blank at the moment.

          Comment

          • Trevor Hannant
            vBulletin Support
            • Aug 2002
            • 24351
            • 5.7.X

            #6
            You need to edit it via:

            AdminCP > Languages & Phrases

            If you search for that phrase name, it'll come up
            Vote for:

            - Admin Settable Paid Subscription Reminder Timeframe (vB6)
            - Add Admin ability to auto-subscribe users to specific channel(s) (vB6)

            Comment

            Related Topics

            Collapse

            Working...