View Single Post
  #26  
Old 06-10-2002, 10:47 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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(5UNSIGNED 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==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
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01432 seconds
  • Memory Usage 1,825KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (9)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete