FIRST OFF BACKUP ALL YOU'RE FILES BEFORE ATTEMPTING THIS
Now add invites & users sql into database
And now the users sql
For all those with modded account-signup.php follow below instructions
for all those with stock account-signup.php just add all the files in the zip
[color=rgb(184, 49, 47)]FOR THOSE WHO HAVE MODDED ACCOUNT-SIGNUP DO NOT ADD THE ONE IN THE ZIP[/color]
Now open up account-signup.php find and remove/comment out
Now find in account-signup.php
Replace with
Now Find
Replace with
Still in account-signup.php
find
Replace with
Now find
Replace with
Find
Replace with
<br>
<?php
if ($site_config["INVITEONLY"]):?>
<?php echo ("<center> Site Is Invite Only You Will Need An Invite Code To Register.</center></font>");?>
<?php endif; ?>
Now find
Underneath add
Save and close account-signup.php
upload all files in attached zip to the root of your website just the php files not the invite folder ive added the hack were on signup invited user gets 2 gig upload and the person who invited gets 2 gig upload if you do not wish to have this hack please open up takeconfirm.php and remove thease lines
Add to languages/english.php
In account.php find[/b]
underneath add
for this to work
in backend/config set
$site_config['INVITEONLY'] = true;
$site_config['CONFIRMEMAIL'] = false;
Now add invites & users sql into database
CREATE TABLE `invites` (
`id` int(10) unsigned NOT NULL auto_increment,
`inviter` int(10) unsigned NOT NULL default '0',
`inviteid` int(10) NOT NULL default '0',
`invite` varchar(32) NOT NULL default '',
`time_invited` datetime NOT NULL default '0000-00-00 00:00:00',
`confirmed` char(3) NOT NULL default 'no',
PRIMARY KEY (`id`),
KEY `inviter` (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;And now the users sql
ALTER TABLE `users` ADD `invited_by` int(10) NOT NULL default '0';
ALTER TABLE `users` ADD `invites` smallint(4) NOT NULL default '0';For all those with modded account-signup.php follow below instructions
for all those with stock account-signup.php just add all the files in the zip
[color=rgb(184, 49, 47)]FOR THOSE WHO HAVE MODDED ACCOUNT-SIGNUP DO NOT ADD THE ONE IN THE ZIP[/color]
Now open up account-signup.php find and remove/comment out
//invite only check
if ($site_config["INVITEONLY"]){
show_error_msg("Invite only", "<br><br><center>Sorry this site has disabled user registration, the only way to register is via a invite from a existing member.<br><br></center>",1);
}Now find in account-signup.php
// Disable checks if we're signing up with an invite
if (!is_valid_id($_REQUEST["invite"]) || strlen($_REQUEST["secret"]) != 32) {
//invite only check
if ($site_config["INVITEONLY"]) {
show_error_msg(T_("INVITE_ONLY"), "<br /><br /><center>".T_("INVITE_ONLY_MSG")."<br /><br /></center>",1);
}
Replace with
// Disable checks if we're signing up with an invite
if ($site_config["INVITEONLY"]){
$invite = $_POST["invite"];
$r = SQL_Query_exec("SELECT inviter, inviteid, confirmed FROM invites WHERE invite=".sqlesc($invite));
$i = mysqli_fetch_assoc($r);
if (mysqli_num_rows($r) == 0)
show_error_msg("Error", "Invite ".htmlspecialchars($invite)." not found.\nPlease retry signup or request a new one.", 1);
if ($i["inviteid"] != 0)
show_error_msg("Error", "Invite ".htmlspecialchars($invite)." already taken.\nPlease request a new one with your inviter.", 1);
}
$message == "";
Now Find
if ($site_config["CONFIRMEMAIL"]){//req confirm email true/false
$status = "pending";
}else{
$status = "confirmed";
}Replace with
if ($site_config["CONFIRMEMAIL"]){//req confirm email true/false
$status = "pending";
}else{
if ($site_config["INVITEONLY"]){
$status = "pending";
}else{
$status = "confirmed";
}
}Still in account-signup.php
find
SQL_Query_exec("INSERT INTO users (username, password, secret, email, status, added, last_access, age, country, gender, client, stylesheet, language, class, ip) VALUES (" .
implode(",", array_map("sqlesc", array($wantusername, $wantpassword, $secret, $email, $status, get_date_time(), get_date_time(), $age, $country, $gender, $client, $site_config["default_theme"], $site_config["default_language"], $signupclass, getip()))).")");
Replace with
if ($site_config["INVITEONLY"]){
$ret = SQL_Query_exec("INSERT INTO users (username, password, secret, email, status, added, age, country, gender, client, stylesheet, language, class, ip, invited_by, invitedate) VALUES (" .
implode(",", array_map("sqlesc", array($wantusername, $wantpassword, $secret, $email, $status, get_date_time(), $age, $country, $gender, $client, $site_config["default_theme"], $site_config["default_language"], $signupclass, getip(), $i["inviter"], get_date_time()))).")");
} else {
$ret = SQL_Query_exec("INSERT INTO users (username, password, secret, email, status, added, age, country, gender, client, stylesheet, language, class, ip) VALUES (" .
implode(",", array_map("sqlesc", array($wantusername, $wantpassword, $secret, $email, $status, get_date_time(), $age, $country, $gender, $client, $site_config["default_theme"], $site_config["default_language"], $signupclass, getip()))).")");
}
$id = mysqli_insert_id($GLOBALS["DBconnector"]);
if ($site_config["INVITEONLY"]){
SQL_Query_exec(" UPDATE invites SET inviteid = $id, confirmed='no' WHERE invite = " . sqlesc($invite));
}
Now find
if ($site_config["CONFIRMEMAIL"]){ //email confirmation is on
ini_set("sendmail_from", "");
mail($email, "Your ".$site_config['SITENAME']." User Account", $body, "From: ".$site_config['SITENAME']." <".$site_config['SITEEMAIL'].">");
header("Refresh: 0; url=account-confirm-ok.php?type=signup&email=" . urlencode($email));
}else{
header("Refresh: 0; url=account-confirm-ok.php?type=noconf");
}Replace with
if ($site_config["CONFIRMEMAIL"]){ //email confirmation is on
ini_set("sendmail_from", "");
mail($email, "Your ".$site_config['SITENAME']." User Account", $body, "From: ".$site_config['SITENAME']." <".$site_config['SITEEMAIL'].">");
header("Refresh: 0; url=account-confirm-ok.php?type=signup&email=" . urlencode($email));
}else{
if ($site_config["INVITEONLY"]){ //invite only is on
SQL_Query_exec("DELETE FROM invites WHERE invite = ".sqlesc($invite));
header("Refresh: 0; url=account-confirm-ok.php?type=invite");
}else{
header("Refresh: 0; url=account-confirm-ok.php?type=noconf");
}
}Find
<?php echo T_("COOKIES"); ?>
Replace with
<? echo ("<center>[b] Cookies Must Be Enabled To Register.</cenetr>");?><br>
<?php
if ($site_config["INVITEONLY"]):?>
<?php echo ("<center> Site Is Invite Only You Will Need An Invite Code To Register.</center></font>");?>
<?php endif; ?>
Now find
<td>Email: <font class="small"><font color="#FF0000">*</font></td>
<td><input type="text" size="40" name="email"/></td>
</tr>
<tr>Underneath add
<?php
if ($site_config["INVITEONLY"]):
?>
<td>Invite Code: <font class="small"><font color="#FF0000">*</font></td>
<td><input type="text" size="40" name="invite"/></td>
</tr>
<tr>
<?php endif; ?>Save and close account-signup.php
upload all files in attached zip to the root of your website just the php files not the invite folder ive added the hack were on signup invited user gets 2 gig upload and the person who invited gets 2 gig upload if you do not wish to have this hack please open up takeconfirm.php and remove thease lines
SQL_Query_exec("UPDATE users SET uploaded='2150000000' WHERE id IN (" . implode(", ", $_POST['conusr']) . ") AND uploaded='0'");
$result = SQL_Query_exec("SELECT * from users WHERE username = '".$CURUSER['username']."'");
while ($row = mysqli_fetch_array($result)){ $old_upload_value = $row['uploaded'] + 2150000000; }
SQL_Query_exec("UPDATE users SET uploaded='$old_upload_value' WHERE username = '".$CURUSER['username']."'");Add to languages/english.php
//INVITES
$LANG["INVCODE_ERR"] = "Sorry you do not have any invites to generate a code!";
$LANG["SUCCESS"] = "Sign Up Succsesful Welcome To $site_config[SITENAME]";
$LANG["INVITE_DONE"] = "<b>Invite Succsesful Please Note Your Inviter Needs To Confirm Your Account Before You Can Login!<b>";
In account.php find[/b]
<?php print("<a href='mailbox.php'><b>".T_("YOUR_MESSAGES")."</b></a>");?>
underneath add
|
<?php print("<a href='invite.php'><b>".T_("INVITES")."</b></a>");?>
for this to work
in backend/config set
$site_config['INVITEONLY'] = true;
$site_config['CONFIRMEMAIL'] = false;
