View Single Post
  #35  
Old 06-11-2002, 07:54 PM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Parker Clack

I read what you said to David and I am still a bit confused about the load issue thing. We have an average of over 300 people on our site at one time all the time with peaks of over 600 and lows of only about 150 even at 3am CST. The load on the server itself averages around 1.7. We have over 150,000+ readers of our site a day. So the index.php file is run ~150,000 a day. So when you talk about the estimated visitor number of your board main page or in other words how many times the file index.php is run daily I am not really sure where to set this number.
If the your index.php runs 150.000 times a day set your server load variable to 150000. That is:

Code:
$estimated_load=150000;
Then flag the admin email option and observe when the hack greets the birthdays for a few days. If greeting time satisfies you, leave it as it is. If it is too late for you, lower it (to 100000 for example) and observe again. You can make adjustments by observing the hack's avarage greeting time and according to this, lowering or highering the option. You'll find where your board and your wishes fits in..

Just remember the basic rule:
If greeting is late for you, lower the number.
If greeting time is too close to midnight, raise it..
If adding an 1 extra query to index.php is not important to you and greeting the birthdays timely (ie very close to midnight) is your primary concern, set this option to 1.

Quote:

Also, several members have set the option to not have the administration send them any emails or when adminemail=1. Can this be included in the script so that if your member doesn't want to receive any emails from the administration that, like those groups that can be excluded, these members can be excluded too?
I guess we'll soon open a special site or at least board for the hacks of this hack lol. Released yesterday and already hacked 4 times.

To send birthday greeting emails to only members who asked to receive emails from your site:

1- First set your hack to send emails only. ($greeting_type=1; ) If you apply this modification, hack will greet only users who asked to receive emails from your site, so if they set it to no, they will NOT be greeted via email, PM or thread anyway.

2- 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 FROM user WHERE  adminemail =1 AND birthday LIKE '%$greetingday$excluded_SQL"); 
That's it. Now hack will greet only users who asked to receive emails from the administrators.

Enjoy..
Logician
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01360 seconds
  • Memory Usage 1,784KB
  • 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
  • (1)bbcode_code
  • (2)bbcode_php
  • (2)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