vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Miscellaneous Hacks - AJAX / Cool Registration (https://vborg.vbsupport.ru/showthread.php?t=142181)

Mr Chad 03-15-2007 10:00 PM

AJAX / Cool Registration
 
Removed.

Mr Chad 03-16-2007 03:05 AM

The End

Shazz 03-16-2007 03:12 AM

Will test on test site now :)

Kirk Y 03-16-2007 03:17 AM

Well, I followed all the directions -- and changed the filepath to the register.js file; you've got it pointing to your site's JS file in the Install directions -- but, I just get Javascript errors. :(

Quote:

form.username has no properties
http://forum.socomcity.net/clientscript/register.js
Line 99

PhoneiX 03-16-2007 03:25 AM

Nice hack

*installed*

aveon 03-16-2007 03:26 AM

thanx for this woks great

ZomgStuff 03-16-2007 03:35 AM

Very nice, thanks!

HMBeaty 03-16-2007 03:37 AM

Might have to use this. Depending on the feedback.

Shazz 03-16-2007 03:44 AM

Quote:

Originally Posted by acidburn0520 (Post 1204578)
Well, I followed all the directions -- and changed the filepath to the register.js file; you've got it pointing to your site's JS file in the Install directions -- but, I just get Javascript errors. :(

Are you doing this on 3.5?

Mr Chad 03-16-2007 04:03 AM

i did this in 3.6.3

also updated to fix errors.

(first step changed, and the filepath for the JS is now in the clientscript dir)

Shazz 03-16-2007 04:05 AM

Quote:

Originally Posted by Mr Chad (Post 1204594)
i did this in 3.6.3

also updated to fix errors.

(first step changed, and the filepath for the JS is now in the clientscript dir)

Yea, wasen't referring to you though, Since the mod of this thread did say 3.6.5

But acidburn could have been working on a 3.5 :|

Mr Chad 03-16-2007 04:07 AM

well it could work on 3.5

Kirk Y 03-16-2007 04:08 AM

No, I'm using 3.6.5.

Mr Chad 03-16-2007 04:15 AM

well first Follow the first step again.

and move the JS to the clientscript folder.

Kirk Y 03-16-2007 04:17 AM

I moved it there originally. Perhaps I missed a template edit... I'll go back and check.

Mr Chad 03-16-2007 04:25 AM

I'm looking at your page and u still need to make the 1st edit.

Mr Chad 03-16-2007 04:31 AM

3.6.3 Registration Template With edits:
HTML Code:

<script type="text/javascript" src="./clientscript/register.js"></script>
$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
$headinclude
<title>$vboptions[bbtitle] - <if condition="$show['coppa']">$vbphrase[coppa] </if>$vbphrase[registration]</title>
</head>
<body>

$header

<br />

<table cellpadding="2" cellspacing="0" border="0" width="100%" align="center">
<tr>
        <td>
               
                <if condition="$show['coppa']">
                        $vbphrase[until_receive_signed_form]
                </if>
        </td>
</tr>
<if condition="$show['errors']">
        <tr>
                <td><strong>$vbphrase[errors_occurred_during_registration]:</strong>
                        <ul>
                        $errorlist
                        </ul>
                </td>
        </tr>
</if>
</table>

<br />

<script type="text/javascript" src="clientscript/vbulletin_md5.js?v=$vboptions[simpleversion]"></script>
<script type="text/javascript">
function verify_passwords(password1, password2)
{
        // do various checks, this will save people noticing mistakes on next page
        if (password1.value == '' || password2.value == '')
        {
                alert('$vbphrase[fill_out_both_password_fields]');
                return false;
        }
        else if (password1.value != password2.value)
        {
                alert('$vbphrase[entered_passwords_do_not_match]');
                return false;
        }
        else
        {
                <if condition="$show['coppa']">
                pass_copy = password1.value;
                passconfirm_copy = password2.value;
                </if>

                var junk_output;
               
                md5hash(password1, document.forms.register.password_md5, junk_output, $show[nopasswordempty]);
                md5hash(password2, document.forms.register.passwordconfirm_md5, junk_output, $show[nopasswordempty]);
               
                <if condition="$show['coppa']">
                document.forms.register.password.value = pass_copy;
                document.forms.register.passwordconfirm.value = passconfirm_copy;
                </if>
               
                return true;
        }
        return false;
}
</script>

<form action="register.php?do=addmember" name="register" method="post" onsubmit="return verify_passwords(password, passwordconfirm);">
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="do" value="addmember" />
<input type="hidden" name="url" value="$url" />
<input type="hidden" name="agree" value="$agree" />
<input type="hidden" name="password_md5" />
<input type="hidden" name="passwordconfirm_md5" />
<if condition="!$show['birthday']">
        <input type="hidden" name="day" value="$day" />
        <input type="hidden" name="month" value="$month" />
        <input type="hidden" name="year" value="$year" />
</if>
<if condition="$show['coppa']">
        <input type="hidden" name="coppauser" value="1" />
</if>

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
        <td class="tcat"><phrase 1="$vboptions[bbtitle]">$vbphrase[register_at_x]</phrase></td>
</tr>
<tr>
        <td class="panelsurround" align="center">
        <div class="panel">
                <div style="width:$stylevar[formwidth]" align="$stylevar[left]">
               
                        <div class="smallfont" style="margin-bottom:$stylevar[formspacer]px">
                                <phrase 1="$vboptions[bbtitle]">$vbphrase[to_post_must_first_register]</phrase>
                        </div>
                       
                        <div class="smallfont" style="margin-bottom:$stylevar[formspacer]px">
                                <strong>$vbphrase[username]</strong>:<br />
                                <input type="text" class="bginput" name="username" size="25" maxlength="$vboptions[maxuserlength]" value="$username" id="username" style="width: 212px" onblur="CheckUserName();"/><span id="username_status"></span>
                        </div>
                       
                        <fieldset class="fieldset">
                                <legend>$vbphrase[password]</legend>
                                <table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0" width="400">
                                <tr>
                                        <td colspan="2">$vbphrase[enter_password_for_account]</td>
                                </tr>
                                <tr>
                                        <td>
                                                $vbphrase[password]:<br />
                                                <input type="password" class="bginput" name="password" size="25" maxlength="50" value="$password" onblur="varfield(1);" id="password_1"/>
                                        </td>
                                        <td>
                                                $vbphrase[confirm_password]:<br />
                                                <input type="password" class="bginput" name="passwordconfirm" size="25" maxlength="50" value="$passwordconfirm" onblur="varfield(2);" id="password_2"/>
                                        </td>
                                </tr>
                                <tr>
                                        <td colspan="2">
                                                <span id="password_1_status"></span>
                                        </td>
                                </tr>
                                <tr>
                                        <td colspan="2">
                                                <span id="password_2_status"></span>
                                        </td>
                                </tr>
                                </table>
                        </fieldset>
                       
                        <fieldset class="fieldset">
                                <legend>$vbphrase[email_address]</legend>
                                <table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0" width="400">
                                <tr>
                                        <td colspan="2">$vbphrase[enter_valid_email_address]</td>
                                </tr>
                                <tr>
                                        <td>
                                                $vbphrase[email_address]:<br />
                                                <input type="text" class="bginput" name="email" size="25" maxlength="50" value="$email" dir="ltr" onblur="varfield(3);" id="email_1"/>
                                        </td>
                                        <td>
                                                $vbphrase[confirm_email_address]:<br />
                                                <input type="text" class="bginput" name="emailconfirm" size="25" maxlength="50" value="$emailconfirm" dir="ltr" onblur="varfield(4);" id="email_2"/>
                                        </td>
                                </tr>
                                <tr>
                                        <td colspan="2">
                                                <span id="email_1_status"></span>
                                        </td>
                                </tr>
                                <tr>
                                        <td colspan="2">
                                                <span id="email_2_status"></span>
                                        </td>
                                </tr>
                                <if condition="$show['coppa']">
                                <tr>
                                        <td>$vbphrase[if_under_13_provide_parent]</td>
                                </tr>
                                <tr>
                                        <td>
                                                $vbphrase[parent_guardian_email]:<br />
                                                <input type="text" class="bginput" name="parentemail" size="25" maxlength="50" value="$parentemail" dir="ltr" />
                                        </td>
                                </tr>
                                </if>
                                </table>
                        </fieldset>
                       
                        $imagereg
                       
                </div>
        </div>
        </td>
</tr>
</table>
<br />

<if condition="$show['customfields_profile']">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
        <td class="thead">$vbphrase[additional_required_information_profile]</td>
</tr>
<tr>
        <td class="panelsurround" align="center">
        <div class="panel">
                <div style="width:$stylevar[formwidth]" align="$stylevar[left]">
               
                        $customfields_profile
                       
                        <if condition="$show['birthday']">$birthdayfields</if>
               
                </div>
        </div>
        </td>
</tr>
</table>
<br />
</if>

<if condition="$show['customfields_option']">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
        <td class="thead">$vbphrase[additional_required_information_option]</td>
</tr>
<tr>
        <td class="panelsurround" align="center" style="height: 23px">
        <div class="panel">
                <div style="width:$stylevar[formwidth]" align="$stylevar[left]">
               
                        $customfields_option
               
                </div>
        </div>
        </td>
</tr>
</table>
<br />
</if>

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
        <td class="thead">$vbphrase[additional_information]</td>
</tr>
<tr>
        <td class="panelsurround" align="center">
        <div class="panel">
                <div style="width:$stylevar[formwidth]" align="$stylevar[left]">
               
                        <if condition="$show['referrer']">
                        <fieldset class="fieldset">
                                <legend>$vbphrase[referrer]</legend>
                                <table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0" width="100%">
                                <tr>
                                        <td><phrase 1="$vboptions[bbtitle]">$vbphrase[if_referred_enter_name]</phrase></td>
                                </tr>
                                <tr>
                                        <td>
                                                $vbphrase[referrer]:<br />
                                                <div id="referrerfield"><input id="referrerfield_txt" type="text" class="bginput" name="referrername" value="$referrername" size="50" maxlength="$vboptions[maxuserlength]" /></div>
                                                <if condition="$show['popups']">
                                                        <div id="referrerfield_menu" class="vbmenu_popup" style="display:none; z-index:50"></div>
                                                        <script type="text/javascript" src="clientscript/vbulletin_ajax_namesugg.js?v=$vboptions[simpleversion]"></script>
                                                        <script type="text/javascript">
                                                        <!--
                                                                vbmenu_register('referrerfield', true);
                                                                rnc = new vB_AJAX_NameSuggest('rnc', 'referrerfield_txt', 'referrerfield');
                                                                rnc.allow_multiple = false;
                                                        //-->

                                                        </script>
                                                </if>
                                        </td>
                                </tr>
                                </table>
                        </fieldset>
                        </if>
               
                        $timezoneoptions
                       
                        <fieldset class="fieldset">
                                <legend>$vbphrase[receive_email]</legend>
                                <table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0" width="100%">
                                <tr>
                                        <td>
                                                $vbphrase[administrators_may_send_email]
                                        </td>
                                </tr>
                                <tr>
                                        <td><label for="cb_adminemail"><input type="checkbox" name="options[adminemail]" value="1" id="cb_adminemail" $checkedoff[adminemail] />$vbphrase[receive_email_from_bulletin_board_staff]</label></td>
                                </tr>
                                <if condition="$show['email']">
                                <tr>
                                        <td>$vbphrase[allow_members_send_you_email]</td>
                                </tr>
                                <tr>
                                        <td><label for="cb_showemail"><input type="checkbox" name="options[showemail]" value="1" id="cb_showemail" $checkedoff[showemail] />$vbphrase[receive_email_from_other_members]</label></td>
                                </tr>
                                </if>
                                </table>
                        </fieldset>

                       
                        $customfields_other
               
                </div>
        </div>
       
        <div style="margin-top:$stylevar[cellpadding]px">
                <input type="submit" class="button" value="$vbphrase[complete_registration]" accesskey="s" />
                <input type="reset" class="button" name="Reset" value="$vbphrase[reset_fields]" />
        </div>
        </td>
</tr>
</table>

</form>

$footer

</body>
</html>

3.6.3 Registration Template With-OUT edits:
HTML Code:

$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
$headinclude
<title>$vboptions[bbtitle] - <if condition="$show['coppa']">$vbphrase[coppa] </if>$vbphrase[registration]</title>
</head>
<body>

$header

<br />

<table cellpadding="2" cellspacing="0" border="0" width="100%" align="center">
<tr>
        <td>
               
                <if condition="$show['coppa']">
                        $vbphrase[until_receive_signed_form]
                </if>
        </td>
</tr>
<if condition="$show['errors']">
        <tr>
                <td><strong>$vbphrase[errors_occurred_during_registration]:</strong>
                        <ul>
                        $errorlist
                        </ul>
                </td>
        </tr>
</if>
</table>

<br />

<script type="text/javascript" src="clientscript/vbulletin_md5.js?v=$vboptions[simpleversion]"></script>
<script type="text/javascript">
function verify_passwords(password1, password2)
{
        // do various checks, this will save people noticing mistakes on next page
        if (password1.value == '' || password2.value == '')
        {
                alert('$vbphrase[fill_out_both_password_fields]');
                return false;
        }
        else if (password1.value != password2.value)
        {
                alert('$vbphrase[entered_passwords_do_not_match]');
                return false;
        }
        else
        {
                <if condition="$show['coppa']">
                pass_copy = password1.value;
                passconfirm_copy = password2.value;
                </if>

                var junk_output;
               
                md5hash(password1, document.forms.register.password_md5, junk_output, $show[nopasswordempty]);
                md5hash(password2, document.forms.register.passwordconfirm_md5, junk_output, $show[nopasswordempty]);
               
                <if condition="$show['coppa']">
                document.forms.register.password.value = pass_copy;
                document.forms.register.passwordconfirm.value = passconfirm_copy;
                </if>
               
                return true;
        }
        return false;
}
</script>

<form action="register.php?do=addmember" name="register" method="post" onsubmit="return verify_passwords(password, passwordconfirm);">
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="do" value="addmember" />
<input type="hidden" name="url" value="$url" />
<input type="hidden" name="agree" value="$agree" />
<input type="hidden" name="password_md5" />
<input type="hidden" name="passwordconfirm_md5" />
<if condition="!$show['birthday']">
        <input type="hidden" name="day" value="$day" />
        <input type="hidden" name="month" value="$month" />
        <input type="hidden" name="year" value="$year" />
</if>
<if condition="$show['coppa']">
        <input type="hidden" name="coppauser" value="1" />
</if>

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
        <td class="tcat"><phrase 1="$vboptions[bbtitle]">$vbphrase[register_at_x]</phrase></td>
</tr>
<tr>
        <td class="panelsurround" align="center">
        <div class="panel">
                <div style="width:$stylevar[formwidth]" align="$stylevar[left]">
               
                        <div class="smallfont" style="margin-bottom:$stylevar[formspacer]px">
                                <phrase 1="$vboptions[bbtitle]">$vbphrase[to_post_must_first_register]</phrase>
                        </div>
                       
                        <div class="smallfont" style="margin-bottom:$stylevar[formspacer]px">
                                <strong>$vbphrase[username]</strong>:<br />
                                <input type="text" class="bginput" name="username" size="50" maxlength="$vboptions[maxuserlength]" value="$username" />
                        </div>
                       
                        <fieldset class="fieldset">
                                <legend>$vbphrase[password]</legend>
                                <table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0" width="400">
                                <tr>
                                        <td colspan="2">$vbphrase[enter_password_for_account]</td>
                                </tr>
                                <tr>
                                        <td>
                                                $vbphrase[password]:<br />
                                                <input type="password" class="bginput" name="password" size="25" maxlength="50" value="$password" />
                                        </td>
                                        <td>
                                                $vbphrase[confirm_password]:<br />
                                                <input type="password" class="bginput" name="passwordconfirm" size="25" maxlength="50" value="$passwordconfirm" />
                                        </td>
                                </tr>
                                </table>
                        </fieldset>
                       
                        <fieldset class="fieldset">
                                <legend>$vbphrase[email_address]</legend>
                                <table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0" width="400">
                                <tr>
                                        <td colspan="2">$vbphrase[enter_valid_email_address]</td>
                                </tr>
                                <tr>
                                        <td>
                                                $vbphrase[email_address]:<br />
                                                <input type="text" class="bginput" name="email" size="25" maxlength="50" value="$email" dir="ltr" />
                                        </td>
                                        <td>
                                                $vbphrase[confirm_email_address]:<br />
                                                <input type="text" class="bginput" name="emailconfirm" size="25" maxlength="50" value="$emailconfirm" dir="ltr" />
                                        </td>
                                </tr>
                                <if condition="$show['coppa']">
                                <tr>
                                        <td>$vbphrase[if_under_13_provide_parent]</td>
                                </tr>
                                <tr>
                                        <td>
                                                $vbphrase[parent_guardian_email]:<br />
                                                <input type="text" class="bginput" name="parentemail" size="25" maxlength="50" value="$parentemail" dir="ltr" />
                                        </td>
                                </tr>
                                </if>
                                </table>
                        </fieldset>
                       
                        $imagereg
                       
                </div>
        </div>
        </td>
</tr>
</table>
<br />

<if condition="$show['customfields_profile']">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
        <td class="thead">$vbphrase[additional_required_information_profile]</td>
</tr>
<tr>
        <td class="panelsurround" align="center">
        <div class="panel">
                <div style="width:$stylevar[formwidth]" align="$stylevar[left]">
               
                        $customfields_profile
                       
                        <if condition="$show['birthday']">$birthdayfields</if>
               
                </div>
        </div>
        </td>
</tr>
</table>
<br />
</if>

<if condition="$show['customfields_option']">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
        <td class="thead">$vbphrase[additional_required_information_option]</td>
</tr>
<tr>
        <td class="panelsurround" align="center">
        <div class="panel">
                <div style="width:$stylevar[formwidth]" align="$stylevar[left]">
               
                        $customfields_option
               
                </div>
        </div>
        </td>
</tr>
</table>
<br />
</if>

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
        <td class="thead">$vbphrase[additional_information]</td>
</tr>
<tr>
        <td class="panelsurround" align="center">
        <div class="panel">
                <div style="width:$stylevar[formwidth]" align="$stylevar[left]">
               
                        <if condition="$show['referrer']">
                        <fieldset class="fieldset">
                                <legend>$vbphrase[referrer]</legend>
                                <table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0" width="100%">
                                <tr>
                                        <td><phrase 1="$vboptions[bbtitle]">$vbphrase[if_referred_enter_name]</phrase></td>
                                </tr>
                                <tr>
                                        <td>
                                                $vbphrase[referrer]:<br />
                                                <div id="referrerfield"><input id="referrerfield_txt" type="text" class="bginput" name="referrername" value="$referrername" size="50" maxlength="$vboptions[maxuserlength]" /></div>
                                                <if condition="$show['popups']">
                                                        <div id="referrerfield_menu" class="vbmenu_popup" style="display:none; z-index:50"></div>
                                                        <script type="text/javascript" src="clientscript/vbulletin_ajax_namesugg.js?v=$vboptions[simpleversion]"></script>
                                                        <script type="text/javascript">
                                                        <!--
                                                                vbmenu_register('referrerfield', true);
                                                                rnc = new vB_AJAX_NameSuggest('rnc', 'referrerfield_txt', 'referrerfield');
                                                                rnc.allow_multiple = false;
                                                        //-->

                                                        </script>
                                                </if>
                                        </td>
                                </tr>
                                </table>
                        </fieldset>
                        </if>
               
                        $timezoneoptions
                       
                        <fieldset class="fieldset">
                                <legend>$vbphrase[receive_email]</legend>
                                <table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0" width="100%">
                                <tr>
                                        <td>
                                                $vbphrase[administrators_may_send_email]
                                        </td>
                                </tr>
                                <tr>
                                        <td><label for="cb_adminemail"><input type="checkbox" name="options[adminemail]" value="1" id="cb_adminemail" $checkedoff[adminemail] />$vbphrase[receive_email_from_bulletin_board_staff]</label></td>
                                </tr>
                                <if condition="$show['email']">
                                <tr>
                                        <td>$vbphrase[allow_members_send_you_email]</td>
                                </tr>
                                <tr>
                                        <td><label for="cb_showemail"><input type="checkbox" name="options[showemail]" value="1" id="cb_showemail" $checkedoff[showemail] />$vbphrase[receive_email_from_other_members]</label></td>
                                </tr>
                                </if>
                                </table>
                        </fieldset>

                       
                        $customfields_other
               
                </div>
        </div>
       
        <div style="margin-top:$stylevar[cellpadding]px">
                <input type="submit" class="button" value="$vbphrase[complete_registration]" accesskey="s" />
                <input type="reset" class="button" name="Reset" value="$vbphrase[reset_fields]" />
        </div>
        </td>
</tr>
</table>

</form>

$footer

</body>
</html>


bollie 03-16-2007 04:32 AM

https://vborg.vbsupport.ru/external/2007/03/4.png

Mr Chad 03-16-2007 04:34 AM

i have created a pre-edited template please try that first :D

bollie 03-16-2007 04:47 AM

thx nice ;)

Mr Chad 03-16-2007 04:49 AM

tell me if it works.

TheBlackPoet 03-16-2007 05:01 AM

nothing for me... im using 3.65.... hmmmm... oh well

Mr Chad 03-16-2007 05:07 AM

Quote:

Originally Posted by TheBlackPoet (Post 1204628)
nothing for me... im using 3.65.... hmmmm... oh well

hmm, did you try it with the pre-edited template?

Kirk Y 03-16-2007 05:11 AM

Quote:

Originally Posted by Mr Chad (Post 1204608)
I'm looking at your page and u still need to make the 1st edit.

That's because after I had no luck getting it to work, I removed the edits.

Quote:

Originally Posted by Mr Chad (Post 1204637)
hmm, did you try it with the pre-edited template?

I tried the pre-edited template as well, still no luck - same 'ol JS errors. Strange.

Mr Chad 03-16-2007 05:15 AM

hmm i installed it on my other forum with the pre-edited template with no errors.

Kirk Y 03-16-2007 05:23 AM

Yeah, for something seemingly so simple, this is being quite difficult.

Mr Chad 03-16-2007 05:24 AM

Quote:

Originally Posted by acidburn0520 (Post 1204649)
Yeah, for something seemingly so simple, this is being quite difficult.

well apply my template and ill have a look.

Kirk Y 03-16-2007 05:25 AM

<a href="http://soljasrevenge.com/sctest/forum/register.php" target="_blank">http://soljasrevenge.com/sctest/forum/register.php</a>

.htaccess.. user: admin pw: admin

bollie 03-16-2007 05:26 AM

help

https://vborg.vbsupport.ru/external/2007/03/3.png

PHP Code:

<script type="text/javascript" src="./clientscript/register.js"></script>
$stylevar[htmldoctype]
<
html dir="$stylevar[textdirection]lang="$stylevar[languagecode]">
<
head>
$headinclude
<title>$vboptions[bbtitle] - <if condition="$show['coppa']">$vbphrase[coppa] </if>$vbphrase[registration]</title>
</
head>
<
body>

$header

<br />

<
table cellpadding="2" cellspacing="0" border="0" width="100%" align="center">
<
tr>
    <
td>
        
        <if 
condition="$show['coppa']">
            
$vbphrase[until_receive_signed_form]
        </if>
    </
td>
</
tr>
<if 
condition="$show['errors']">
    <
tr>
        <
td><strong>$vbphrase[errors_occurred_during_registration]:</strong>
            <
ul>
            
$errorlist
            
</ul>
        </
td>
    </
tr>
</if>
</
table>

<
br />

<
script type="text/javascript" src="clientscript/vbulletin_md5.js?v=$vboptions[simpleversion]"></script>
<
script type="text/javascript">
function 
verify_passwords(password1password2)
{
    
// do various checks, this will save people noticing mistakes on next page
    
if (password1.value == '' || password2.value == '')
    {
        
alert('$vbphrase[fill_out_both_password_fields]');
        return 
false;
    }
    else if (
password1.value != password2.value)
    {
        
alert('$vbphrase[entered_passwords_do_not_match]');
        return 
false;
    }
    else
    {
        <if 
condition="$show['coppa']">
        
pass_copy password1.value;
        
passconfirm_copy password2.value;
        </if>

        var 
junk_output;
        
        
md5hash(password1document.forms.register.password_md5junk_output$show[nopasswordempty]);
        
md5hash(password2document.forms.register.passwordconfirm_md5junk_output$show[nopasswordempty]);
        
        <if 
condition="$show['coppa']">
        
document.forms.register.password.value pass_copy;
        
document.forms.register.passwordconfirm.value passconfirm_copy;
        </if>
        
        return 
true;
    }
    return 
false;
}
</
script>

<
form action="register.php?do=addmember" name="register" method="post" onsubmit="return verify_passwords(password, passwordconfirm);">
<
input type="hidden" name="s" value="$session[sessionhash]/>
<
input type="hidden" name="do" value="addmember" />
<
input type="hidden" name="url" value="$url/>
<
input type="hidden" name="agree" value="$agree/>
<
input type="hidden" name="password_md5" />
<
input type="hidden" name="passwordconfirm_md5" />
<if 
condition="!$show['birthday']">
    <
input type="hidden" name="day" value="$day/>
    <
input type="hidden" name="month" value="$month/>
    <
input type="hidden" name="year" value="$year/>
</if>
<if 
condition="$show['coppa']">
    <
input type="hidden" name="coppauser" value="1" />
</if>

<
table class="tborder" cellpadding="$stylevar[cellpadding]cellspacing="$stylevar[cellspacing]border="0" width="100%" align="center">
<
tr>
    <
td class="tcat"><phrase 1="$vboptions[bbtitle]">$vbphrase[register_at_x]</phrase></td>
</
tr>
<
tr>
    <
td class="panelsurround" align="center">
    <
div class="panel">
        <
div style="width:$stylevar[formwidth]align="$stylevar[left]">
        
            <
div class="smallfont" style="margin-bottom:$stylevar[formspacer]px">
                <
phrase 1="$vboptions[bbtitle]">$vbphrase[to_post_must_first_register]</phrase>
            </
div>
            
            <
div class="smallfont" style="margin-bottom:$stylevar[formspacer]px">
                <
strong>$vbphrase[username]</strong>:<br />
                <
input type="text" class="bginput" name="username" size="25" maxlength="$vboptions[maxuserlength]value="$usernameid="username" style="width: 212px" onblur="CheckUserName();"/><span id="username_status"></span>
            </
div>
            
            <
fieldset class="fieldset">
                <
legend>$vbphrase[password]</legend>
                <
table cellpadding="0" cellspacing="$stylevar[formspacer]border="0" width="400">
                <
tr>
                    <
td colspan="2">$vbphrase[enter_password_for_account]</td>
                </
tr>
                <
tr>
                    <
td>
                        
$vbphrase[password]:<br />
                        <
input type="password" class="bginput" name="password" size="25" maxlength="50" value="$passwordonblur="varfield(1);" id="password_1"/>
                    </
td>
                    <
td>
                        
$vbphrase[confirm_password]:<br />
                        <
input type="password" class="bginput" name="passwordconfirm" size="25" maxlength="50" value="$passwordconfirmonblur="varfield(2);" id="password_2"/>
                    </
td>
                </
tr>
                <
tr>
                    <
td colspan="2">
                        <
span id="password_1_status"></span>
                    </
td>
                </
tr>
                <
tr>
                    <
td colspan="2">
                        <
span id="password_2_status"></span>
                    </
td>
                </
tr>
            </
fieldset>
            
            <
fieldset class="fieldset">
                <
legend>$vbphrase[email_address]</legend>
                <
table cellpadding="0" cellspacing="$stylevar[formspacer]border="0" width="400">
                <
tr>
                    <
td colspan="2">$vbphrase[enter_valid_email_address]</td>
                </
tr>
                <
tr>
                    <
td>
                        
$vbphrase[email_address]:<br />
                        <
input type="text" class="bginput" name="email" size="25" maxlength="50" value="$emaildir="ltr" onblur="varfield(3);" id="email_1"/>
                    </
td>
                    <
td>
                        
$vbphrase[confirm_email_address]:<br />
                        <
input type="text" class="bginput" name="emailconfirm" size="25" maxlength="50" value="$emailconfirmdir="ltr" onblur="varfield(4);" id="email_2"/>
                    </
td>
                </
tr>
                <
tr>
                    <
td colspan="2">
                        <
span id="email_1_status"></span>
                    </
td>
                </
tr>
                <
tr>
                    <
td colspan="2">
                        <
span id="email_2_status"></span>
                    </
td>
                </
tr>
                <if 
condition="$show['coppa']">
                <
tr>
                    <
td>$vbphrase[if_under_13_provide_parent]</td>
                </
tr>
                <
tr>
                    <
td>
                        
$vbphrase[parent_guardian_email]:<br />
                        <
input type="text" class="bginput" name="parentemail" size="25" maxlength="50" value="$parentemaildir="ltr" />
                    </
td>
                </
tr>
                </if>
                </
table>
            </
fieldset>
            
            
$imagereg
            
        
</div>
    </
div>
    </
td>
</
tr>
</
table>
<
br />

<if 
condition="$show['customfields_profile']">
<
table class="tborder" cellpadding="$stylevar[cellpadding]cellspacing="$stylevar[cellspacing]border="0" width="100%" align="center">
<
tr>
    <
td class="thead">$vbphrase[additional_required_information_profile]</td>
</
tr>
<
tr>
    <
td class="panelsurround" align="center">
    <
div class="panel">
        <
div style="width:$stylevar[formwidth]align="$stylevar[left]">
        
            
$customfields_profile
            
            
<if condition="$show['birthday']">$birthdayfields</if>
        
        </
div>
    </
div>
    </
td>
</
tr>
</
table>
<
br />
</if>

<if 
condition="$show['customfields_option']">
<
table class="tborder" cellpadding="$stylevar[cellpadding]cellspacing="$stylevar[cellspacing]border="0" width="100%" align="center">
<
tr>
    <
td class="thead">$vbphrase[additional_required_information_option]</td>
</
tr>
<
tr>
    <
td class="panelsurround" align="center">
    <
div class="panel">
        <
div style="width:$stylevar[formwidth]align="$stylevar[left]">
        
            
$customfields_option
        
        
</div>
    </
div>
    </
td>
</
tr>
</
table>
<
br />
</if>

<
table class="tborder" cellpadding="$stylevar[cellpadding]cellspacing="$stylevar[cellspacing]border="0" width="100%" align="center">
<
tr>
    <
td class="thead">$vbphrase[additional_information]</td>
</
tr>
<
tr>
    <
td class="panelsurround" align="center">
    <
div class="panel">
        <
div style="width:$stylevar[formwidth]align="$stylevar[left]">
        
            <if 
condition="$show['referrer']">
            <
fieldset class="fieldset">
                <
legend>$vbphrase[referrer]</legend>
                <
table cellpadding="0" cellspacing="$stylevar[formspacer]border="0" width="100%">
                <
tr>
                    <
td><phrase 1="$vboptions[bbtitle]">$vbphrase[if_referred_enter_name]</phrase></td>
                </
tr>
                <
tr>
                    <
td>
                        
$vbphrase[referrer]:<br />
                        <
div id="referrerfield"><input id="referrerfield_txt" type="text" class="bginput" name="referrername" value="$referrernamesize="50" maxlength="$vboptions[maxuserlength]/></div>
                        <if 
condition="$show['popups']">
                            <
div id="referrerfield_menu" class="vbmenu_popup" style="display:none; z-index:50"></div>
                            <
script type="text/javascript" src="clientscript/vbulletin_ajax_namesugg.js?v=$vboptions[simpleversion]"></script>
                            <
script type="text/javascript">
                            <!--
                                
vbmenu_register('referrerfield'true);
                                
rnc = new vB_AJAX_NameSuggest('rnc''referrerfield_txt''referrerfield');
                                
rnc.allow_multiple false;
                            
//-->
                            
</script>
                        </if>
                    </
td>
                </
tr>
                </
table>
            </
fieldset>
            </if>
        
            
$timezoneoptions
            
            
<fieldset class="fieldset">
                <
legend>$vbphrase[receive_email]</legend>
                <
table cellpadding="0" cellspacing="$stylevar[formspacer]border="0" width="100%">
                <
tr>
                    <
td>
                        
$vbphrase[administrators_may_send_email]
                    </
td>
                </
tr>
                <
tr>
                    <
td><label for="cb_adminemail"><input type="checkbox" name="options[adminemail]" value="1" id="cb_adminemail" $checkedoff[adminemail] />$vbphrase[receive_email_from_bulletin_board_staff]</label></td>
                </
tr>
                <if 
condition="$show['email']">
                <
tr>
                    <
td>$vbphrase[allow_members_send_you_email]</td>
                </
tr>
                <
tr>
                    <
td><label for="cb_showemail"><input type="checkbox" name="options[showemail]" value="1" id="cb_showemail" $checkedoff[showemail] />$vbphrase[receive_email_from_other_members]</label></td>
                </
tr>
                </if>
                </
table>
            </
fieldset>

            
            
$customfields_other
        
        
</div>
    </
div>
    
    <
div style="margin-top:$stylevar[cellpadding]px">
        <
input type="submit" class="button" value="$vbphrase[complete_registration]accesskey="s" />
        <
input type="reset" class="button" name="Reset" value="$vbphrase[reset_fields]/>
    </
div>
    </
td>
</
tr>
</
table>

</
form>

$footer

</body>
</
html


Kirk Y 03-16-2007 05:30 AM

If it's any consolation, I got it working on the default template... but for some reason, the skin I'm using doesn't like the modified register template.

Mr Chad 03-16-2007 05:34 AM

ill look further into this later, but what i would try doing is changing the form var name to like reg_form and replace all instances of it. (might be causing a problem)

Mr Chad 03-16-2007 05:37 AM

Quote:

Originally Posted by acidburn0520 (Post 1204656)
If it's any consolation, I got it working on the default template... but for some reason, the skin I'm using doesn't like the modified register template.

hmm, well im pretty sure this is your issue:

HTML Code:

  <td align="left" valign="top">
        <a href="register.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('register','','reever/images/misc/register_on.gif',1)"><img src="reever/images/misc/register_off.gif" name="register" border="0" alt="" /></a>
  </td>

it has the same name as the form which is causing problems.

sensimilla 03-16-2007 07:06 AM

great hack i was looking for it , thanks

projectego 03-16-2007 07:45 AM

Cool hack! Thanks alot, Mr Chad! :)

