Advertisement:

Author Topic: Quick register form for SMF 1.0.x (probably works with 1.1.x too)  (Read 39797 times)

Offline Ivan Minic

  • Full Member
  • ***
  • Posts: 513
  • Gender: Male
  • Owner: www.Burek.com
    • Burek Forum
Just put this in your template file.
Works like charm :)

Code: [Select]
<strong>Quick Register:</strong><br />
<form action="', $scripturl, '?action=register2" method="post" style="margin: 3px 1px 1px 0; text-align:left;">
Username: <input type="text" name="user" size="10" /> Password: <input type="password" name="passwrd1" size="10" /> Confirm Password: <input type="password" name="passwrd2" size="10" /> Email: <input name="email" size="10" type="text" /><input name="regagree" type="hidden" value="checked" />
<input type="submit" value="Register" />
</form><br />
<form action="', $scripturl, '?action=login2" method="post" style="margin: 3px 1px 1px 0; text-align:right;">
<input type="text" name="user" size="10" /> <input type="password" name="passwrd" size="10" />
<select name="cookielength">
<option value="60">', $txt['smf53'], '</option>
<option value="1440">', $txt['smf47'], '</option>
<option value="10080">', $txt['smf48'], '</option>
<option value="302400">', $txt['smf49'], '</option>
<option value="-1" selected="selected">', $txt['smf50'], '</option>
</select>
<input type="submit" value="', $txt[34], '" /><br />
', $txt['smf52'], '
</form>';

Offline mennou

  • Full Member
  • ***
  • Posts: 507
  • Gender: Male
    • Unitymix,network
Re: Quick register form for SMF 1.0.x (probably works with 1.1.x too)
« Reply #1 on: August 06, 2005, 02:20:25 PM »
where exactly  do i have to paste this code?

Offline Ivan Minic

  • Full Member
  • ***
  • Posts: 513
  • Gender: Male
  • Owner: www.Burek.com
    • Burek Forum
Re: Quick register form for SMF 1.0.x (probably works with 1.1.x too)
« Reply #2 on: August 10, 2005, 01:27:56 PM »
Where ever you need it in your template.
If needed outside the forum, just edit location for form action

Offline mennou

  • Full Member
  • ***
  • Posts: 507
  • Gender: Male
    • Unitymix,network
Re: Quick register form for SMF 1.0.x (probably works with 1.1.x too)
« Reply #3 on: August 10, 2005, 03:39:06 PM »
where does it go ? index.template.php  or boardindex.template.php

Offline Ivan Minic

  • Full Member
  • ***
  • Posts: 513
  • Gender: Male
  • Owner: www.Burek.com
    • Burek Forum
Re: Quick register form for SMF 1.0.x (probably works with 1.1.x too)
« Reply #4 on: August 10, 2005, 04:30:47 PM »
Should i repeat? Where ever you need it. If place where you need it is in index.template , then add it there... if in login.template, add it there...

Offline !Hachi!

  • SMF Hero
  • ******
  • Posts: 1,666
  • Gender: Male
    • pakurdu.net
Re: Quick register form for SMF 1.0.x (probably works with 1.1.x too)
« Reply #5 on: August 16, 2005, 12:36:05 AM »
user also saw this who already registered so can we make it for only guests?
Happy Ramadan

Offline Tristan Perry

  • SMF Hero
  • ******
  • Posts: 2,498
  • Gender: Male
    • Tristan Perry
Re: Quick register form for SMF 1.0.x (probably works with 1.1.x too)
« Reply #6 on: August 16, 2005, 06:14:00 AM »
user also saw this who already registered so can we make it for only guests?
Try this, wherever you need it:

Code: [Select]
if( $context['user']['is_guest'] )
{
echo '<strong>Quick Register:</strong><br />
<form action="', $scripturl, '?action=register2" method="post" style="margin: 3px 1px 1px 0; text-align:left;">
Username: <input type="text" name="user" size="10" /> Password: <input type="password" name="passwrd1" size="10" /> Confirm Password: <input type="password" name="passwrd2" size="10" /> Email: <input name="email" size="10" type="text" /><input name="regagree" type="hidden" value="checked" />
<input type="submit" value="Register" />
</form><br />
<form action="', $scripturl, '?action=login2" method="post" style="margin: 3px 1px 1px 0; text-align:right;">
<input type="text" name="user" size="10" /> <input type="password" name="passwrd" size="10" />
<select name="cookielength">
<option value="60">', $txt['smf53'], '</option>
<option value="1440">', $txt['smf47'], '</option>
<option value="10080">', $txt['smf48'], '</option>
<option value="302400">', $txt['smf49'], '</option>
<option value="-1" selected="selected">', $txt['smf50'], '</option>
</select>
<input type="submit" value="', $txt[34], '" /><br />
', $txt['smf52'], '
</form>';
}

Offline !Hachi!

  • SMF Hero
  • ******
  • Posts: 1,666
  • Gender: Male
    • pakurdu.net
Re: Quick register form for SMF 1.0.x (probably works with 1.1.x too)
« Reply #7 on: August 16, 2005, 11:10:43 PM »
thanks tau
Happy Ramadan

Offline Seta Soujiro

  • Jr. Member
  • **
  • Posts: 218
  • Gender: Male
Re: Quick register form for SMF 1.0.x (probably works with 1.1.x too)
« Reply #8 on: August 27, 2005, 06:16:58 PM »
How do I add it right after the login box?  In beta3

Offline Harro

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,122
  • Gender: Male
  • I'm watching you
