SMFHacks.com

Modifications/Themes => Modifications Talk => Topic started by: ghosttr on March 06, 2008, 10:42:08 pm

Title: Registration Mod
Post by: ghosttr on March 06, 2008, 10:42:08 pm
I have been working on a mod that will allow users to register outside of the board itself.

Code: [Select]
<?php

if (substr($_SERVER['HTTP_USER_AGENT'], 015) == "EVE-minibrowser")
{
        if ($_SERVER['HTTP_EVE_TRUSTED'] == 'no')
{
//update your site url here
header('eve.trustMe:http://forums.ark-corp.com/::Please trust me, I\'m nice');
print 
'<html><body>';
print 
'<h1>Trust Required</h1>';
print 
'I need to be trusted to work properly';

}

$vars1 $_SERVER['HTTP_EVE_CHARNAME'];
$vars2 $_SERVER['HTTP_EVE_CORPNAME'];
echo 
'
<form action="'
$scripturl'?action=Register2" method="post" name="creator" id="creator">

Username <input type="text" name="user" size="30" maxlength="25" value=' 
$vars2 $vars1 ' />
Email    <input type="text" name="email" size="30" /><br />
Password <input type="password" name="passwrd1" size="30" />
Confirm Password <input type="password" name="passwrd2" size="30" /><br />

<input type="checkbox" name="regagree" class="check" />I agree to Registration Agreement

<div align="center">
<input type="submit" name="regSubmit" value="Register" /></div>

</form>'
;
}
else
{
include(
'index2.php');
}


?>

I have renamed the regular index.php to index2, and made it so that if someone visits the page with the specified browser it asks them to register. The registration form comes up fine and that data this is supposed to be automatically entered into it enters fine. But it just refuses to register >:(



The only code that i left out was this
Code: [Select]
if ($context['user']['is_guest'])
{
loadLanguage('Login');
maybe i have to fix this somehow?