MyBB Community Forums

Full Version: Registation Box on Portal page $$
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi, I need a plugin that will let me put a registration box obove the sign in box on the portal page in 8.1
no captcha.
I would gladly pay $10 Via paypal.

Can anyone help me with this?

Thanks, Michael
you can take required code from member_register template. can we have your forum url
( not sure whether I'll be able to check it in next few hours )
(2014-10-25, 09:27 AM).m. Wrote: [ -> ]you can take required code from member_register template. can we have your forum url
( not sure whether I'll be able to check it in next few hours )

Indeed, I tried that approach  already but could not get it formatted correctly, I will definitely check it out again.
Looking at the code, I think I can get the register box set in place, I will try,
post your portal template and your member_register template, i'll take a look soon as possible :-)
(2014-10-25, 01:19 PM)coxuso Wrote: [ -> ]post your portal template and your member_register template, i'll take a look soon as possible :-)

Hey friend! You are Rockstar! Thank you for being such a saving grace! I'm so grateful to you.

I managed to get the registration box installed but it is kind of rough, the javascript is missing the password validation as in the example pic below, it doesn't mess up the registration box, but forces the user to go to the register.php page to correct any issue with the password, which is cool, but I would rather have the password validation included in the javascript,

[Image: missing_validation.png]

Now this is the memeber_register template:

<html>
<head>
<title>{$mybb->settings['bbname']} - {$lang->registration}</title>
{$headerinclude}
<script src="{$mybb->asset_url}/jscripts/validate/jquery.validate.min.js"></script>
</head>
<body>
{$header}
<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>
{$passboxes}
<tr>
<td width="50%" valign="top"><span class="smalltext"><label for="email">{$lang->email}</label></span></td>
<td width="50%" valign="top"><span class="smalltext"><label for="email2">{$lang->confirm_email}</label></span></td>
</tr>
<tr>
<td width="50%" valign="top"><input type="text" class="textbox" name="email" id="email" style="width: 100%" maxlength="50" value="{$email}" /></td>
<td width="50%" valign="top"><input type="text" class="textbox" name="email2" id="email2" style="width: 100%" maxlength="50" value="{$email2}" /></td>
</tr>
<tr>
	<td colspan="2" style="display: none;" id="email_status">&nbsp;</td>
</tr>
{$hiddencaptcha}
</table>
</fieldset>
{$requiredfields}
{$customfields}
{$referrer}
{$regimage}
{$questionbox}
</td>
<td width="50%" class="trow1" valign="top">
<fieldset class="trow2">
<legend><strong>{$lang->account_prefs}</strong></legend>
<table cellspacing="0" cellpadding="{$theme['tablespace']}" width="100%">
<tr>
<td valign="top" width="1"><input type="checkbox" class="checkbox" name="allownotices" id="allownotices" value="1" {$allownoticescheck} /></td>
<td valign="top"><span class="smalltext"><label for="allownotices">{$lang->allow_notices}</label></span></td>
</tr>
<tr>
<td valign="top" width="1"><input type="checkbox" class="checkbox" name="hideemail" id="hideemail" value="1" {$hideemailcheck} /></td>
<td valign="top"><span class="smalltext"><label for="hideemail">{$lang->hide_email}</label></span></td>
</tr>
<tr>
<td valign="top" width="1"><input type="checkbox" class="checkbox" name="receivepms" id="receivepms" value="1" {$receivepmscheck} /></td>
<td valign="top"><span class="smalltext"><label for="receivepms">{$lang->receive_pms}</label></span></td>
</tr>
<tr>
<td valign="top" width="1"><input type="checkbox" class="checkbox" name="pmnotice" id="pmnotice" value="1"{$pmnoticecheck} /></td>
<td valign="top"><span class="smalltext"><label for="pmnotice">{$lang->pm_notice}</label></span></td>
</tr>
<tr>
<td valign="top" width="1"><input type="checkbox" class="checkbox" name="pmnotify" id="pmnotify" value="1" {$pmnotifycheck} /></td>
<td valign="top"><span class="smalltext"><label for="pmnotify">{$lang->email_notify_newpm}</label></span></td>
</tr>
<tr>
<td valign="top" width="1"><input type="checkbox" class="checkbox" name="invisible" id="invisible" value="1" {$invisiblecheck} /></td>
<td valign="top"><span class="smalltext"><label for="invisible">{$lang->invisible_mode}</label></span></td>
</tr>
<tr>
<td colspan="2"><span class="smalltext"><label for="subscriptionmethod">{$lang->subscription_method}</label></span></td>
</tr>
<tr>
<td colspan="2">
	<select name="subscriptionmethod" id="subscriptionmethod">
		<option value="0" {$no_auto_subscribe_selected}>{$lang->no_auto_subscribe}</option>
		<option value="1" {$no_subscribe_selected}>{$lang->no_subscribe}</option>
		<option value="2" {$instant_email_subscribe_selected}>{$lang->instant_email_subscribe}</option>
		<option value="3" {$instant_pm_subscribe_selected}>{$lang->instant_pm_subscribe}</option>
	</select>
</td>
</tr>
</table>
</fieldset>
<br />
<fieldset class="trow2">
<legend><strong><label for="timezone">{$lang->time_offset}</label></strong></legend>
<table cellspacing="0" cellpadding="{$theme['tablespace']}" width="100%">
<tr>
<td><span class="smalltext">{$lang->time_offset_desc}</span></td>
</tr>
<tr>
<td>{$tzselect}</td>
</tr>
<tr>
<td><span class="smalltext">{$lang->dst_correction}</span></td>
</tr>
<tr>
<td>
	<select name="dstcorrection">
		<option value="2" {$dst_auto_selected}>{$lang->dst_correction_auto}</option>
		<option value="1" {$dst_enabled_selected}>{$lang->dst_correction_enabled}</option>
		<option value="0" {$dst_disabled_selected}>{$lang->dst_correction_disabled}</option>
	</select>
</td>
</tr>
</table>
</fieldset>
{$boardlanguage}
</td>
</tr>
</table>
<br />
<div align="center">
<input type="hidden" name="regtime" value="{$time}" />
<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">
<!--
$().ready(function() {
	// validate registration_form
	$("#registration_form").validate({
		rules: {
          username: {
            required: true,
            minlength: {$mybb->settings['minnamelength']},
			maxlength: {$mybb->settings['maxnamelength']},
			remote:{
				url: "xmlhttp.php?action=username_availability",
				type: "post",
              	dataType: "json",
				data:
				{
					my_post_key: my_post_key
				},
			},
          },
          email: {
				required: true,
				email: true,
          },
          email2: {
				required: true,
				email: true,
				equalTo: "#email"
          },
		},
		messages: {
            username: {
              		minlength: "{$lang->js_validator_username_length}",
              		maxlength: "{$lang->js_validator_username_length}",
            },
          	email: "{$lang->js_validator_invalid_email}",
			email2: "{$lang->js_validator_email_match}",
		}
	});

   {$validator_extra}
});
// -->
</script>

{$footer}
</body>
</html>

And this is how I incorportated the member_register into the portal template,
portal template:

<html>
<head>
<title>{$mybb->settings['bbname']}</title>
<link rel="alternate" type="application/rss+xml" title="{$lang->latest_announcements} (RSS 2.0)" href="{$mybb->settings['bburl']}/syndication.php?portal=1" />
<link rel="alternate" type="application/atom+xml" title="{$lang->latest_announcements} (Atom 1.0)" href="{$mybb->settings['bburl']}/syndication.php?portal=1&type=atom1.0" />
{$headerinclude}
 <script src="{$mybb->asset_url}/jscripts/validate/jquery.validate.min.js"></script>
</head>
<body>
{$header}
  <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 width="100%" cellspacing="0" cellpadding="{$theme['tablespace']}" border="0" align="center"> 
    <table cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td class="thead"><strong>{$icon} <a href="{$mybb->settings['bburl']}/{$announcement['threadlink']}">{$announcement['subject']}</a></strong>Online Users</td>
</tr>
<tr>
    <td class="trow1"><span class="smalltext">
{$lang->online_users}<strong>&nbsp;</strong> {$lang->online_counts}</span></strong></span><span class="smalltext">{$lang->online_note}</span><br />
 {$onlinemembers}</span> 
    </td></tr>
     </table> <br />
<table width="0%" cellspacing="0" cellpadding="{$theme['tablespace']}" border="0" align="right">  
  <tr>
  <td valign="top">
{$announcements}
{$multipage}
</td>
<td>&nbsp;</td>
<td valign="top" width="300">
  <table style="width:100%" border="0" align="center">
<tr>
<td colspan="2"><span class="smalltext"><label for="username">Username/Email:</label></span></td>
</tr>
<tr>
<td colspan="2"><input type="text" class="textbox" name="username" id="username" style="width: 95%" value="" /></td>
</tr>
<tr>
<td width="50%" valign="top"><span class="smalltext">Password</span></td>
<td width="50%" valign="top"><span class="smalltext">Confirm Password</span></td>
</tr>
<tr>
<td width="50%" valign="top"><input type="password" class="textbox" name="password" id="password" style="width: 95%" /></td>
<td width="50%" valign="top"><input type="password" class="textbox" name="password2" id="password2" style="width: 95%" /></td>
</tr>
<tr>
	<td colspan="2" style="display: none;" id="password_status">&nbsp;</td>
</tr>
<tr>
<td width="50%" valign="top"><span class="smalltext"><label for="email">Email</label></span></td>
<td width="50%" valign="top"><span class="smalltext"><label for="email2">Confirm Email</label></span></td>
</tr>
<tr>
<td width="50%" valign="top"><input type="text" class="textbox" name="email" id="email" style="width: 95%" maxlength="50" value="{$email}" /></td>
<td width="50%" valign="top"><input type="text" class="textbox" name="email2" id="email2" style="width: 95%" maxlength="50" value="{$email2}" /></td>
</tr>
<tr>
	<td colspan="2" style="display: none;" id="email_status">&nbsp;</td>
</tr>
{$hiddencaptcha}
  </table>
  <br />
   <div align="center" valign="bottom">
<input type="hidden" name="regtime" value="{$time}" />
<input type="hidden" name="step" value="registration" />
<input type="hidden" name="action" value="do_register" />
<input type="submit" class="button" name="regsubmit" value="Sign up for Indie Music Board" />
</div>
  </form>
  <script type="text/javascript">
<!--
$().ready(function() {
	// validate registration_form
	$("#registration_form").validate({
		rules: {
          username: {
            required: true,
            minlength: {$mybb->settings['minnamelength']},
			maxlength: {$mybb->settings['maxnamelength']},
			remote:{
				url: "xmlhttp.php?action=username_availability",
				type: "post",
              	dataType: "json",
				data:
				{
					my_post_key: my_post_key
				},
			},
          },
          email: {
				required: true,
				email: true,
          },
          email2: {
				required: true,
				email: true,
				equalTo: "#email"
          },
		},
		messages: {
            username: {
              		minlength: "{$lang->js_validator_username_length}",
              		maxlength: "{$lang->js_validator_username_length}",
            },
          	email: "You need to enter a valid email address",
			email2: "You need to enter the same email address again",
		}
	});

   pass{$validator_extra}
});
// -->
  </script>
</fieldset>
</td>
</tr>
</table>
{$footer}
</body>
  </html>

But I can't seem to get the registration box with a border and background color, I worked on this for ten hours to get it this far, it is still missing the javascript validation for the password and the registration box is missing the border and background color,

what do you think? In all regards, I really appreciate your valuable time, the assistance you have offered me thus far, it is people like you who help complete dreams for people like me.
Any pointers are absolutely appreciated!!
God bless!

p.s, the code is not quite finished, i still have to add in the phpconditionals to hide the registration box to logged in members, which is super simple, just use conditionals for this,
(2014-10-25, 09:27 AM).m. Wrote: [ -> ]you can take required code from member_register template. can we have your forum url
( not sure whether I'll be able to check it in next few hours )

hey .m! I have a basic music discussion website which I can pm you the link, I just don't want to post a link publically because the site is in such disarray at the moment. I posted the link yesterday but I removed it today, thanks for understanding.
God Bless!