Re: Quick register form for SMF 1.0.x (probably works with 1.1.x too)
« Reply #9 on: May 19, 2006, 05:57:09 PM »
Quote
probably works with 1.1.x too
Anybody tried this with 1.1RC2? Does it work?
This is something I want for my forum :)

[edit]
Tried it out but it doesn't seem to work.
I put it in Boardindex.template.php
When I press reigster it just seems to reload the page, that's all...
Here's the link: http://harro.sin.khk.be/forums/index.php

[edit2]
Managed to do it.
I modified the layout aswell, but adding this to the first form tag made it work I think:
Code: [Select]
name="creator" id="creator"
Here's the result: http://harro.sin.khk.be/forums/index.php
« Last Edit: May 20, 2006, 05:35:46 PM by Harro »

Offline JshLnsctt

  • Full Member
  • ***
  • Posts: 463
  • Gender: Male
Re: Quick register form for SMF 1.0.x (probably works with 1.1.x too)
« Reply #10 on: June 05, 2006, 03:43:24 PM »
user also saw this who already registered so can we make it for only guests?
Try this, wherever you need it:

Code: [Select]
if( $context['user']['is_guest'] )
{
echo '<strong>Quick Register:</strong><br />
<form action="', $scripturl, '?action=register2" method="post" style="margin: 3px 1px 1px 0; text-align:left;">
Username: <input type="text" name="user" size="10" /> Password: <input type="password" name="passwrd1" size="10" /> Confirm Password: <input type="password" name="passwrd2" size="10" /> Email: <input name="email" size="10" type="text" /><input name="regagree" type="hidden" value="checked" />
<input type="submit" value="Register" />
</form><br />
<form action="', $scripturl, '?action=login2" method="post" style="margin: 3px 1px 1px 0; text-align:right;">
<input type="text" name="user" size="10" /> <input type="password" name="passwrd" size="10" />
<select name="cookielength">
<option value="60">', $txt['smf53'], '</option>
<option value="1440">', $txt['smf47'], '</option>
<option value="10080">', $txt['smf48'], '</option>
<option value="302400">', $txt['smf49'], '</option>
<option value="-1" selected="selected">', $txt['smf50'], '</option>
</select>
<input type="submit" value="', $txt[34], '" /><br />
', $txt['smf52'], '
</form>';
}

This guest only code won't work for me?  I am try to put it on the top of my site?

Offline Harro

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,122
  • Gender: Male
  • I'm watching you
Re: Quick register form for SMF 1.0.x (probably works with 1.1.x too)
« Reply #11 on: June 05, 2006, 07:36:12 PM »
Try this code:
Code: [Select]
if( $context['user']['is_guest'] )
{
echo '<br /><div class="tborder"><div class="windowbg2"><form action="'. $scripturl. '?action=register2" method="post" style="margin: 3px 1px 1px 0; text-align:left;" name="creator" id="creator">
<table>
<tr>
<td colspan="6"><strong>Quick Register:</strong></td>
</tr>
<tr>
<td>Username:</td>
<td> <input type="text" name="user" size="10"  maxlength="25" /></td>
<td>Password:</td>
<td> <input type="password" name="passwrd1" size="10" /></td>
<td> Confirm Password: </td><td><input type="password" name="passwrd2" size="10" /></td>

</tr>
<tr>
<td>Email:</td>
<td colspan="2"><input name="email" type="text" /></td>
<td colspan="3"><input name="regagree" type="hidden" value="checked" /></td>
</tr>
<tr>
<td colspan="6" align="center"><input type="submit" value="Register" /></td>
</tr>
</table>
</form></div></div>
';
}

Offline JshLnsctt

  • Full Member
  • ***
  • Posts: 463
  • Gender: Male
Re: Quick register form for SMF 1.0.x (probably works with 1.1.x too)
« Reply #12 on: June 06, 2006, 04:31:45 PM »
Try this code:
Code: [Select]
if( $context['user']['is_guest'] )
{
echo '<br /><div class="tborder"><div class="windowbg2"><form action="'. $scripturl. '?action=register2" method="post" style="margin: 3px 1px 1px 0; text-align:left;" name="creator" id="creator">
<table>
<tr>
<td colspan="6"><strong>Quick Register:</strong></td>
</tr>
<tr>
<td>Username:</td>
<td> <input type="text" name="user" size="10"  maxlength="25" /></td>
<td>Password:</td>
<td> <input type="password" name="passwrd1" size="10" /></td>
<td> Confirm Password: </td><td><input type="password" name="passwrd2" size="10" /></td>

</tr>
<tr>
<td>Email:</td>
<td colspan="2"><input name="email" type="text" /></td>
<td colspan="3"><input name="regagree" type="hidden" value="checked" /></td>
</tr>
<tr>
<td colspan="6" align="center"><input type="submit" value="Register" /></td>
</tr>
</table>
</form></div></div>
';
}

It is the same thing?

Offline Harro

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,122
  • Gender: Male
  • I'm watching you
Re: Quick register form for SMF 1.0.x (probably works with 1.1.x too)
« Reply #13 on: June 07, 2006, 06:48:41 PM »
Yes.
ALthough I noticed today that I get a javascript error.
Not sure how to fix it...
And don't have to time to look for it. Got exam tomorrow...

Offline tarkhorani

  • Jr. Member
  • **
  • Posts: 152
  • Gender: Female
    • A Forum for Discuss About Payment systems
