Name: Index Quick Registration v1.0

Description: This modification will add a quick registration form with captcha support on the index page.

Author: John Briggs

Copyright: Copyright 2009, John Briggs

Compatability: XMB 1.9.11

License: This modification is released under the GNU GPL v3 license. A copy is provided with this sofware package.

====================================================================================================================================
=======
Step 1:
=======
================
Edit File: index.php
================
==========
Find Code:
==========

loadtemplates(

================
Replace Code With:
================

loadtemplates(
'index_quick_reg_password',
'index_quick_reg_captcha',
'index_quick_reg',

==========
Find Code:
==========

if ($gid == 0) {

===============
Add Code Above:
===============

// Index Quick Registration Mod Begin
$index_quickreg = $captcharegcheck = $pwtd = '';
// Index Quick Registration Mod End

==========
Find Code:
==========

    } else {
        eval('$welcome = "'.template('index_welcome_guest').'";');
    }
    
==================
Replace Code With:
==================

    } else {
        // Index Quick Registration Mod Begin
        $index_quickreg = $captcharegcheck = $pwtd = '';
        if ($SETTINGS['regstatus'] == 'on') {
            $pwtd = '';
            if ($SETTINGS['emailcheck'] != 'on') {
                eval('$pwtd = "'.template('index_quick_reg_password').'";');
            }

            $captcharegcheck = '';
            if ($SETTINGS['captcha_status'] == 'on' && $SETTINGS['captcha_reg_status'] == 'on' && !DEBUG) {
                require ROOT.'include/captcha.inc.php';
                $Captcha = new Captcha(250, 50);
                if ($Captcha->bCompatible !== false) {
                    $imghash = $Captcha->GenerateCode();
                    eval('$captcharegcheck = "'.template('index_quick_reg_captcha').'";');
                }
            }
            eval('$index_quickreg = "'.template('index_quick_reg').'";');
        }
        // Index Quick Registration Mod End
        eval('$welcome = "'.template('index_welcome_guest').'";');
    }

==========
Find Code:
==========

    $ticker = $welcome = $whosonline = $statsbar = $whosonlinetoday = '';
    
===============
Add Code Below:
===============

    // Index Quick Registration Mod Begin
    $index_quickreg = $captcharegcheck = $pwtd = '';
    // Index Quick Registration Mod End

==================================================================================================================================
=======
Step 2:
=======
==========================
Go To Admin Panel -> Templates
==========================
=================================
Create Template: index_quick_reg_password
=================================
=====================
Add Code & Click Submit
=====================

$lang[textpassword]&nbsp;<input type="password" name="password" size="20" />&nbsp;$lang[textretypepw]&nbsp;<input type="password" name="password2" size="20" />

==================================================================================================================================
=======
Step 3:
=======
==========================
Go To Admin Panel -> Templates
==========================
================================
Create Template: index_quick_reg_captcha
================================
=====================
Add Code & Click Submit
=====================

<tr>
<td class="category"><font color="$THEME[cattext]"><strong>$lang[captchaverification] - $lang[required]</strong></font></td>
</tr>
<tr class="tablerow">
<td bgcolor="$THEME[altbg1]">$lang[verificationnote]</td>
</tr>
<tr class="ctrtablerow">
<td bgcolor="$THEME[altbg2]"><img src="misc.php?action=captchaimage&amp;imagehash=$imghash" alt="$lang[captchaverification]" title="$lang[captchaverification]" /><br /><br /><input type="text" name="imgcode" value="" /><input type="hidden" name="imghash" value="$imghash" /></td>
</tr>

==================================================================================================================================
=======
Step 4:
=======
==========================
Go To Admin Panel -> Templates
==========================
==========================
Create Template: index_quick_reg
==========================
=====================
Add Code & Click Submit
=====================

<form method="POST" action="member.php?action=reg">
<table cellspacing="0" cellpadding="0" border="0" width="$THEME[tablewidth]" align="center">
<tr>
<td bgcolor="$THEME[bordercolor]">
<table border="0" cellspacing="$THEME[borderwidth]" cellpadding="$THEME[tablespace]" width="100%">
<tr>
<td class="category"><font color="$THEME[cattext]"><strong>Quick Registration</strong></font></td>
</tr>
<tr>
<td class="ctrtablerow" bgcolor="$THEME[altbg2]">
$lang[textusername]&nbsp;<input type="text" name="username" size="32" />&nbsp;$pwtd&nbsp;$lang[textemail]&nbsp;<input type="text" name="email" size="32" value="" />
</td>
</tr>
$captcharegcheck
<tr>
<td class="ctrtablerow" bgcolor="$THEME[altbg2]">
<input class="submit" type="submit" name="regsubmit" value="$lang[textregister]" />
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
<br />

==================================================================================================================================
=======
Step 5:
=======
==============================================
Go To Admin Panel -> Translations & Download Language File
==============================================
===============
Edit Language File:
===============

==================================
Add Code At Very Bottom Of File Above ?>
==================================

// Index Quick Registration Mod Begin
$lang['textquickreg'] = "Quick Registration";
// Index Quick Registration Mod End

============================================
Go To Admin Panel -> Translations & Upload Language File
============================================
==================================================================================================================================
Enjoy!