
06-10-2002, 10:47 PM
|
 |
|
|
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили:
0 раз(а) в 0 сообщениях
|
|
I don't mean to sound dense here, but I guess I'm not sure what this really does or what it means.
Quote:
Originally posted by Logician
A quicky.. Here you go:
1- Run this query via logician_query.php:
PHP Code:
ALTER TABLE user ADD oldstyleid SMALLINT(5) UNSIGNED DEFAULT '0' NOT NULL;
2- Find:
PHP Code:
## Time difference between the time zone you and your server's time.
## Set is as a positive or negative number such as -3, +5 etc.
$timeset=9;
after that add
PHP Code:
// If style id of users who have birtdays will be changed in their birthdays, set the id:
// Use this style for only users that have birthdays! Other users shouldnt access/use this style.
$birthdaystyleid=1;
3-find:
PHP Code:
$birthday_children_row=$DB_site->query("SELECT userid, username, birthday, email, receivepm FROM user WHERE birthday LIKE '%$greetingday' $excluded_SQL");
replace it as:
PHP Code:
$birthday_children_row=$DB_site->query("SELECT userid, username, birthday, email, receivepm, styleid FROM user WHERE birthday LIKE '%$greetingday' $excluded_SQL");
4- find:
PHP Code:
} //while ($birthday_children=$DB_site->fetch_array($birthday_children_row))
before that add:
PHP Code:
if ($birthdaystyleid>0) {
$DB_site->query("UPDATE user SET oldstyleid='$birthday_children[styleid]' WHERE userid='$birthday_children[userid]'");
$DB_site->query("UPDATE user SET styleid='$birthdaystyleid' WHERE userid='$birthday_children[userid]'");
}
5-find:
PHP Code:
if ($logician_debug==1 AND $debug_birthdays==1) {echo "Days not matched, lets check if there is any birthdays around..<br><br>";}
$greettime=$last_action['leftdate'];
AFTER that add:
PHP Code:
$DB_site->query("UPDATE user SET styleid=oldstyleid WHERE styleid=$birthdaystyleid");
That's it.. Now the hack is supposed to replace the user style id of your members in their birthdays and will assign their default style id the day after.
Some important points:
1- Their style id will change (and revert) when hack "runs". That is: if hack is activated at 3.00 am, between 00.00 am to 03.00 am user's style id wont change even if its her birthday. Change will occur at the time hack greeted their birthdays. Same applies to reverting their default style id and their old style id will be back at the time the hack run the day after.
2- Birthday style you set, MUST be unique to birthday members ONLY! That is: it should be neither used by any other users (including you) in your board nor be selectable etc.. The hack will attempt to rewrite the style id of ALL users using this style and if they are not a birthday user, this can cause unwanted results while rewriting.
3- This modification is NOT TESTED very well! Dont apply it to your original board until you test it extensively for a few days in a test board. I checked it out and it SEEMS to work fine here without any problems but I dont accept responsibility for this modification since I coded it in less than 20 mins, it's a real quicky.
4- If you test it and it turns out to be working ok for you too, please return feedback so that others can use it too, thanks..
Enjoy!
Logician
|
|