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
  #102  
Old 01-13-2003, 08:06 AM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi gopherhockey,
Quote:
Originally posted by gopherhockey
What happened was that a message was generated to EVERY user and a forum message was also posted for every user.
I bet your problem is related to wrong applience of installation step 2. Either one is what happened:
1- You entered the date incorrectly. For example you might have forgotten we are in 2003 now and enter the year as 2002.
2- You entered the date in the wrong format: The correct format is: "YYYY-MM-DD". For example if you entered it like YYYY-DD-MM this would be wrong.

The admin email notice seconds this. It says :
Quote:
Birthdays for day (2002-09-22) celebrated at January 13, 2003, 12:00 am (Server Time)
So it's obvious that the script was regarding "today's date" as "2002-09-22" so today's date in installation step 2 was not entered correctly. Check the first greeting message the hack produced and you'll see what (approximately) date was the script accepting as "today's date" when you first installed it. If it is something like "January 2002", your problem is related to the first reason I mentioned above, if its a date later than this, it should be the second reason..

I strongly believe your problem is not related to the script, it's tested for a real long time in many servers. So don't be afraid to retry it, provided that you install it carefully (especially step 2). Also it's suggested the you run the script in debug mode (3) first, which will make sure your users will not get any mails or PMs until you are confident it's working ok..

Hope this helps..
Reply With Quote
  #103  
Old 01-13-2003, 12:26 PM
gopherhockey's Avatar
gopherhockey gopherhockey is offline
 
Join Date: Jul 2002
Posts: 202
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I kind of knew that people would go after the date thing... thats why I was so careful in reviewing the docs and what I did. It all still checks out - even now when I run the script you gave to "test" the date, it still checks out perfectly. Here is another message it gave me (below). You can see this one, received on the same date & time was for a guy whos birthday was in Nov. of 02. I have about 50 such messages ranging from the entire calendar year, but all sent/posted on Jan 13, 03.

Here is the output of the sql query you had us run:

Edit Delete 2003-01-13

- If I read your instructions right, 03 is year, 01 (Jan) month and 13=day, which all checks out.

Could it be some Win2k thing? I double checked the time on the server, its ok with correct time zone etc.

I know the time/date thing seems obvious, but that isn't the case here. Hmmmm....

