Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Automatic Greeting Email/PM/Threads for Member Birthdays Details »»
Automatic Greeting Email/PM/Threads for Member Birthdays
Version: 1.00, by Logician Logician is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 06-09-2002 Last Update: Never Installs: 205
 
No support by the author.

This hack will automatically greet the birthdays of your board members by sending them:
  • Private Messages
  • Emails
  • Both
  • or by creating a birthday celebration thread in a specific forum.
Features:
* Does NOT require cron jobs so everybody can use it regardless of their server settings/rights.
* You can send PMs, emails (or both) or you can choose to send them PM if they can receive PM or else send email.
* The Hack can create special greeting threads for birthdays. (optional)
* Some usergroups (like banned users) can be excluded from automatic greetings.
* Admin can choose to receive a daily report via Email or PM about the greeted birthdays. (optional)
* Compatible with ALL vbulletin versions I know.
* Carefully coded to not to increase your SQL load and its quite performance-friendly. (More info about performance issues)
* New Added Feature: To greet only members who have more than X messages or who have visited your board in the last X days, see here
* New Added Feature: You can change his style in the day user has his birthday. Check here)
* New Added Feature: You can play Happy Birthday Song to your members in their birthdays. Check here

The hack is beta tested by many users for a long time before the release and proven to be quite stable. (BTW. thx to all beta testers especially to Dark_Wizard, Boofo, DslTeam, C-Pr0mpt for returning feedback).

WARNING: I strongly suggest:
a) Be careful while installing this hack (especially in step 2). If you install it wrongly, your members may get a lot of irrelevant greetings.
b) To make sure you installed it correctly, turn on DEBUG mode AND administrator notifications in the options of the hack while you are installing it. So the hack will NOT send any notifications to members but only send daily reports to admin. Keep an eye on these reports for a few days and if you made sure you installed it correctly and it works ok, you can safely turn off debug mode.


Enjoy the hack and if you install the hack please click INSTALL, thank you..

Logician \\=^))

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #32  
Old 06-11-2002, 06:46 PM
Parker Clack Parker Clack is offline
 
Join Date: Oct 2001
Posts: 351
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Logician:

I am a bit confused on the load number myself. By lowering the load number does the program start up closer to midnight? That is if I set this number to 5 is it going to be sending the emails out closer to midnight than the setting of 30 that is in there now?

Even though we are a high volume site our load averages aren't that high on the server. I would just as soon have the birthday greetings (I am using the email option only) sent out closer to midnight than any other time of the day.

Thanks for a great hack.

Parker
Reply With Quote
  #33  
Old 06-11-2002, 07:02 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 am a bit confused on the load number myself. By lowering the load number does the program start up closer to midnight? That is if I set this number to 5 is it going to be sending the emails out closer to midnight than the setting of 30 that is in there now?

Even though we are a high volume site our load averages aren't that high on the server. I would just as soon have the birthday greetings (I am using the email option only) sent out closer to midnight than any other time of the day.
Please read the message of mine I explained the performance issues and how the hack works. I think you'll find the answers there.

A quick summary:
load number is the estimated visitor number of your board main page. In other words how many times the file index.php is run daily. If you set it correctly you'll help the hack to run only 3 times a day to save your board from an unnessary SQL query. If you higher the number too much, it will run less frequently and sometimes can miss birthdays (in fact it never misses, just greets late). If you set it lower than it should be, greeting time will be closer to midnight but hack will work more frequently (daily) so everytime it works it will run an extra a SQL query. Since index.php has already more than 20 SQL queries, this extra query may not harm anyone and if it is no big deal to you to run 21 queries instead of 20, you can lower it too much and hack will then greet the birthdays VERY CLOSE to midnight.. For my 2 cents on the issue, read my suggestion to David..
Reply With Quote
  #34  
Old 06-11-2002, 07:21 PM
Parker Clack Parker Clack is offline
 
Join Date: Oct 2001
Posts: 351
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Logician:

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.

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?