Re: Quick register form for SMF 1.0.x (probably works with 1.1.x too)
« Reply #14 on: June 09, 2006, 06:01:43 PM »
can i use this with SMF 1.1 RC2
also how can I integrate it with CAPTIA mods that checks turning numbers on registration .
you can see it on my forum :

http://www.epaytalk.com/index.php?action=register
Get a Free SMForum on http://www.MyBoards.com (Ver 1.1.1)

 

Offline JshLnsctt

  • Full Member
  • ***
  • Posts: 463
  • Gender: Male
Re: Quick register form for SMF 1.0.x (probably works with 1.1.x too)
« Reply #15 on: June 09, 2006, 06:46:14 PM »
How can I make it only show for guests, I need a HTML code?

Offline sbclansite.com

  • Jr. Member
  • **
  • Posts: 151
  • Gender: Male
    • Seo Friendly Directory & Free Image Hosting
Re: Quick register form for SMF 1.0.x (probably works with 1.1.x too)
« Reply #16 on: June 09, 2006, 07:02:23 PM »
Its missing a really important part :
The Terms of Service or TOS aggreement and one cannot hide it from users. So there should be check box and link to TOS they can read and what they are agreeing for.
The Mod , Modifier :). For Mods/Scripts/GameServer Installations contact me via http://www.forums.sbclansite.com <<Free Image hosting, Free WebHosting and Free Featured Listing available also.
Webhosting @ 1.55$ : http://www.a1whs.com
Free Seo Friendly Directory : http://www.sbclansite.com

Offline JshLnsctt

  • Full Member
  • ***
  • Posts: 463
  • Gender: Male
Re: Quick register form for SMF 1.0.x (probably works with 1.1.x too)
« Reply #17 on: June 09, 2006, 07:07:43 PM »
Its missing a really important part :
The Terms of Service or TOS aggreement and one cannot hide it from users. So there should be check box and link to TOS they can read and what they are agreeing for.
 

This wouldn't have been added to tips & tricks if SMF disapproves of it.  You are aloued to edit the signup message on your site or remove it anyway.

Offline tarkhorani

  • Jr. Member
  • **
  • Posts: 152
  • Gender: Female
    • A Forum for Discuss About Payment systems
Re: Quick register form for SMF 1.0.x (probably works with 1.1.x too)
« Reply #18 on: June 09, 2006, 07:46:20 PM »
it needs agree with terms box.
also I want it integrate with captcha mods : http://www.simplemachines.org/community/index.php?topic=70807.0

here is my register page after i add captcha mod:

Code: [Select]
<?php
// Version: 1.1 RC2; Register