Or could it be that I entered 2003-01-12 when it was actually 11:30pm my time (central) but was actually probably 2003-01-13 G-time? Maybe somehow beign so close to midnight it was like telling the system I installed it yesterday. (although it still probably wouldn't have done what it did even doing that I imagine)



----

Daily Birthday Greetings Report
Birthdays for day (2002-11-10) celebrated at January 13, 2003, 12:00 am (Server Time)

Members who have birthday:

* Tom S.(35)1967-11-10 [PM Sent] [Thread Created]

Thread : http://www.xxxxxxxxxx.com/forums/sho...p?threadid=106

----------------------------------
Logician Auto Email/PM Birthday Greeting Hack
Reply With Quote
  #104  
Old 01-13-2003, 05:41 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 gopherhockey
Could it be some Win2k thing? I double checked the time on the server, its ok with correct time zone etc.
Let's try this:
Edit hack code and find:
PHP Code:
$n_yeardate("Y"mktime (0,0,0$n_month1$n_day1$n_year1)); 
After that add:
PHP Code:
echo "today is : $todays_date1<br><br>";
echo 
"last running time was : $last_action[leftdate]<br><br>";
if (
$last_action) {echo "last action variable is set";} else {echo "last action variable is NOT set";}
exit; 
and let's see what values the hack will return to you. You may need to refresh the main page a few times to get the results according to your $estimated_load setting (or lower it). You don't need to worry about users getting mails because code will exit after values are displayed..

Also run this query and tell me what does it return:
[sql]SELECT * FROM timetick WHERE action='birthday' LIMIT 1[/sql]
Reply With Quote
  #105  
Old 01-13-2003, 06:00 PM
gopherhockey's Avatar
gopherhockey gopherhockey is offline
 
Join Date: Jul 2002
Posts: 202
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for the suggestions.. I ran them, and here is the results..

The result of the sql query you gave me is this:

id action leftdate leftid
Edit Delete 1 birthday 2003-01-13 0

The result of the echo code you gave me is this:

today is : 2003-01-13

last running time was :

(it shows no last running time)

I reset one of my birthdays to tomorrow (the 14th) to see if this happens all over again at the new day. If it is a one-time only situation I don't mind.. but it would be kind of fun to find out why this happened, even if to possibly help you or others in the future.
Reply With Quote
  #106  
Old 01-13-2003, 06:14 PM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I modified the debug code above a little bit. Can u please try again and tell me the displayed result?

It's weird that query returns you the correct time but the debug code for last running time is blank.

BTW. you are sure you applied the hack code to "forum/index.php", not to another file right? Also your "timetick" table is created in the same MYSQL database your test board is installed? If you have more than 1 databases, please make sure your table is in the correct database.

Also make sure if you have this line in the hack code:
PHP Code:
$last_action=$DB_site->query_first("SELECT * FROM timetick WHERE action='birthday' LIMIT 1"); 
and it stands as a new line, not appended right after this line:
PHP Code:
//$todays_date1=vbdate("Y-m-d",time()); 
Reply With Quote
  #107  
Old 01-13-2003, 07:51 PM
gopherhockey's Avatar
gopherhockey gopherhockey is offline
 
Join Date: Jul 2002
Posts: 202
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I ran with the new code (and that line verified to be there as requested) and got:

today is : 2003-01-13

last running time was : 2003-01-13

last action variable is set

---

I definitely don't have any other databases in use.

The only other thing I can think of is that I set the estimated load at 3 before it ran last night (since it gets no other traffic than me, I figured that wouldn't hurt). Also, I did not use your sql tool to enter the data required for the hack but went in to phpmyadmin to do it directly. Those are the only two other deviations I can think of. I wonder if there are many others using your hack with vbulletin on win2k sp3 and 2.2.9.

Let me know if I can try anything else. Should I try setting the time ahead on my server to see if it happens again, or would that just cloud the problem? (I'm rather curious to see if it will kick off all those messages/threads again when the 14th comes)
Reply With Quote
  #108  
Old 01-14-2003, 04:10 AM
gopherhockey's Avatar
gopherhockey gopherhockey is offline
 
Join Date: Jul 2002
Posts: 202
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just an update - midnight came and went and I received just the one email/thread posting as should have happened... so, whatever initially kicked off all those emails and posts is, hopefully, gone. Strange - but perhaps a good reminder to run it first in test mode as you suggested.

I like the script, very nice. I do plan to install it on my production server.
Reply With Quote
  #109  
Old 01-14-2003, 06:41 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 gopherhockey
Just an update - midnight came and went and I received just the one email/thread posting as should have happened... so, whatever initially kicked off all those emails and posts is, hopefully, gone. Strange - but perhaps a good reminder to run it first in test mode as you suggested.
Yes it was expected as it returned the normal values (last running time was same with today's date) in your debug run yesterday.

Your initial problem was related to "last running time" being incorrect. I don't know why it was not correct in the first place when you installed it but I still suspect you might set it wrongly. (especially regarding year). If you confirmed the year after posts are sent, it would display correctly so it does not count. But if you insist the date and its format was correct right after you applied step 2, well then it must be something else that caused it .. Don't have any idea then..
Reply With Quote
  #110  
Old 01-14-2003, 04:59 PM
gopherhockey's Avatar
gopherhockey gopherhockey is offline
 
Join Date: Jul 2002
Posts: 202
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have done and still do a lot of stupid things in my life, but lying about something like this and wasting everyone's time (espeically the author's) is not one of them.

I set it up as per instructed and got the dates completely right the first time. WHat happened may remain a mystery - perhaps a combo of the OS and software/mysql etc. - who knows.

I hope nobody else runs into this "bug" or whatever it is. I recommend running in test mode first, just in case... if you don't and if you have more users than I do, be ready to delete lots of threads and messages etc.

Perhaps to pull anything constructive out of all this, a person could use the example code you posted earlier to check to be sure both dates are correctly reported... I notice in the installation document you have us run a test that returns one date/time combo. Would it be an advantage to run it in a way that reports both? Or is one written the first time and one written after the first day when the first run completes..?

Here is another though. WHen I initially ran it, I had set my estimated load to 3 instead of 30. Is it possible that on that midnight when I was all click-happy to see it run that I kicked off the thing twice in a row so quickly that one of the instances didn't read the last run time either at all or properly and maybe caused that strange behavior?

Probably not worth further speculation...
Reply With Quote
  #111  
Old 01-28-2003, 04:53 AM
Intex Intex is offline
 
Join Date: Apr 2002
Posts: 576
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I set this up last night and it certainly sent an email, PM and put a thread in a forum as I specified in my options. However it only put the subject title in, i.e. Happy Birthday to Our Members for the thread and no body content, Happy Birthday !!! in the PM but no body content etc.

Any ideas?
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 05:51 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.05322 seconds
  • Memory Usage 2,337KB
  • 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
  • (4)bbcode_php
  • (4)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
  • (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