Distance 03-16-2007 07:55 AM

Great!!

I will wait for the bugs to be fixed then install this :)

TheMilkCarton 03-16-2007 08:47 AM

This is very minor, but can you take the thumbs.db out of the folders in the ZIP? :)

I'm installing now.. I'll give an update on how it works.

Edit:

1. Problem with the E-mail fieldset. Hovers above the Password fieldset.
2. None of the Ajax text shows up in IE7. Works in Firefox though.

Mr Chad.. In Edit #4, you either need to take the "</table>" OUT of the Find: step or put it at the end of the Replace: step.

I still haven't figured out the reason that text isn't showing up in IE7 though.

Hornstar 03-16-2007 10:35 AM

awesome, thanks.

danward 03-16-2007 11:49 AM

Will install this when it becomes more stable! :)

snono 03-16-2007 12:33 PM

thank you
i will try it,

Mr Chad 03-16-2007 01:38 PM

Quote:

Originally Posted by TheMilkCarton (Post 1204718)
This is very minor, but can you take the thumbs.db out of the folders in the ZIP? :)

I'm installing now.. I'll give an update on how it works.

Edit:

1. Problem with the E-mail fieldset. Hovers above the Password fieldset.
2. None of the Ajax text shows up in IE7. Works in Firefox though.

Mr Chad.. In Edit #4, you either need to take the "</table>" OUT of the Find: step or put it at the end of the Replace: step.

I still haven't figured out the reason that text isn't showing up in IE7 though.

ok well i fixed the instructions, also i fixed the JS so it works with IE now.


All times are GMT. The time now is 10:57 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.03995 seconds
  • Memory Usage 2,240KB
  • 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
  • (3)bbcode_html_printable
  • (1)bbcode_php_printable
  • (9)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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