// Before registering - get their information.
function template_before()
{
global $context$settings$options$scripturl$txt$modSettings;

// Make sure they&#39;ve agreed to the terms and conditions.
echo &#39;
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
function verifyAgree()
{
if (document.forms.creator.passwrd1.value != document.forms.creator.passwrd2.value)
{
alert("&#39;, $txt[&#39;register_passwords_differ_js&#39;], &#39;");
return false;
}&#39;;

// If they haven&#39;t checked the "I agree" box, tell them and don&#39;t submit.
if ($context[&#39;require_agreement&#39;])
echo &#39;

if (!document.forms.creator.regagree.checked)
{
alert("&#39;, $txt[&#39;register_agree&#39;], &#39;");
return false;
}&#39;;

// Otherwise, let it through.
echo &#39;

return true;
}

function checkAgree()
{
document.forms.creator.regSubmit.disabled isEmptyText(document.forms.creator.user) || isEmptyText(document.forms.creator.email) || isEmptyText(document.forms.creator.passwrd1) || !document.forms.creator.regagree.checked;
}
// ]]></script>

<form action="&#39;, $scripturl, &#39;?action=register2" method="post" name="creator" id="creator" onsubmit="return verifyAgree();">
<table border="0" width="100%" cellpadding="3" cellspacing="0" class="tborder">
<tr class="titlebg">
<td>&#39;, $txt[97], &#39; - &#39;, $txt[517], &#39;</td>
</tr><tr class="windowbg">
<td width="100%">
<table cellpadding="3" cellspacing="0" border="0" width="100%">
<tr>
<td width="40%">
<b>&#39;, $txt[98], &#39;:</b>
<div class="smalltext">&#39;, $txt[520], &#39;</div>
</td>
<td>
<input type="text" name="user" size="20" tabindex="&#39;, $context[&#39;tabindex&#39;]++, &#39;" maxlength="25" />
</td>
</tr><tr>
<td width="40%">
<b>&#39;, $txt[69], &#39;:</b>
<div class="smalltext">&#39;, $txt[679], &#39;</div>
</td>
<td>
<input type="text" name="email" size="30" tabindex="&#39;, $context[&#39;tabindex&#39;]++, &#39;" />&#39;;

// Are they allowed to hide their email?
if ($context[&#39;allow_hide_email&#39;])
echo &#39;
<label for="hideEmail"><input type="checkbox" name="hideEmail" id="hideEmail" class="check" /> &#39;, $txt[721], &#39;</label>&#39;;

echo &#39;
</td>
</tr><tr>
<td width="40%">
<b>&#39;, $txt[81], &#39;:</b>
</td>
<td>
<input type="password" name="passwrd1" size="30" tabindex="&#39;, $context[&#39;tabindex&#39;]++, &#39;" />
</td>
</tr><tr>
<td width="40%">
<b>&#39;, $txt[82], &#39;:</b>
</td>
<td>
<input type="password" name="passwrd2" size="30" tabindex="&#39;, $context[&#39;tabindex&#39;]++, &#39;" />
</td>
</tr><tr>
<!-- Begin CAPTCHA Mod 0.1 -->
<td width="40%">
<b>&#39;, $txt[&#39;captchaEnter&#39;], &#39;:</b>
</td>
<td>
&#39;, $context[&#39;captcha_image&#39;], &#39;
<!--<input type="password" name="passwrd2" size="30" />-->
</td>
<!-- End CAPTCHA Mod -->
</tr>
&
#39;;

// Are there age restrictions in place?
if (!empty($modSettings[&#39;coppaAge&#39;]))
echo &#39;
<tr>
<td colspan="2" align="center" style="padding-top: 1ex;">
<label for="skip_coppa"><input type="checkbox" name="skip_coppa" id="skip_coppa" tabindex="&#39;, $context[&#39;tabindex&#39;]++, &#39;" class="check" /> <b>&#39;, $context[&#39;coppa_desc&#39;], &#39;.</b></label>
</td>
</tr>&#39;;

echo &#39;
</table>
</td>
</tr>
</table>&#39;;

// Require them to agree here?
if ($context[&#39;require_agreement&#39;])
echo &#39;
<table width="100%" align="center" border="0" cellspacing="0" cellpadding="5" class="tborder" style="border-top: 0;">
<tr>
<td class="windowbg2" style="padding-top: 8px; padding-bottom: 8px;">
&#39;, $context[&#39;agreement&#39;], &#39;
</td>
</tr><tr>
<td align="center" class="windowbg2">
<label for="regagree"><input type="checkbox" name="regagree" onclick="checkAgree();" id="regagree" class="check" /> <b>&#39;, $txt[585], &#39;</b></label>
</td>
</tr>
</table>&#39;;

echo &#39;
<br />
<div align="center">
<input type="submit" name="regSubmit" value="&#39;, $txt[97], &#39;" />
</div>
</
form>&#39;;

// Uncheck the agreement thing....
if ($context[&#39;require_agreement&#39;])
echo &#39;
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
document.forms.creator.regagree.checked false;
document.forms.creator.regSubmit.disabled = !document.forms.creator.regagree.checked;
// ]]></script>&#39;;
}

// After registration... all done ;).
function template_after()
{
global $context$settings$options$txt$scripturl;

// Not much to see here, just a quick... "you&#39;re now registered!" or what have you.
echo &#39;
<br />
<table border="0" width="80%" cellpadding="3" cellspacing="0" class="tborder" align="center">
<tr class="titlebg">
<td>&#39;, $context[&#39;page_title&#39;], &#39;</td>
</tr><tr class="windowbg">
<td align="left">&#39;, $context[&#39;description&#39;], &#39;<br /><br /></td>
</tr>
</table>
<br />&#39;;
}

// Template for giving instructions about COPPA activation.
function template_coppa()
{
global $context$settings$options$txt$scripturl;

// Formulate a nice complicated message!
echo &#39;
<br />
<table width="60%" cellpadding="4" cellspacing="0" border="0" class="tborder" align="center">
<tr class="titlebg">
<td>&#39;, $context[&#39;page_title&#39;], &#39;</td>
</tr><tr class="windowbg">
<td align="left">&#39;, $context[&#39;coppa&#39;][&#39;body&#39;], &#39;<br /></td>
</tr><tr class="windowbg">
<td align="center">
<a href="&#39;, $scripturl, &#39;?action=coppa;form;member=&#39;, $context[&#39;coppa&#39;][&#39;id&#39;], &#39;" target="_blank">&#39;, $txt[&#39;coppa_form_link_popup&#39;], &#39;</a>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;<a href="&#39;, $scripturl, &#39;?action=coppa;form;dl;member=&#39;, $context[&#39;coppa&#39;][&#39;id&#39;], &#39;">&#39;, $txt[&#39;coppa_form_link_download&#39;], &#39;</a><br /><br />
</td>
</tr><tr class="windowbg">
<td align="left">&#39;, $context[&#39;coppa&#39;][&#39;many_options&#39;] ? $txt[&#39;coppa_send_to_two_options&#39;] : $txt[&#39;coppa_send_to_one_option&#39;], &#39;</td>
</tr>&#39;;

// Can they send by post?
if (!empty($context[&#39;coppa&#39;][&#39;post&#39;]))
{
echo &#39;
<tr class="windowbg">
<td align="left"><b>1) &#39;, $txt[&#39;coppa_send_by_post&#39;], &#39;</b></td>
</tr><tr class="windowbg">
<td align="left" style="padding-bottom: 1ex;">
<div style="padding: 4px; width: 32ex; background-color: white; color: black; margin-left: 5ex; border: 1px solid black;">
&#39;, $context[&#39;coppa&#39;][&#39;post&#39;], &#39;
</div>
</td>
</tr>&#39;;
}

// Can they send by fax??
if (!empty($context[&#39;coppa&#39;][&#39;fax&#39;]))
{
echo &#39;
<tr class="windowbg">
<td align="left"><b>&#39;, !empty($context[&#39;coppa&#39;][&#39;post&#39;]) ? &#39;2&#39; : &#39;1&#39;, &#39;) &#39;, $txt[&#39;coppa_send_by_fax&#39;], &#39;</b></td>
</tr><tr class="windowbg">
<td align="left" style="padding-bottom: 1ex;">
<div style="padding: 4px; width: 32ex; background-color: white; color: black; margin-left: 5ex; border: 1px solid black;">
&#39;, $context[&#39;coppa&#39;][&#39;fax&#39;], &#39;
</div>
</td>
</tr>&#39;;
}

// Offer an alternative Phone Number?
if ($context[&#39;coppa&#39;][&#39;phone&#39;])
{
echo &#39;
<tr class="windowbg" style="padding-bottom: 1ex;">
<td align="left">&#39;, $context[&#39;coppa&#39;][&#39;phone&#39;], &#39;</td>
</tr>&#39;;
}
echo &#39;
</table>
<br />&#39;;
}

// An easily printable form for giving permission to access the forum for a minor.
function template_coppa_form()
{
global $context$settings$options$txt$scripturl;

// Show the form (As best we can)
echo &#39;
<table border="0" width="100%" cellpadding="3" cellspacing="0" class="tborder" align="center">
<tr>
<td align="left">&#39;, $context[&#39;forum_contacts&#39;], &#39;</td>
</tr><tr>
<td align="right">
<i>&#39;, $txt[&#39;coppa_form_address&#39;], &#39;</i>: &#39;, $context[&#39;ul&#39;], &#39;<br />
&#39;, $context[&#39;ul&#39;], &#39;<br />
&#39;, $context[&#39;ul&#39;], &#39;<br />
&#39;, $context[&#39;ul&#39;], &#39;
</td>
</tr><tr>
<td align="right">
<i>&#39;, $txt[&#39;coppa_form_date&#39;], &#39;</i>: &#39;, $context[&#39;ul&#39;], &#39;
<br /><br />
</td>
</tr><tr>
<td align="left">
&#39;, $context[&#39;coppa_body&#39;], &#39;
</td>
</tr>
</table>
<br />&#39;;
}

function 
template_admin_register()
{
global $context$settings$options$scripturl$txt$modSettings;

echo &#39;
<form action="&#39;, $scripturl, &#39;?action=regcenter" method="post" name="postForm" id="postForm">
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
function onCheckChange()
{
if (document.forms.postForm.emailActivate.checked)
{
document.forms.postForm.emailPassword.disabled true;
document.forms.postForm.emailPassword.checked true;
}
else
document.forms.postForm.emailPassword.disabled false;
}
// ]]></script>
<table border="0" cellspacing="0" cellpadding="4" align="center" width="70%" class="tborder">
<tr class="titlebg">
<td colspan="2" align="center">&#39;, $txt[&#39;admin_browse_register_new&#39;], &#39;</td>
</tr>&#39;;
if (!empty($context[&#39;registration_done&#39;]))
echo &#39;
<tr class="windowbg2">
<td colspan="2" align="center"><br />
&#39;, $context[&#39;registration_done&#39;], &#39;
</td>
</tr><tr class="windowbg2">
<td colspan="2" align="center"><hr /></td>
</tr>&#39;;
echo &#39;
<tr class="windowbg2">
<th width="50%" align="right">
<label for="user_input">&#39;, $txt[&#39;admin_register_username&#39;], &#39;:</label>
<div class="smalltext" style="font-weight: normal;">&#39;, $txt[&#39;admin_register_username_desc&#39;], &#39;</div>
</th>
<td width="50%" align="left">
<input type="text" name="user" id="user_input" size="30" maxlength="25" />
</td>
</tr><tr class="windowbg2">
<th width="50%" align="right">
<label for="email_input">&#39;, $txt[&#39;admin_register_email&#39;], &#39;:</label>
<div class="smalltext" style="font-weight: normal;">&#39;, $txt[&#39;admin_register_email_desc&#39;], &#39;</div>
</th>
<td width="50%" align="left">
<input type="text" name="email" id="email_input" size="30" />
</td>
</tr><tr class="windowbg2">
<th width="50%" align="right">
<label for="password_input">&#39;, $txt[&#39;admin_register_password&#39;], &#39;:</label>
<div class="smalltext" style="font-weight: normal;">&#39;, $txt[&#39;admin_register_password_desc&#39;], &#39;</div>
</th>
<td width="50%" align="left">
<input type="password" name="password" id="password_input" size="30" /><br />
</td>
</tr><tr class="windowbg2">
<th width="50%" align="right">
<label for="group_select">&#39;, $txt[&#39;admin_register_group&#39;], &#39;:</label>
<div class="smalltext" style="font-weight: normal;">&#39;, $txt[&#39;admin_register_group_desc&#39;], &#39;</div>
</th>
<td width="50%" align="left">
<select name="group" id="group_select">&#39;;

foreach ($context[&#39;member_groups&#39;] as $id => $name)
echo &#39;
<option value="&#39;, $id, &#39;">&#39;, $name, &#39;</option>&#39;;
echo &#39;
</select><br />
</td>
</tr><tr class="windowbg2">
<th width="50%" align="right">
<label for="emailPassword_check">&#39;, $txt[&#39;admin_register_email_detail&#39;], &#39;:</label>
<div class="smalltext" style="font-weight: normal;">&#39;, $txt[&#39;admin_register_email_detail_desc&#39;], &#39;</div>
</th>
<td width="50%" align="left">
<input type="checkbox" name="emailPassword" id="emailPassword_check" checked="checked"&#39;, !empty($modSettings[&#39;registration_method&#39;]) && $modSettings[&#39;registration_method&#39;] == 1 ? &#39; disabled="disabled"&#39; : &#39;&#39;, &#39; class="check" /><br />
</td>
</tr><tr class="windowbg2">
<th width="50%" align="right">
<label for="emailActivate_check">&#39;, $txt[&#39;admin_register_email_activate&#39;], &#39;:</label>
</th>
<td width="50%" align="left">
<input type="checkbox" name="emailActivate" id="emailActivate_check"&#39;, !empty($modSettings[&#39;registration_method&#39;]) && $modSettings[&#39;registration_method&#39;] == 1 ? &#39; checked="checked"&#39; : &#39;&#39;, &#39; onclick="onCheckChange();" class="check" /><br />
</td>
</tr><tr class="windowbg2">
<td width="100%" colspan="2" align="right">
<input type="submit" name="regSubmit" value="&#39;, $txt[97], &#39;" />
<input type="hidden" name="sa" value="register" />
</td>
</tr>
</table>
<input type="hidden" name="sc" value="&#39;, $context[&#39;session_id&#39;], &#39;" />
</form>&#39;;
}

// Form for editing the agreement shown for people registering to the forum.
function template_edit_agreement()
{
global $context$settings$options$scripturl$txt;

// Just a big box to edit the text file ;).
echo &#39;
<form action="&#39;, $scripturl, &#39;?action=regcenter" method="post">
<table border="0" cellspacing="0" cellpadding="4" align="center" width="80%" class="tborder">
<tr class="titlebg">
<td align="center">&#39;, $txt[&#39;smf11&#39;], &#39;</td>
</tr>&#39;;

// Warning for if the file isn&#39;t writable.
if (!empty($context[&#39;warning&#39;]))
echo &#39;
<tr class="windowbg2">
<td style="color: red; font-weight: bold;" align="center">
&#39;, $context[&#39;warning&#39;], &#39;
</td>
</tr>&#39;;
echo &#39;
<tr class="windowbg2">
<td align="center" style="padding-bottom: 1ex; padding-top: 2ex;">&#39;;

// Show the actual agreement in an oversized text box.
echo &#39;
<textarea cols="70" rows="20" name="agreement" style="width: 94%; margin-bottom: 1ex;">&#39;, $context[&#39;agreement&#39;], &#39;</textarea><br />
<label for="requireAgreement"><input type="checkbox" name="requireAgreement" id="requireAgreement"&#39;, $context[&#39;require_agreement&#39;] ? &#39; checked="checked"&#39; : &#39;&#39;, &#39; value="1" /> &#39;, $txt[584], &#39;.</label><br />
<br />
<input type="submit" value="&#39;, $txt[10], &#39;" />
<input type="hidden" name="sa" value="agreement" />
</td>
</tr>
</table>
<input type="hidden" name="sc" value="&#39;, $context[&#39;session_id&#39;], &#39;" />
</form>&#39;;
}

function 
template_edit_reserved_words()
{
global $context$settings$options$scripturl$txt;

echo &#39;
<form action="&#39;, $scripturl, &#39;?action=regcenter" method="post">
<table border="0" cellspacing="1" class="bordercolor" align="center" cellpadding="4" width="80%">
<tr class="titlebg">
<td align="center">
&#39;, $txt[341], &#39;
</td>
</tr><tr>
<td class="windowbg2" align="center">
<div style="width: 80%;">
<div style="margin-bottom: 2ex;">&#39;, $txt[342], &#39;</div>
<textarea cols="30" rows="6" name="reserved" style="width: 98%;">&#39;, implode("\n", $context[&#39;reserved_words&#39;]), &#39;</textarea><br />

<div align="left" style="margin-top: 2ex;">
<label for="matchword"><input type="checkbox" name="matchword" id="matchword" &#39;, $context[&#39;reserved_word_options&#39;][&#39;match_word&#39;] ? &#39;checked="checked"&#39; : &#39;&#39;, &#39; class="check" /> &#39;, $txt[726], &#39;</label><br />
<label for="matchcase"><input type="checkbox" name="matchcase" id="matchcase" &#39;, $context[&#39;reserved_word_options&#39;][&#39;match_case&#39;] ? &#39;checked="checked"&#39; : &#39;&#39;, &#39; class="check" /> &#39;, $txt[727], &#39;</label><br />
<label for="matchuser"><input type="checkbox" name="matchuser" id="matchuser" &#39;, $context[&#39;reserved_word_options&#39;][&#39;match_user&#39;] ? &#39;checked="checked"&#39; : &#39;&#39;, &#39; class="check" /> &#39;, $txt[728], &#39;</label><br />
<label for="matchname"><input type="checkbox" name="matchname" id="matchname" &#39;, $context[&#39;reserved_word_options&#39;][&#39;match_name&#39;] ? &#39;checked="checked"&#39; : &#39;&#39;, &#39; class="check" /> &#39;, $txt[729], &#39;</label><br />
</div>

<input type="submit" value="&#39;, $txt[10], &#39;" name="save_reserved_names" style="margin: 1ex;" />
</div>
</td>
</tr>
</table>
<input type="hidden" name="sa" value="reservednames" />
<input type="hidden" name="sc" value="&#39;, $context[&#39;session_id&#39;], &#39;" />
</form>&#39;;
}

function 
template_admin_settings()
{
global $context$settings$options$scripturl$txt$modSettings;

echo &#39;
<form action="&#39;, $scripturl, &#39;?action=regcenter" method="post">
<table border="0" cellspacing="1" cellpadding="4" align="center" width="100%" class="tborder">
<tr class="titlebg">
<td align="center">&#39;, $txt[&#39;settings&#39;], &#39;</td>
</tr>
<tr class="windowbg2">
<td align="center">&#39;;

// Functions to do some nice box disabling dependant on age restrictions.
echo &#39;
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
function checkCoppa()
{
var coppaDisabled document.getElementById(\&#39;coppaAge_input\&#39;).value == 0;
document.getElementById(\&#39;coppaType_select\&#39;).disabled = coppaDisabled;

var disableContacts coppaDisabled || document.getElementById(\&#39;coppaType_select\&#39;).options[document.getElementById(\&#39;coppaType_select\&#39;).selectedIndex].value != 1;
document.getElementById(\&#39;coppaPost_input\&#39;).disabled = disableContacts;
document.getElementById(\&#39;coppaFax_input\&#39;).disabled = disableContacts;
document.getElementById(\&#39;coppaPhone_input\&#39;).disabled = disableContacts;
}
// ]]></script>&#39;;
echo &#39;
<table border="0" cellspacing="0" cellpadding="4" align="center" width="100%">
<tr class="windowbg2">
<th width="50%" align="right">
<label for="registration_method_select">&#39;, $txt[&#39;admin_setting_registration_method&#39;], &#39;</label> <span style="font-weight: normal;">(<a href="&#39;, $scripturl, &#39;?action=helpadmin;help=registration_method" onclick="return reqWin(this.href);">?</a>)</span>:
</th>
<td width="50%" align="left">
<select name="registration_method" id="registration_method_select">
<option value="0"&#39;, empty($modSettings[&#39;registration_method&#39;]) ? &#39; selected="selected"&#39; : &#39;&#39;, &#39;>&#39;, $txt[&#39;admin_setting_registration_standard&#39;], &#39;</option>
<option value="1"&#39;, !empty($modSettings[&#39;registration_method&#39;]) && $modSettings[&#39;registration_method&#39;] == 1 ? &#39; selected="selected"&#39; : &#39;&#39;, &#39;>&#39;, $txt[&#39;admin_setting_registration_activate&#39;], &#39;</option>
<option value="2"&#39;, !empty($modSettings[&#39;registration_method&#39;]) && $modSettings[&#39;registration_method&#39;] == 2 ? &#39; selected="selected"&#39; : &#39;&#39;, &#39;>&#39;, $txt[&#39;admin_setting_registration_approval&#39;], &#39;</option>
<option value="3"&#39;, !empty($modSettings[&#39;registration_method&#39;]) && $modSettings[&#39;registration_method&#39;] == 3 ? &#39; selected="selected"&#39; : &#39;&#39;, &#39;>&#39;, $txt[&#39;admin_setting_registration_disabled&#39;], &#39;</option>
</select>
</td>
</tr>
<tr class="windowbg2">
<th width="50%" align="right">
<label for="notify_new_registration_check">&#39;, $txt[&#39;admin_setting_notify_new_registration&#39;], &#39;</label>:
</th>
<td width="50%" align="left">
<input type="checkbox" name="notify_new_registration" id="notify_new_registration_check" &#39;, !empty($modSettings[&#39;notify_new_registration&#39;]) ? &#39;checked="checked"&#39; : &#39;&#39;, &#39; class="check" />
</td>
</tr><tr class="windowbg2">
<th width="50%" align="right">
<label for="send_welcomeEmail_check">&#39;, $txt[&#39;admin_setting_send_welcomeEmail&#39;], &#39;</label> <span style="font-weight: normal;">(<a href="&#39;, $scripturl, &#39;?action=helpadmin;help=send_welcomeEmail" onclick="return reqWin(this.href);">?</a>)</span>:
</th>
<td width="50%" align="left">
<input type="checkbox" name="send_welcomeEmail" id="send_welcomeEmail_check"&#39;, !empty($modSettings[&#39;send_welcomeEmail&#39;]) ? &#39; checked="checked"&#39; : &#39;&#39;, &#39; class="check" />
</td>
</tr><tr class="windowbg2">
<th width="50%" align="right">
<label for="password_strength_select">&#39;, $txt[&#39;admin_setting_password_strength&#39;], &#39;</label> <span style="font-weight: normal;">(<a href="&#39;, $scripturl, &#39;?action=helpadmin;help=password_strength" onclick="return reqWin(this.href);">?</a>)</span>:
</th>
<td width="50%" align="left">
<select name="password_strength" id="password_strength_select">
<option value="0"&#39;, empty($modSettings[&#39;password_strength&#39;]) ? &#39; selected="selected"&#39; : &#39;&#39;, &#39;>&#39;, $txt[&#39;admin_setting_password_strength_low&#39;], &#39;</option>
<option value="1"&#39;, !empty($modSettings[&#39;password_strength&#39;]) && $modSettings[&#39;password_strength&#39;] == 1 ? &#39; selected="selected"&#39; : &#39;&#39;, &#39;>&#39;, $txt[&#39;admin_setting_password_strength_medium&#39;], &#39;</option>
<option value="2"&#39;, !empty($modSettings[&#39;password_strength&#39;]) && $modSettings[&#39;password_strength&#39;] == 2 ? &#39; selected="selected"&#39; : &#39;&#39;, &#39;>&#39;, $txt[&#39;admin_setting_password_strength_high&#39;], &#39;</option>
</select>
</td>
</tr><tr class="windowbg2">
<td width="100%" colspan="2" align="center">
<hr />
</td>
</tr><tr class="windowbg2" valign="top">
<th width="50%" align="right">
<label for="coppaAge_input">&#39;, $txt[&#39;admin_setting_coppaAge&#39;], &#39;</label> <span style="font-weight: normal;">(<a href="&#39;, $scripturl, &#39;?action=helpadmin;help=coppaAge" onclick="return reqWin(this.href);">?</a>)</span>:
<div class="smalltext" style="font-weight: normal;">&#39;, $txt[&#39;admin_setting_coppaAge_desc&#39;], &#39;</div>
</th>
<td width="50%" align="left">
<input type="text" name="coppaAge" id="coppaAge_input" value="&#39;, !empty($modSettings[&#39;coppaAge&#39;]) ? $modSettings[&#39;coppaAge&#39;] : &#39;&#39;, &#39;" size="3" maxlength="3" onkeyup="checkCoppa();" />
</td>
</tr><tr class="windowbg2" valign="top">
<th width="50%" align="right">
<label for="coppaType_select">&#39;, $txt[&#39;admin_setting_coppaType&#39;], &#39;</label> <span style="font-weight: normal;">(<a href="&#39;, $scripturl, &#39;?action=helpadmin;help=coppaType" onclick="return reqWin(this.href);">?</a>)</span>:
</th>
<td width="50%" align="left">
<select name="coppaType" id="coppaType_select" onchange="checkCoppa();">
<option value="0"&#39;, empty($modSettings[&#39;coppaType&#39;]) ? &#39; selected="selected"&#39; : &#39;&#39;, &#39;>&#39;, $txt[&#39;admin_setting_coppaType_reject&#39;], &#39;</option>
<option value="1"&#39;, !empty($modSettings[&#39;coppaType&#39;]) && $modSettings[&#39;coppaType&#39;] == 1 ? &#39; selected="selected"&#39; : &#39;&#39;, &#39;>&#39;, $txt[&#39;admin_setting_coppaType_approval&#39;], &#39;</option>
</select>
</td>
</tr><tr class="windowbg2" valign="top">
<th width="50%" align="right">
<label for="coppaPost_input">&#39;, $txt[&#39;admin_setting_coppaPost&#39;], &#39;</label> <span style="font-weight: normal;">(<a href="&#39;, $scripturl, &#39;?action=helpadmin;help=coppaPost" onclick="return reqWin(this.href);">?</a>)</span>:
<div class="smalltext" style="font-weight: normal;">&#39;, $txt[&#39;admin_setting_coppaPost_desc&#39;], &#39;</div>
</th>
<td width="50%" align="left">
<textarea name="coppaPost" id="coppaPost_input" rows="4" cols="35">&#39;, $context[&#39;coppaPost&#39;], &#39;</textarea>
</td>
</tr><tr class="windowbg2" valign="top">
<th width="50%" align="right">
<label for="coppaFax_input">&#39;, $txt[&#39;admin_setting_coppaFax&#39;], &#39;</label> <span style="font-weight: normal;">(<a href="&#39;, $scripturl, &#39;?action=helpadmin;help=coppaPost" onclick="return reqWin(this.href);">?</a>)</span>:
<div class="smalltext" style="font-weight: normal;">&#39;, $txt[&#39;admin_setting_coppaPost_desc&#39;], &#39;</div>
</th>
<td width="50%" align="left">
<input type="text" name="coppaFax" id="coppaFax_input" value="&#39;, !empty($modSettings[&#39;coppaFax&#39;]) ? $modSettings[&#39;coppaFax&#39;] : &#39;&#39;, &#39;" size="22" maxlength="35" />
</td>
</tr><tr class="windowbg2" valign="top">
<th width="50%" align="right">
<label for="coppaPhone_input">&#39;, $txt[&#39;admin_setting_coppaPhone&#39;], &#39;</label> <span style="font-weight: normal;">(<a href="&#39;, $scripturl, &#39;?action=helpadmin;help=coppaPost" onclick="return reqWin(this.href);">?</a>)</span>:
<div class="smalltext" style="font-weight: normal;">&#39;, $txt[&#39;admin_setting_coppaPost_desc&#39;], &#39;</div>
</th>
<td width="50%" align="left">
<input type="text" name="coppaPhone" id="coppaPhone_input" value="&#39;, !empty($modSettings[&#39;coppaPhone&#39;]) ? $modSettings[&#39;coppaPhone&#39;] : &#39;&#39;, &#39;" size="22" maxlength="35" />
</td>
</tr><tr class="windowbg2">
<td width="100%" colspan="3" align="right">
<input type="submit" name="save" value="&#39;, $txt[10], &#39;" />
<input type="hidden" name="sa" value="settings" />
</td>
</tr>
</table>&#39;;

// Handle disabling of some of the input boxes.
echo &#39;
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[&#39;;

if (empty($modSettings[&#39;coppaAge&#39;]) || empty($modSettings[&#39;coppaType&#39;]))
echo &#39;
document.getElementById(\&#39;coppaPost_input\&#39;).disabled = true;
document.getElementById(\&#39;coppaFax_input\&#39;).disabled = true;
document.getElementById(\&#39;coppaPhone_input\&#39;).disabled = true;&#39;;
if (empty($modSettings[&#39;coppaAge&#39;]))
echo &#39;
document.getElementById(\&#39;coppaType_select\&#39;).disabled = true;&#39;;

echo &#39;
// ]]></script>
</td>
</tr>
</table>
<input type="hidden" name="sc" value="&#39;, $context[&#39;session_id&#39;], &#39;" />
</form>&#39;;
}

?>



also I added the changes on a test forum : www.4oosh.com/sm3
Get a Free SMForum on http://www.MyBoards.com (Ver 1.1.1)

 

Offline JshLnsctt

  • Full Member
  • ***
  • Posts: 463
  • Gender: Male
Re: Quick register form for SMF 1.0.x (probably works with 1.1.x too)
« Reply #19 on: June 10, 2006, 08:32:03 AM »
How did you get that right under please login or register?