Thanks again for a great hack and useful tool for our board.

Parker
Reply With Quote
  #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
  #36  
Old 06-11-2002, 08:06 PM
Parker Clack Parker Clack is offline
 
Join Date: Oct 2001
Posts: 351
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yep, it looks like another site is going to be needed just for this hack soon!

Thanks for the explanation and the quick fix for the adminemail option.

Parker
Reply With Quote
  #37  
Old 06-12-2002, 02:38 AM
Me2Be's Avatar
Me2Be Me2Be is offline
 
Join Date: Oct 2001
Posts: 88
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Excellent addition, I'm very impressed!

Maybe I missed this, but can this send BOTH a PM and an email? Or is the email just a notification of the PM?

Also, is there ANY possible way to add the age IF it is given, like "congratulations on your 35th birthday" and just "congratulations on your birthday" if nothing is there?

Thirdly (sorry for so many questions), my index.php page is hit about 400,000 times a month (I have a big site), and my load is always 'pressured' during peak times -- will this create an excess load for this?

Lastly, you mentioned that you can have it create a birthday thread -- is that a thread for each person who is having a birthday, or each day's birthdays? (Some of our days have over 40 birthday's on it!)

Thanks so much!! Can you tell I"m excited about this?
Reply With Quote
  #38  
Old 06-12-2002, 06:09 AM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Maybe I missed this, but can this send BOTH a PM and an email?
yep it can..

Quote:
Also, is there ANY possible way to add the age IF it is given, like "congratulations on your 35th birthday" and just "congratulations on your birthday" if nothing is there?
you can use hack variable $birthday_children[yas] to refer his age in your templates. If no year given it will be "-"..

Quote:
Thirdly (sorry for so many questions), my index.php page is hit about 400,000 times a month (I have a big site), and my load is always 'pressured' during peak times -- will this create an excess load for this?
Nope it wont.. Please check thread, already discussed in detail..

Quote:
Lastly, you mentioned that you can have it create a birthday thread -- is that a thread for each person who is having a birthday, or each day's birthdays? (Some of our days have over 40 birthday's on it!)
Will create 1 thread daily including all birthdays in this thread..
Reply With Quote
  #39  
Old 06-12-2002, 09:13 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

But is there a way to have it not even show the "-" if we don't want it to?

Quote:
Also, is there ANY possible way to add the age IF it is given, like "congratulations on your 35th birthday" and just "congratulations on your birthday" if nothing is there?

you can use hack variable $birthday_children[yas] to refer his age in your templates. If no year given it will be "-"..
Reply With Quote
  #40  
Old 06-12-2002, 09:54 AM
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 Boofo
But is there a way to have it not even show the "-" if we don't want it to?
Find:

PHP Code:
$birthday_children[yas]=$greetingyear- (integer)substr($birthday_children[birthday],05);
            if (
$birthday_children[yas]>110) {$birthday_children[yas]='-'
Replace it as:

PHP Code:
$birthday_childrenyas=$greetingyear- (integer)substr($birthday_children[birthday],05);
$birthday_children[yas]="I congratulate your new age $birthday_childrenyas!";
if (
$birthday_childrenyas>110) {$birthday_children[yas]=''
Then find and delete these lines below:

PHP Code:
if ($birthday_children[yas]!='-') {$greeting_thread.="(".$birthday_children[yas].")";} 
and 2 instances of :
PHP Code:
if ($birthday_children[yas]!='-') {$admin_report_text.="(".$birthday_children[yas].")";} 
Reply With Quote
  #41  
Old 06-12-2002, 03:14 PM
Lionel Lionel is offline
 
Join Date: Dec 2001
Location: Delray Beach, Florida
Posts: 3,277
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I installed last night minutes after midnight. I have birthdays today and tomorrow. Nothing is posting yet in the specific thread. :cry:
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:40 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06353 seconds
  • Memory Usage 2,346KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (6)bbcode_php
  • (9)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • 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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete