Topic: Free woman paid account
Hi, for those who need it, i have made a Hack, so womans have after register a free paid account...(Not the best way, but it works)
So, in file includes/lib/lib.account_register.php
around line 255 you will see:
save_register($type_id, $index_type_id, $username, $password, $password_confirm, $email, $email_confirm, $photo, $tos, $captcha, $fields, $default_fields);
change it to:
save_register($type_id, $index_type_id, $username, $password, $password_confirm, $email, $email_confirm, $photo, $tos, $captcha, $fields, $default_fields, $_POST['gender1']);
// $_POST['gender1'] is the sex type of the user... be carefull with this you may have to change to your own.
next, around line 361
//------------------------------------------------
// Save registration form
//------------------------------------------------
function save_register($type_id, $index_type_id, $username, $password, $password_confirm, $email, $email_confirm, $photo, $tos, $captcha, $fields, $default_fields)
change to:
//------------------------------------------------
// Save registration form
//------------------------------------------------
function save_register($type_id, $index_type_id, $username, $password, $password_confirm, $email, $email_confirm, $photo, $tos, $captcha, $fields, $default_fields, $type_sex)
// $type_sex is the value passed to the function (in my case Womans value = 2 )
Next, around line 961 you will see:
$DB->query("INSERT INTO " . DB_PREFIX . "members (group_id, type_id, username, password, email, ipaddress, picture, picture_active, picture_date, ..........................
Change to:
if($type_sex=='2'){
$group = '5'; (Group_id -> Paid members) (You may have to chenge to your own)
}else{
$group = ($PREFS->conf['activation_type'] == 1 ? $PREFS->conf['regular_member_group'] : $PREFS->conf['pending_member_group']);
}
$DB->query("INSERT INTO " . DB_PREFIX . "members (group_id, type_id, username, password, email, ipaddress, picture, picture_active, picture_date,
joindate, expirationdate, active, totalfavorites, totalaguestbooks, totalimessages, newmessages, totalalbums, referral_id, totalcredits)
VALUES ('" . $group . "', '$type_id',
'$username', '" . md5($password) . "', '$email', '$ipaddress',
" . ( isset($picname) && $picname ? "'".substr($picname, 6)."'" : "''" ) . ",
" . ( isset($picname) && $picname && $actpic ? 1 : 0 ). ",
" . ( isset($picname) && $picname ? time() : 0 ). ",
'" . $joindate . "', '$expiration', '1', '$totalfavorites', '$totalaguestbooks', '$totalimessages', '$newmessages', '$totalalbums',
'$refid', '".$PREFS->conf['trial_member_credits']."')");
Thats it, hope this helps someone
Last edited by pmaonline (2011-02-14 19:59:41)