![]() |
Automatic Greeting Email/PM/Threads for Member Birthdays
This hack will automatically greet the birthdays of your board members by sending them:
* 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 \\=^)) |
IMO screenshot for such a hack is very unneccessary, but if you are "I dont believe UNLESS I see" type, here you go: :)
* Private Message Hack sends to your users (customizable) * Daily Admin Report (optional) produced by the Hack Needless to say these PMs in the screenshots are automatically created by the hack without any admin interference/action. |
One word: THISISWAYCOOLANDMOSTDEFINITLYGOINGFORHACKOFTHEMONT HJULY
Nicely done and I think I will soon take the time to install this. I have been doing everything manually now, but this will be a fantastic solution! Very cool. |
And here I thought my wife was the only one who could say that much in one breath. ;)
Quote:
|
You might want to check this again. Option 4 is missing from the list. :) (No way to create a thread).
Quote:
|
logican, this hack is working great.
sorry for not giving any feed back before i had so many probs with my board that i totally forgot about it :( |
Is there an option where this would only post a Happy Birthday thread to member with a certain number of posts? I don't want to clutter my boards with hundreds of happy birthday messages for members whoi have never posted.
Thanks in advance! GREAT HACK! |
Thanks for the hack! I will install it on my localboard and see how it goes :)
|
Quote:
If you want it to create threads, set this option a few lines below: PHP Code:
|
Ahhhh, you hid it on me. :) There was no number 4 in the options at the top (where it used to be) so it threw me off. Thank you very much, yeni (that is the word, if I remeber, right...if I don't remember right, forgive me for whatever I just said. :)).
I would like the code for the users posts also, when you have it. Thanks! :) Quote:
|
Installed, now waiting for midnight :)
Thanks for the brilliant idea, this increases a lot the personal bound between users and the page! |
Installed.... waiting for midnight too :)
Thank you! When I run queries using Firefly's hack I sometimes make it - other times not. This time..."success" came the third time. Is this normal? |
Quote:
Quote:
|
Quote:
GREAT HACK! THANKS! |
this sounds really cool! i gonna install when you updated the file with the function "certain number of posts"
Respect! |
Quote:
|
Good point. :)
Quote:
|
Quote:
Install this hack as it is and set it to send EMAILS to your users (all of them). This will help remind you and your board to old/non-posting/non-visiting members, which is a good thing, dont you think? |
Ok...Please note...
In this part... Code:
// Excluded User groups. (That is Usergroup ID, NOT userid!) Not being a programmer...Which is right please? Thank you for a very nice addition to our site. |
As requested: (Apply ONE of them)
HACK OF THE HACK: ;) TO GREET ONLY USERS WHO VISITED YOUR BOARD IN THE LAST X DAYS: Find: PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
Find: PHP Code:
PHP Code:
PHP Code:
PHP Code:
Logician |
Hey - I got a Birthday Email, PM and thread! Its working. Will adjust the templates a bit.
Feedback: the thread greeting does not count as a thread, and the first "reply" count as the first reply - but still no thread count. Otherwise it seem to be fine here with me. Thanks! |
Quote:
|
Thank you.
Have a simple suggestion seeing you are taking them.... Maybe add an option set the birthday members default style to a special birthday style. Then of course set it back at the end of the day. (next run.) Thus one could be banner free for the day or maybe receive a special offer from a sponsor. (Can do that one via e-mail though.) In any case...you get the idea. Thank you. David Bott http://www.avsforum.com Home of over 30,000 unique visitors a day on the VB driven site. |
Quote:
Made obsolete with this code: https://vborg.vbsupport.ru/showthrea...203#post260203 Check there.. |
I don't mean to sound dense here, but I guess I'm not sure what this really does or what it means. :)
Quote:
|
Thank you.
Now...Might I kindly ask a question. That being...Why is all this code in the index.php file? I mean...if it is only used once a day...why must it all this be in this file that is called over and over and over again? It just seems like a lot of extra overhead. Now I did not know PHP or coding...But I was just wondering if it all being their does not hurt some? Would it make a difference if the code just checks the date and then if the date has moved to then call the code? Or is that what it is actually doing now? Please note...I really wanted this hack...and thank you very much for it. (something that should have been in the original Vb)...but I am just wondering. I mean...we get a lot of calls on that page. On the same note...Should the date check (the function that runs to see if it is time to do it's thing.) maybe have been put into another, lesser used, file? Again...It is checking the date with each and every page call unless I am mistaken. Thus it needs to look up some date each and every call. Not to mention to load the values each time for the options. Again....I thank you for this...I am just wondering so I can learn the logic and understand. Thank you for your time. |
Quote:
First things first: as I mentioned in my first message this hack is carefully coded and QUITE performance-friendly. That is: * The hack by no means increase your SQL load by unnecessary queries. * Does not effect your script running time. * Having a heavy traffic, too many visitors or hack's integration with index.php (the most called vbulletin file) does not change these facts in any way. Here is how: Contrary to what expected, the hack does not check the birtdays of the board members everytime index.php runs. This would slow your board and add unnecessary queries since going through with all members birthdays in the database would be a slow process and would cause a heavy load. Instead the hack is designed to first check the date of "today" and the last day of greetings, before elobarating on today's birthdays. This requires 1 SQL query per run. Considering the fact that your index.php deals with (avaragely) 20 to 40 SQL queries in its EVERY run, this 1 extra query (which is a VERY FAST one btw) would be quite bearable. BUT hack does NOT even add this query load to your server! To save you from even this tiny extra load, I added another feature to the hack: Server Load variable you set in the options. This optimizes the hack to run ONLY 3 times (avaragely) a day to check if hack already greeted the birthdays today and if not runs 1 time a day to greet them. So lets make a simple calculation: if your main page of your board has a daily 1000 visitors, * Your index.php produces an estimated of 30000 SQL queries a day (without this hack.) * After you installed the hack your estimated SQL queries will be 30004 ONLY. Does having a large code in the most running file (index.php) of your server decreases the script running performance in any way? One word: Nope. The hack's code is covered with an "IF conditional" in the begining and even if your index.php runs 1.000.000 times a day, this whole block of code will be skipped (except 3 times in a day) and having it there wouldnt even effect your running time in miliseconds. So you can use it without any worries about SQL/Server/Script performance. It's really a very well thought and coded hack.. Hope this clarifies the performance issues of the hack. Regards, Logician |
Hack of the Hack:
This modification will change the style sets of users in their birthdays so you can design a custom style for your users to show in their birthdays (a fancier one for example) Features: * Their style set will be assigned to any style set you assigned in the day they have a birthday and it will return to their default style sets the day after. * The birthday style will be overriden in the forums which have MANDATORY styles. * Style set will be changed/reverted according to their OWN times (unlike the hack). * You can set a style set with no banner advertisement or have some special offers etc when user has a birthday. (But be warned: a wise member can change their birthday everyday to have this style forever, so dont make something so tempting!) :) * This modification is APART from my hack so they are not related or not depending eachother. You can use both together or use just one of them without installing the other. Installation: Edit global.php PHP Code:
BEFORE that add: PHP Code:
|
I thank you very much for your well thought reply and coding of this script.
I have installed on two sites...One ran just fine and I found the birthday greetings as expected. The other site has not run it as of yet and the date is still yesterdays in the timetick area. TO see if it would help...I have changed the load setting to be 5. So...Now I am just waiting to see if it catches up. BTW...Boy is that load setting kinda confusing. Could you not have made it easier and said "If server load is less than X" and use a real server load number. ;) The default 30 number means nothing to me. Oh..yes...Does the above style hack replace the other one you mentioned? If so...their does not seem to be any code to put back the users real style at the next move. (Though the above is much easier.) (I am glad you liked the idea.) (Note...everything I do on our site I need to be concerned with on loads. As mentioned, 30,000 unique visitors a day...12.5 million page views a month.) David |
Quote:
Quote:
Quote:
Quote:
You'll find the best setting for you after a litte experience. I personally like to adjust the server load variable to such a number that the hack avaragely greets the birtdays at 3 am (that is, it runs in every 3 hours). I suggest: * set it to a lower number first * enable admin report * examine when the hack avaregly greets the birthdays. * Increase the variable gradually until it stables at around 4am-5am for example (or any time you want). That's the power of customization hehe Logician |
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 |
Quote:
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.. |
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 |
Quote:
Code:
$estimated_load=150000; 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:
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:
PHP Code:
Enjoy.. Logician |
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 |
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? |
Quote:
Quote:
Quote:
Quote:
|
But is there a way to have it not even show the "-" if we don't want it to? :)
Quote:
|
Quote:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
|
I installed last night minutes after midnight. I have birthdays today and tomorrow. Nothing is posting yet in the specific thread. :cry:
|
All times are GMT. The time now is 04:16 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|