littlematts |
02-09-2007 05:24 PM |
First of all let me thank you antialiasis for your great mod you provided.
I installed your mod on my vbull forum vBulletin? v3.6.4 and it is working perfect with the registration page..
but the issue i face is with integration.. I am not able to integrate the same with Quick Register Ver: 1.6.3 installed along. The question itself is not showing up. I have tried updating the script as specified by you in integration details page but to no avail.
I am adding the modified page here.. I will be lot thankful if you could take some time to look if it is right way i have done it.. or suggest me a remedy to help me out of this delemma.
"Generate NoSpam! question" on global_start modified to:
Code:
if ($vbulletin->options['nospam_onoff'] AND !$vbulletin->userinfo['userid'])
{
$nospamdo = true;
switch (THIS_SCRIPT) {
case 'register':
$thetemplate =& $vbulletin->templatecache['register'];
break;
case 'sendmessage':
$thetemplate =& $vbulletin->templatecache['contactus'];
break;
case 'search':
$vbulletin->templatecache['search_forums'] = str_replace(array('$imagereg</td>', '($imagereg)'), array('$nospamfield\n\n$imagereg</td>', '($imagereg OR $vbulletin->options[\'nospam_onoff\'])'), $vbulletin->templatecache['search_forums']);
break;
case 'newreply':
$thetemplate =& $vbulletin->templatecache['newreply'];
break;
case 'newthread':
$thetemplate =& $vbulletin->templatecache['newthread'];
break;
default:
if ($vbulletin->options['nospam_use_reg'] AND $vbulletin->options['quickregister_active']) {
$questions = explode("\n", $vbulletin->options['nospam_questions']);
$nospamnumber = array_rand($questions);
$qanda = explode(":",$questions["$nospamnumber"]);
$nospamquestion = $qanda[0];
}
$nospamdo = false;
}
if ($thetemplate)
{
$thetemplate = str_replace('$imagereg', '$nospamfield\n\n$imagereg', $thetemplate);
}
if ($nospamdo) {
$questions = explode("\n", $vbulletin->options['nospam_questions']);
$nospamnumber = array_rand($questions);
$qanda = explode(":",$questions["$nospamnumber"]);
$nospamquestion = $qanda[0];
eval('$nospamfield = "' . fetch_template('nospam') . '";');
}
}
and edited quick_register template is:
Code:
<if condition="$vboptions['quickregister_active'] AND $show['guest']">
<!-- Start Quick Register --><table class="tborder" cellpadding="6" cellspacing="1" border="0" width="100%" align="center">
<thead>
<tr>
<td class="tcat" colspan="6"><div align="center"><b>$vbphrase[quickregister_quickregister]</b></div></td>
</tr>
<tr>
<td class="alt1" colspan="6"> <div align="center">
<span class="smallfont"><script type="text/javascript" src="$vboptions[bburl]/clientscript/vbulletin_md5.js"></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('Fill out both password fields');
return false;
}
else if (password1.value != password2.value)
{
alert('Entered passwords do not match');
return false;
}
else
{
md5hash(password1, document.forms.register.password_md5);
md5hash(password2, document.forms.register.passwordconfirm_md5);
return true;
}
return false;
}
</script>
<form action="$vboptions[bburl]/register.php" name="register" method="post" onsubmit="return verify_passwords(password, passwordconfirm);">
<input type="hidden" name="s" value="" />
<input type="hidden" name="do" value="addmember" />
<input type="hidden" name="url" value="$url" />
<input type="hidden" name="agree" value="" />
<input type="hidden" name="password_md5" />
<input type="hidden" name="passwordconfirm_md5" />
<if condition="$vboptions['quickregister_welcomemsg']">
$vboptions[quickregister_welcomemsgtext]<br><br>
</if>
$vbphrase[quickregister_username]
<input type="text" class="bginput" name="username" maxlength="15" value="" style="width:70px" />
$vbphrase[quickregister_password]
<input type="password" class="bginput" name="password" maxlength="15" value="" style="width:70px" />
$vbphrase[quickregister_confirmpassword]
<input type="password" class="bginput" name="passwordconfirm" maxlength="15" value="" style="width:70px" />
$vbphrase[quickregister_email]
<input type="text" class="bginput" name="email" maxlength="50" value="" style="width:70px" />
$vbphrase[quickregister_confirmemail]
<input type="text" class="bginput" name="emailconfirm" maxlength="50" value="" style="width:70px" /><br>
<if condition="$vboptions['quickregister_dob']">
$vbphrase[quickregister_birthday]
<select name="month" id="bd_month"style="width:70px" />
<option value="-1">$vbphrase[quickregister_bdmonth]</option>
<option value="01">January</option>
<option value="02">February</option>
<option value="03">March</option>
<option value="04">April</option>
<option value="05">May</option>
<option value="06">June</option>
<option value="07">July</option>
<option value="08">August</option>
<option value="09">September</option>
<option value="10">October</option>
<option value="11">November</option>
<option value="12">December</option>
</select>
<select name="day" id="bd_day"style="width:70px" />
<option value="-1" >$vbphrase[quickregister_bdday]</option>
<option value="01" >1</option>
<option value="02" >2</option>
<option value="03" >3</option>
<option value="04" >4</option>
<option value="05" >5</option>
<option value="06" >6</option>
<option value="07" >7</option>
<option value="08" >8</option>
<option value="09" >9</option>
<option value="10" >10</option>
<option value="11" >11</option>
<option value="12" >12</option>
<option value="13" >13</option>
<option value="14" >14</option>
<option value="15" >15</option>
<option value="16" >16</option>
<option value="17" >17</option>
<option value="18" >18</option>
<option value="19" >19</option>
<option value="20" >20</option>
<option value="21" >21</option>
<option value="22" >22</option>
<option value="23" >23</option>
<option value="24" >24</option>
<option value="25" >25</option>
<option value="26" >26</option>
<option value="27" >27</option>
<option value="28" >28</option>
<option value="29" >29</option>
<option value="30" >30</option>
<option value="31" >31</option>
</select>
<input type="text" class="bginput" name="year" onFocus="value=''" value="$vbphrase[quickregister_bdyear]" size="4" maxlength="4" id="bd_year" style="width:50px" /></if>
<if condition="$vboptions['quickregister_imgver'] AND $vboptions['regimagecheck']">
<input type="text" class="bginput" name="imagestamp" size="16" onFocus="value=''" value="$vbphrase[quickregister_imagever]" maxlength="6" title="$vbphrase[quickregister_imageverhov]" />
<input type="hidden" name="imagehash" value="$imagehash" />
<img src="image.php?$session[sessionurl]type=regcheck&imagehash=$imagehash" alt="$vbphrase[registration_image]" width="100" height="30" border="0" />
</if>
<if condition="$vbulletin->options['nospam_onoff'] AND $vbulletin->options['nospam_use_reg']">
<br />$nospamquestion <input type="text" class="bginput" name="nospam" value="Answer here" onFocus="value=''" size="20" /> <input type="hidden" name="nospamnumber" value="$nospamnumber" />
</if>
<input type="submit" class="button" value="$vbphrase[quickregister_submit]" accesskey="s" /><input name="agree" id="cb_rules_agree" value="1" type="checkbox"><strong>$vbphrase[quickregister_agree] <a href="$vboptions[bburl]/register.php?" target="_blank">$vbphrase[quickregister_forumrules]</a></strong>
</span></form>
</div></td>
</tr>
</thead>
</table><br></if>
<!-- End Quick Register --></if>
i have disabled captcha image in vbull options.
buddy do you have any idea where i went wrong.. coz the quick register dsnt show the integrated no-spam question or the answer box in the page...which i feel mandatory to keep spammers away.. :(
hopefully waiting for your words of help..
regards
Matthew
|