MyBB Community Forums

Full Version: Short Regestration
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
If you wan't your forum members to have a quick and easy registration just open your member_register template and replace everything with this code.
Admin CP -> Templates & Style -> Template Sets -> *Theme* -> Member Templates -> member_register
<html>
<head>
<title>{$mybb->settings['bbname']} - {$lang->registration}</title>
{$headerinclude}
<script type="text/javascript" src="jscripts/validator.js"></script>
</head>
<body>
{$header}
<br />
<form action="member.php" method="post" id="registration_form"><input type="text" style="visibility: hidden;" value="" name="regcheck1" /><input type="text" style="visibility: hidden;" value="true" name="regcheck2" />
{$regerrors}
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td class="thead" colspan="2"><strong>{$lang->registration}</strong></td>
</tr>
<tr>
<td width="50%" class="trow1" valign="top">
<fieldset class="trow2">
<legend><strong>{$lang->account_details}</strong></legend>
<table cellspacing="0" cellpadding="{$theme['tablespace']}" width="100%">
<tr>
<td colspan="2"><span class="smalltext"><label for="username">{$lang->username}</label></span></td>
</tr>
<tr>
<td colspan="2"><input type="text" class="textbox" name="username" id="username" style="width: 100%" value="{$username}" /></td>
</tr>
<tr>
<td><span class="smalltext">{$lang->password}</span></td>
</tr>
<tr>
<td><input type="password" class="textbox" name="password" id="password" style="width: 100%" /></td>
</tr>
<tr>
    <td colspan="2" style="display: none;" id="password_status">&nbsp;</td>
</tr>
<tr>
<td><span class="smalltext"><label for="email">{$lang->email}</label></span></td>
</tr>
<tr>
<td><input type="text" class="textbox" name="email" id="email" style="width: 100%" maxlength="50" value="{$email}" /></td>
</tr>
<tr>
    <td colspan="2" style="display: none;" id="email_status">&nbsp;</td>
</tr>
<tr style="display: none;">
    <td colspan="2" id="{$captcha_field}_status">{$lang->leave_this_field_empty} <input type="text" class="textbox" name="{$captcha_field}" id="{$captcha_field}" style="width: 100%" maxlength="50" value="" /></td>
</tr>
</table>
</fieldset>
<td width="50%" class="trow1" valign="top">
{$regimage}
</td>
</td>
</td>
</tr>
</table>
<div align="center">
<input type="hidden" name="step" value="registration" />
<input type="hidden" name="action" value="do_register" />
<input type="submit" class="button" name="regsubmit" value="{$lang->submit_registration}" />
</div>
</form>
<script type="text/javascript">
<!--
    regValidator = new FormValidator('registration_form');
    regValidator.register('username', 'notEmpty', {failure_message:'{$lang->js_validator_no_username}'});
    regValidator.register('email', 'regexp', {match_field:'email2', regexp:'^([a-zA-Z0-9_\\.\\+\\-])+\\@(([a-zA-Z0-9\\-])+\\.)+([a-zA-Z0-9]{2,4})+$', failure_message:'{$lang->js_validator_invalid_email}'});
{$validator_extra}
    regValidator.register('username', 'ajax', {url:'xmlhttp.php?action=username_availability', loading_message:'{$lang->js_validator_checking_username}'}); // needs to be last
// -->
</script>
{$footer}
</body>
</html>
Preview: [attachment=27030]
If you need help with this just reply to this thread.
I had tried this before, but the validation was all messed up and the register button didn't work. Have you tested this thoroughly?
(2012-08-09, 02:55 PM)Josh H. Wrote: [ -> ]I had tried this before, but the validation was all messed up and the register button didn't work. Have you tested this thoroughly?

Yes, spent over a day testing it.
Hmm. I'll have to look at this. I guess when my method failed was when I tried to set up only one td instead of the two.
Edit: I just remembered that I did essentially that already with mine.
Would this work with a security Question?
Great thread!
Mind if I turn this into a video? (Of course, you'll get this thread linked)
Could you add a confirm password box and re add the referrer box?
I'll add the referrer box but not the confirm password box because this is for a SHORT regestration
(2012-08-15, 04:20 AM)Trickshot Wrote: [ -> ]Could you add a confirm password box and re add the referrer box?

Yes sure go ahead and make a video.
(2012-08-13, 04:07 AM)Hipfire Wrote: [ -> ]Great thread!
Mind if I turn this into a video? (Of course, you'll get this thread linked)
I'd like to know this too.

(2012-08-11, 11:50 PM)MichaudĀ© Wrote: [ -> ]Would this work with a security Question?
Probably if you changed the template first then ran the plugin installation.
Pages: 1 2