View Full Version : Automatic Greeting Email/PM/Threads for Member Birthdays
Logician
06-09-2002, 10:00 PM
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 (https://vborg.vbsupport.ru/showthread.php?postid=260201#post260201))
* 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 (https://vborg.vbsupport.ru/showthread.php?s=&postid=260006#post260006)
* New Added Feature: You can change his style in the day user has his birthday. Check here (https://vborg.vbsupport.ru/showthread.php?postid=260203#post260203))
* New Added Feature: You can play Happy Birthday Song to your members in their birthdays. Check here (https://vborg.vbsupport.ru/showthread.php?s=&postid=262074#post262074)
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 (https://vborg.vbsupport.ru/misc.php?s=&action=install&threadid=39663), thank you..
Logician \\=^))
Logician
06-09-2002, 10:04 PM
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 (https://vborg.vbsupport.ru/attachment.php?s=&postid=251697) Hack sends to your users (customizable)
* Daily Admin Report (https://vborg.vbsupport.ru/attachment.php?s=&postid=251700) (optional) produced by the Hack
Needless to say these PMs in the screenshots are automatically created by the hack without any admin interference/action.
Floris
06-09-2002, 10:11 PM
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.
Boofo
06-09-2002, 10:42 PM
And here I thought my wife was the only one who could say that much in one breath. ;)
Originally posted by xiphoid
One word: THISISWAYCOOLANDMOSTDEFINITLYGOINGFORHACKOFTHEMONT HJULY
Boofo
06-09-2002, 10:55 PM
You might want to check this again. Option 4 is missing from the list. :) (No way to create a thread).
Originally posted by Logician
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.
The hack is beta tested by many users over a month before the release and proven to be stable. (BTW. thx to all beta testers especially to Dark_Wizard, Boofo, DslTeam, C-Pr0mpt for returning feedback)
Enjoy the hack and if you install the hack please click INSTALL thank you..
Logician \\=^))
Allstar DC
06-10-2002, 04:13 AM
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 :(
lordofgun
06-10-2002, 04:49 AM
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!
JulianD
06-10-2002, 05:38 AM
Thanks for the hack! I will install it on my localboard and see how it goes :)
Logician
06-10-2002, 06:09 AM
Originally posted by Boofo
You might want to check this again. Option 4 is missing from the list. :) (No way to create a thread).
@Boofo: Nope it's there: Just as a new independent option: ;)
If you want it to create threads, set this option a few lines below:
// Do you want the hack to automatically create a thread to greet the birthdays as well?
// 1-- > Yes, 0 --> No
$thread_create=1
@lordofgun: I'll soon give you a code to integrate this feature..
Boofo
06-10-2002, 06:19 AM
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! :)
Originally posted by Logician
@Boofo: Nope it's there: Just as a new independent option: ;)
If you want it to create threads, set this option a few lines below:
// Do you want the hack to automatically create a thread to greet the birthdays as well?
// 1-- > Yes, 0 --> No
$thread_create=1
@lordofgun: I'll soon give you a code to integrate this feature..
LamBras
06-10-2002, 07:34 AM
Installed, now waiting for midnight :)
Thanks for the brilliant idea, this increases a lot the personal bound between users and the page!
bandersen
06-10-2002, 12:13 PM
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?
Logician
06-10-2002, 12:32 PM
Originally posted by bandersen
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?
Well, it doesnt seem normal but you need to ask Firefly about his hack :)
Installed.... waiting for midnight too :)
Dont wait for the exact midnight time.. Wait for "tomorrow"..It can take the hack a few hours after midnight to greet the birthdays depending on the "serverload" option you set in the options. ;)
WebMasterAJ
06-10-2002, 01:46 PM
Originally posted by lordofgun
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!
Would you be able to send me this hack as well? This looks freakin awesome, but I don't want birthdays for people that have 0 posts ;)
GREAT HACK! THANKS!
Birdie501
06-10-2002, 02:00 PM
this sounds really cool! i gonna install when you updated the file with the function "certain number of posts"
Respect!
Originally posted by WebMasterAJ
Would you be able to send me this hack as well? This looks freakin awesome, but I don't want birthdays for people that have 0 posts ;)
Why wouldn't you? It's a great way to get your non-posting members posting again. They will feel all warm and fuzzy when reading a special birthday PM or e-mail or even thread! :cool:
Boofo
06-10-2002, 06:43 PM
Good point. :)
Originally posted by djr
Why wouldn't you? It's a great way to get your non-posting members posting again. They will feel all warm and fuzzy when reading a special birthday PM or e-mail or even thread! :cool:
Logician
06-10-2002, 06:46 PM
Originally posted by Birdie501
[B]i gonna install when you updated the file with the function "certain number of posts"
[B]
I'll give you the code soon, but first my 2 cents: :)
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?
David Bott
06-10-2002, 08:25 PM
Ok...Please note...
In this part...
// Excluded User groups. (That is Usergroup ID, NOT userid!)
// If you dont want to sent greetings for some usergroups enter their usergroups id:
// For example you should consider excluding Banned Users.
// Usage Examples: To exlude user group 12 use: $excluded_usergroups=array("12");
// To exclude user group 12 AND 13 use: $excluded_usergroups=array("12", "13");
// To NOT to exclude any usergroups, simply put a # in the begining of line below:
$excluded_usergroups=array('3');
In the instructions you show double quotes for the data and in the actual line you show single.
Not being a programmer...Which is right please?
Thank you for a very nice addition to our site.
Logician
06-10-2002, 08:26 PM
As requested: (Apply ONE of them)
HACK OF THE HACK: ;)
TO GREET ONLY USERS WHO VISITED YOUR BOARD IN THE LAST X DAYS:
Find:
## 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:
## Greets only users who visited your board in the last X days
$last_visit_day=90;
Find:
$todays_date1= date("Y-m-d", mktime (date("H")+$timeset, date("i"), date("s"), date("m"), date("d"), date("Y")));
After that add:
$user_last_visit= mktime (date("H")+$timeset, date("i"), date("s"), date("m"), date("d")-$last_visit_day, date("Y"));
Find:
$birthday_children_row=$DB_site->query("SELECT userid, username, birthday, email, receivepm FROM user WHERE birthday LIKE '%$greetingday' $excluded_SQL");
Replace it as:
$birthday_children_row=$DB_site->query("SELECT userid, username, birthday, email, receivepm FROM user WHERE lastvisit > $user_last_visit AND birthday LIKE '%$greetingday' $excluded_SQL");
TO GREET ONLY USERS WHO HAVE POSTED MORE THAN X MESSAGES:
Find:
## 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:
## To Greet only users who have more than X messages, set this:
$message_to_greet=90;
Find:
$birthday_children_row=$DB_site->query("SELECT userid, username, birthday, email, receivepm FROM user WHERE birthday LIKE '%$greetingday' $excluded_SQL");
Replace it as:
$birthday_children_row=$DB_site->query("SELECT userid, username, birthday, email, receivepm FROM user WHERE posts>$message_to_greet AND birthday LIKE '%$greetingday' $excluded_SQL");
Enjoy! ;)
Logician
bandersen
06-10-2002, 08:29 PM
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!
Logician
06-10-2002, 08:29 PM
Originally posted by David Bott
$excluded_usergroups=array("12", "13");
// To NOT to exclude any usergroups, simply put a # in the begining of line below:
$excluded_usergroups=array('3');
In the instructions you show double quotes for the data and in the actual line you show single.
Not being a programmer...Which is right please?
Both ok there, pick one you like :)
David Bott
06-10-2002, 08:35 PM
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.
Logician
06-10-2002, 10:38 PM
Originally posted by David Bott
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.
Edited:
Made obsolete with this code:
https://vborg.vbsupport.ru/showthread.php?postid=260203#post260203
Check there..
Boofo
06-10-2002, 10:47 PM
I don't mean to sound dense here, but I guess I'm not sure what this really does or what it means. :)
Originally posted by Logician
A quicky.. Here you go:
1- Run this query via logician_query.php:
ALTER TABLE user ADD oldstyleid SMALLINT(5) UNSIGNED DEFAULT '0' NOT NULL;
2- Find:
## 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
// 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:
$birthday_children_row=$DB_site->query("SELECT userid, username, birthday, email, receivepm FROM user WHERE birthday LIKE '%$greetingday' $excluded_SQL");
replace it as:
$birthday_children_row=$DB_site->query("SELECT userid, username, birthday, email, receivepm, styleid FROM user WHERE birthday LIKE '%$greetingday' $excluded_SQL");
4- find:
} //while ($birthday_children=$DB_site->fetch_array($birthday_children_row))
before that add:
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:
if ($logician_debug==1 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:
$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
David Bott
06-11-2002, 01:35 AM
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.
Logician
06-11-2002, 12:23 PM
Originally posted by David Bott
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?
I am just wondering so I can learn the logic and understand.
I respect your concerns and all your stated questions are quite relavant. They should have been already asked by all users who installed this hack. ;) So let me clarify the logic and algorithm of the hack and relieve your worries:
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
Logician
06-11-2002, 12:28 PM
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
// figure out the chosen style settings
unset($codestyleid);
unset($style); // prevent some weird issues
Find:
BEFORE that add:
// Logician Change Style in users' birthday hack
$today_birthday=substr($bbuserinfo[birthday],-5);
$today_of_user = vbdate("m-d",time());
if ($today_of_user==$today_birthday) {$bbuserinfo['styleid']=X;}
// Logician Change Style in users' birthday hack
Replace X with the style id you want to set.. That's it, enjoy..
David Bott
06-11-2002, 12:38 PM
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
Logician
06-11-2002, 01:03 PM
Originally posted by David Bott
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.)
[/B]
They both do the same thing in different ways. But I didnt test the first one well and the second one is much simplier and solid so I suggest using it. (I deleted the first one anyway)
(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.)
Yep I understand the issue and it's why the hack is optimized for such a way to fit everyboard..
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.
I dont like pre-defined settings by the coder. I am a big fan of highly customizable scripts. So I guess it's much better if you tell the hack what's your estimated visitors is and by this way you can make a better adaptation of the hack to your needs and board.
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.
And this proves what I mentioned above, doesnt it? ;)
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
Parker Clack
06-11-2002, 06:46 PM
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
Logician
06-11-2002, 07:02 PM
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..
Parker Clack
06-11-2002, 07:21 PM
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
Logician
06-11-2002, 07:54 PM
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:
$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.
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. :p
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:
$birthday_children_row=$DB_site->query("SELECT userid, username, birthday, email, receivepm FROM user WHERE birthday LIKE '%$greetingday' $excluded_SQL");
Replace it as:
$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
Parker Clack
06-11-2002, 08:06 PM
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
Me2Be
06-12-2002, 02:38 AM
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?
Logician
06-12-2002, 06:09 AM
Maybe I missed this, but can this send BOTH a PM and an email?
yep it can..
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 "-"..
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..
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..
Boofo
06-12-2002, 09:13 AM
But is there a way to have it not even show the "-" if we don't want it to? :)
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 "-"..
Logician
06-12-2002, 09:54 AM
Originally posted by Boofo
But is there a way to have it not even show the "-" if we don't want it to? :)
Find:
$birthday_children[yas]=$greetingyear- (integer)substr($birthday_children[birthday],0, 5);
if ($birthday_children[yas]>110) {$birthday_children[yas]='-';
Replace it as:
$birthday_childrenyas=$greetingyear- (integer)substr($birthday_children[birthday],0, 5);
$birthday_children[yas]="I congratulate your new age $birthday_childrenyas!";
if ($birthday_childrenyas>110) {$birthday_children[yas]='';
Then find and delete these lines below:
if ($birthday_children[yas]!='-') {$greeting_thread.="(".$birthday_children[yas].")";}
and 2 instances of :
if ($birthday_children[yas]!='-') {$admin_report_text.="(".$birthday_children[yas].")";}
Lionel
06-12-2002, 03:14 PM
I installed last night minutes after midnight. I have birthdays today and tomorrow. Nothing is posting yet in the specific thread. :cry:
Logician
06-12-2002, 03:24 PM
Originally posted by Lionel
I installed last night minutes after midnight. I have birthdays today and tomorrow. Nothing is posting yet in the specific thread. :cry:
1- When did you installed the hack (date and time)
2- What time it is now (date and time)
3- Have you set timeset variable?
4- Run this query and tell me what it returns:
SELECT leftdate from timetick where action='birthday';
5- What did you set your server load variable to? What's your estimated daily visitor number of index.php?
6- Are you aware that hack does not greet at exactly 12.00 am, but it will greet at a random hour after midnight, depending on your visitor number you set?
Lionel
06-12-2002, 03:48 PM
Originally posted by Logician
1- When did you installed the hack (date and time)
2- What time it is now (date and time)
3- Have you set timeset variable?
4- Run this query and tell me what it returns:
SELECT leftdate from timetick where action='birthday';
5- What did you set your server load variable to? What's your estimated daily visitor number of index.php?
6- Are you aware that hack does not greet at exactly 12.00 am, but it will greet at a random hour after midnight, depending on your visitor number you set?
1-I installed early this morning at 12:05 AM
2-it is 12:40 PM, 12 hours later
3-$timeset=0;
4-query returns 2002-06-12
5-load variable was placed at 15 estimated daily visitors is 2000+
6-I understand that it will not trigger at midnight
Logician
06-12-2002, 04:04 PM
Originally posted by Lionel
1-I installed early this morning at 12:05 AM
2-it is 12:40 PM, 12 hours later
You are missing the point that hack will start greeting birthdays the day after you installed the hack ie 13.6.2002 for you.. It's written in the instructions..
Lionel
06-12-2002, 04:20 PM
if I manually change the date to 11 in mysql database, will it run it today? I am anxious to see this at work...
Logician
06-12-2002, 04:26 PM
yep it will, but be careful to not to enter a wrong date (or date format) there.
David Bott
06-12-2002, 04:28 PM
Yesterday at the load value set at 30...it ran at 11:00AM.
Today...With the load value set at 5....it ran at 11:00AM.
Logician
06-12-2002, 04:47 PM
Originally posted by David Bott
Yesterday at the load value set at 30...it ran at 11:00AM.
Today...With the load value set at 5....it ran at 11:00AM.
You probably didnt set the timeset variable correctly and although you it's 11.00 AM to you, it's 00.00 AM for your server..
Considering the fact that you have very high number of visitors in your server, numbers like 30 or 5 makes no difference for you. The hack will run VERY VERY close to midnight in your board with these numbers..
Lionel
06-12-2002, 04:48 PM
Originally posted by Logician
yep it will, but be careful to not to enter a wrong date (or date format) there.
k, I changed it to yesterday, set the load value at 15, had 36 visitors since and I did a few refreshes of index.php.... well, I guess I'll wait a little...
David Bott
06-12-2002, 05:15 PM
## 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=-8;
ok...Then maybe clear this up. Would it not always be set at zero then if you want it to run per the serers time? I have it set for -8 which is the time offset for GMT as the forum is set. So..Seeing the server is Calf....What should it be? Boy...it sure seems simple....but guess not.
Logician
06-12-2002, 05:33 PM
Originally posted by David Bott
ok...Then maybe clear this up. Would it not always be set at zero then if you want it to run per the serers time? I have it set for -8 which is the time offset for GMT as the forum is set. So..Seeing the server is Calf....What should it be? Boy...it sure seems simple....but guess not.
This clarifies why it greeted at 11.00 am..
It's "Time difference between the time zone you and your server's time." NOT "difference between your server and London".
So if server is in California and so do you, set it to 0.
By setting it to -8, you programmed the hack to start greetings at 8.00AM server time. Since it greeted at 11.00 AM, may I assume that you live somewhere that has 3 hours difference with California? ;)
David Bott
06-12-2002, 05:54 PM
Bingo! NY
Logician
06-12-2002, 05:55 PM
Small Bug Fix:
Small bug fix with "Create Thread" feature:
Find:
$log_postid=$DB_site->insert_id();
After that line add:
// Updating Forum
$DB_site->query("UPDATE forum SET replycount=replycount+1,threadcount=threadcount+1, lastpost='".time()."',lastposter='".addslashes($greeter_name)."' WHERE forumid = $greetings_forum");
// Updating User's Post
$DB_site->query("UPDATE user SET posts=posts+1 WHERE userid=$greeter");
Save and upload your index.php..That's it.. Now created threads will be visible in the forum display too and these threads will increase the thread starter's post number.
Original hack file in the thread is already updated so this fix only applies to users who installed the hack prior to 12.June.2002.
Logician
Me2Be
06-12-2002, 09:31 PM
I've just installed it and now I'm waiting until tomorrow LOL...
Couple of requests if this is possible...
1] When it created the thread, can we have it add that day's date in the subject heading? Like "Today's Birthdays: June 13, 2002" -- this way the threads won't all be the same subject every day :)
2] On the list of that day's birthdays on the thread, is it possible to have each username linked to either their profile link, or better yet, 'send a PM' to them? (All of my members use PMs)
Thanks! I can't wait to see what happens tomorrow!
Logician
06-12-2002, 09:56 PM
Originally posted by Me2Be
[B]1] When it created the thread, can we have it add that day's date in the subject heading? Like "Today's Birthdays: June 13, 2002" -- this way the threads won't all be the same subject every day :)
[B]
Find:
// Creating Thread
After that add:
$todays_date11= date("F j, Y", mktime (date("H")+$timeset, date("i"), date("s"), date("m"), date("d"), date("Y")));
$title3.=$todays_date11;
2] On the list of that day's birthdays on the thread, is it possible to have each username linked to either their profile link, or better yet, 'send a PM' to them? (All of my members use PMs)
Their usernames are already linked to their profile, by default.. (clickable)
I can't wait to see what happens tomorrow!
Let me guess: Hack will greet the birthdays hehe ;)
Enjoy..
Logician
Me2Be
06-12-2002, 10:06 PM
Originally posted by Logician
[B]$todays_date11.....=$todays_date11;
Thanks for the quick response!
Do I have to add anything to the templates to get that to work or will it automatically add it?
Logician
06-12-2002, 10:16 PM
Originally posted by Me2Be
Thanks for the quick response!
Do I have to add anything to the templates to get that to work or will it automatically add it?
nope nothing needed for templates. This modification changes only the subject of the thread (upon your request) and thread subject has nothing to do with any templates.
But you may like to change thread title variable ($title3) in the options part. This modification will add the date of celebration at the end of this variable, so you should regard a suitable title like:
$title3='Todays Birthdays :';
when it is parsed it will become:
Todays Birthdays: June 14, 2002
Boofo
06-12-2002, 10:26 PM
Don't you mean the $title3 variable? :)
Originally posted by Logician
nope nothing needed for templates. This modification changes only the subject of the thread (upon your request) and thread subject has nothing to do with any templates.
But you may like to change thread title variable ($thread3) in the options part. This modification will add the date of celebration at the end of this variable, so you should regard a suitable title like:
$thread3='Todays Birthdays :';
when it is parsed it will become:
Todays Birthdays: June 14, 2002
Logician
06-12-2002, 10:36 PM
Originally posted by Boofo
Don't you mean the $title3 variable? :)
yep $title3 it is.. 2.30 AM here and I really answered many questions.. Need some sleep :) Good night!
Boofo
06-12-2002, 10:38 PM
Good night, my friend. :)
Originally posted by Logician
yep $title3 it is.. 2.30 AM here and I really answered many questions.. Need some sleep :) Good night!
Me2Be
06-13-2002, 03:08 PM
Worked beautifully - thank you!
Lionel
06-14-2002, 05:31 AM
I've got 5 birthdays today... the thread posted in the correct forum, but it shows only 2 birthdays :ermm:
Logician
06-14-2002, 05:48 AM
Originally posted by Lionel
I've got 5 birthdays today... the thread posted in the correct forum, but it shows only 2 birthdays :ermm:
Make sure other 3's usergroup is not excluded in options part.
Lionel
06-14-2002, 06:05 AM
yep, number 3 is the users awaiting confirmation and that was the case
Logician
06-14-2002, 06:17 AM
glad you figured that out. You either disable it or if you want not to greet awaiting confirmation members leave it as it is.
Lionel
06-14-2002, 06:26 AM
My boards are 100% community based and I am sure the members appreciate to be remembered.
I must tell you that I was so impressed by your hack that I went hunting for your other hacks and installed a couple more. Both the webtemplates and the way that you provide for "cut and paste" of any section of a thread into news were impressive.
It's also good to know who rated.
Nice work, keep it up!
Logician
06-16-2002, 08:33 AM
Addition to the Hack:
This small modifications will play happy birthday song to your members when they visit your board in their birthdays.
Features:
This addition is independent from the hack itself. So you can use one without another. That is, you can apply this modification even if you didnt applied the hack itself
It will play any .wav or .mid sound file to your users in their birthdays when they visited your board's main page.
Installation:
1-Edit global.php
find:
// figure out the chosen style settings
unset($codestyleid);
unset($style); // prevent some weird issues
After that add:
// Logician Play Happy Birthday Song in users' birthday hack
$today_birthday=substr($bbuserinfo,-5);
$today_of_user = vbdate("m-d",time());
if ($today_of_user==$today_birthday) {$birthdaysong='<EMBED SRC="mysound.wav" hidden="true" AUTOSTART="true" loop=1 PLAYCOUNT=1>';}
// Logician Play Happy Birthday Song in users' birthday hack
2- Upload the midi or wav you want to play under your board directory and replace mysound.wav with its name in the code.
3- Admin CP/Modify Template, edit template: forumhome
Find:
$headinclude
Replace it AS:
$headinclude
$birthdaysong
Notes:
The hack will play the song in the board's home page only. If you wanted to play in other pages too (user CP for example) add the [B]$birthdaysong variable to any template you want
If you want the song be played in any page of your board, remove the $birthdaysong variable form forumhome and put it into a more global template like header. (But it would be boring to browse the board with a sound file chasing you in every page you visited so be warned!) ;)
By default song will be played once only when the page is loaded. If you want to play more than once replace 1s in "loop=1 PLAYCOUNT=1" part.
Enjoy!
Logician
Ps. If you apply the add-on that changes user's style in their birthdays, please check its post and reapply the code. I catched a bug in the code and corrected it. Considering the fact that nobody hollered, it seems nobody uses it though :)
amity
06-21-2002, 03:12 AM
now i can't figure out why it isn't posting the thread on the forum.
if i put 1 for the forum number, does that mean the first forum i created? or the first forum listed on the main page? and does the numbering include the category as a forum?
thanks and blessings,
amity
Logician
06-21-2002, 05:09 AM
Originally posted by amity
now i can't figure out why it isn't posting the thread on the forum.
if i put 1 for the forum number, does that mean the first forum i created? or the first forum listed on the main page? and does the numbering include the category as a forum?
if you put 1 for the forum number this means that you want it to post in the forum with forum id 1. That is:
http://www.yoursite.com/forum/forumdisplay.php?s=&forumid=1
Do mail/pm/admin notifications run ok?
David Bott
06-23-2002, 07:09 PM
For the last 3 days this hack has sent out more than one birthday greeting and I receive more than one PM of the ones that went out.
What I mean is..When I go into my PM the next day...I find 2 or three of the notcies of what went out. They all have the same time stamp and the same data in the message of who it went to.
When I contacted one of the birthday people on the list...they told me they received the message more than once.
NOTE...I am using it for E-MAIL only sending with it checking for their OK to send a message.
Please advise.
Logician
06-23-2002, 07:32 PM
Originally posted by David Bott
For the last 3 days this hack has sent out more than one birthday greeting and I receive more than one PM of the ones that went out.
When I contacted one of the birthday people on the list...they told me they received the message more than once.
David increase the $estimated_load value.
The very high trafic of your board and very low estimated_load number (compared to your traffic) causes it. This is how it happens:
One visitor triggers the hack at midnight, the hack begins to compile birthday greetings but before it finishes and updates the database date, another visitor triggers it again (the first visitor's trigger didnt finished yet, so database date is still yesterday). Hack will be done in less than a second and your traffic is so high that, it gets triggered more than once in that very second and produce more than 1 greetings.
With so high traffic you really dont need so low estimated_load value. Increase it and you'll be fine.
David Bott
06-23-2002, 07:35 PM
Ok...will give it a shot. Thank you.
Heineken77
07-15-2002, 08:07 PM
Odd problem.
I followed the instructions to the T, used phpMyAdmin to run the queries, added and saved the templates, and edited my index.php file under forum/index.php .. however when I tried to access my site I got the following email:
Database error in vBulletin :
Link-ID == false, connect failed
mysql error: Can't connect to MySQL server on 'mysql.zeonhost.com' (110)
mysql error number: 2003
Date: Monday 15th of July 2002 04:55:58 PM
Script: http://nba2k3.net/forum/index.php
Referer:
Any ideas? I just put everything back to it's original state :(
Heineken
Logician
07-15-2002, 10:06 PM
MYSQL error no 2003 is related to MYSQL access problems and occurs when the script can not access to MYSQL. So it can not be related to the hack. It's very likely your were just unlucky, your MYSQL server went down at the moment you installed the hack. When it's back online, IMO give it a shot again .. The hack has been tested, installed and used by many people with no problems at all.. ;)
Heineken77
07-15-2002, 10:08 PM
DOH! Means I have to redo it all over again lol ... should have waited before reverting back to original state eheh
Thanks bro, great hack by the way! Look forward to installing it :)
Logician
07-15-2002, 10:23 PM
yw, let me know if you encounter any problems again.. :)
dprice
07-16-2002, 12:45 PM
Logician,
Installed the hack and it sent the emails and PMs to the Birthday members, but the EMAILS are Blank. The subject is titled: Happy Birthday, but there isnt any messages in the PMs or emails?
Logician
07-16-2002, 02:20 PM
Originally posted by dprice
Installed the hack and it sent the emails and PMs to the Birthday members, but the EMAILS are Blank. The subject is titled: Happy Birthday, but there isnt any messages in the PMs or emails?
dprice, make sure :
a) you have created the templates
b) content of that templates are not blank
c) You entered the template names exactly (no trailing space etc.)
d) Create the templates in all styles if it still does not work..
Your problem is very likely related to either of these..
dprice
07-17-2002, 01:50 AM
That was the problem, thanks!
I am using a CUSTOM template and when I added the templates above, they were added in the DEFAULT templates, which I was not using.
So I merely moved them to my custom templates.
Thanks again my friend!
tractor-beam
07-17-2002, 06:16 PM
Great hack! Quick question:
Can I add either the "$birthday_children[username]" or "$birthday_children[user]" to the title in the new thread, such as:
$title = "Happy Birthday " .$birthday_children[username]."!"
Thanks!
- Gerry
Logician
07-17-2002, 09:19 PM
Originally posted by tractor-beam
Can I add either the "$birthday_children[username]" or "$birthday_children[user]" to the title in the new thread, such as:
$title = "Happy Birthday " .$birthday_children[username]."!"
Gerry, greeting thread is not seperate for each user. Instead one thread is created per day regardless of birthday number, so you cant use user name in thread title..
Heineken77
07-18-2002, 03:14 AM
Sweet, installed and no errors this time! You were right about MySQL being down..I've noticed from time to time I'll get an error .. hit refresh and it's fixed. Must be some host/server related issues.
Unfortunately I installed this 10 mins after 12am :( So have to wait 24 hours .. but sure it will work :D
Thanks again bro!
Heineken
Peace
09-05-2002, 05:10 PM
The thread is posting in the wrong forum. Which file do I go into to change the forum number? Thanks.
Logician
09-05-2002, 05:18 PM
Originally posted by Peace
The thread is posting in the wrong forum. Which file do I go into to change the forum number? Thanks.
in index.php:
// If you choose to create a new thread in your board, enter the forum id:
$greetings_forum = 2;
Peace
09-06-2002, 01:10 AM
Thanks.
love this hack. I only had 1 problem of multiple messages to the same member being sent, but I already found the solution here. Thanks! The members like it and so do I.
I'm thinking about using this to send calendar reminders. thanks again.
supa hack! but one request to change: i made in options that hack to make a thread, but i do not want to make thread for everybody birthday, i want to do it only for moderators... i look in options and see
$excluded_usergroups=array(''); but if i put some usergroup here they stop recive greetings and via email & PM as well. I just wont to turn thread creation only for moderators but want let email & PM creation for all groups.
P.S. Sorry for my english. I hope you got that i want... :classic:
Logician
12-04-2002, 12:43 PM
Originally posted by M.C.
supa hack! but one request to change: i made in options that hack to make a thread, but i do not want to make thread for everybody birthday, i want to do it only for moderators... i look in options and see
I understand what you want but sorry, it's not a 2 minute modification. Requires a change in hack's algorithm and moreover extensive testing to make sure it's working ok..
Logician, ok... but you will? :rolleyes: ;)
and one more improvement - can you add in email & PM URL of thread if created? :rolleyes:
Erwin
12-05-2002, 01:25 AM
Great hack, mate. Been using it for a few weeks, working great. The members love it.
Kars10
12-05-2002, 09:56 AM
Cool Hack!!
Thanks Logician!!
/me klicks installed!
Littlebit
12-05-2002, 10:07 PM
Hi guys,
I want to double check...if I'm in time zone -5 and my server is -7, I enter -2 in the $timeset ?
Thank you for sharing a great hack btw!
Logician
12-06-2002, 08:59 AM
Originally posted by Littlebit
Hi guys,
I want to double check...if I'm in time zone -5 and my server is -7, I enter -2 in the $timeset ?
Thank you for sharing a great hack btw!
if you set it to 0, greetings will be sent close to 12:00 AM server Time. If it's +1, it's 1:00 AM server time. According to this rule, you can set whatever you like.. ;)
Littlebit
12-06-2002, 01:26 PM
so if I have it at -2 it will just send them out a bit early? maybe I should just leave it at 0 huh :)
Logician
12-06-2002, 02:16 PM
it depends according to which time zone (yours? server?) you want the hack to run and at what time exactly.
If you leave it as 0, it will run close to 00:00 AM server time and 2:00 AM your time..
it's your call anyway..
Littlebit
12-06-2002, 05:50 PM
I understand now :) I was thinking too hard about it. lol
Okiewan
12-30-2002, 05:30 AM
Very cool hack Logician!
Question about the .wav hack... installed and tested, plays, but it loops continuously and each time the forumhome is visited. ?
Logician
12-30-2002, 07:58 AM
Originally posted by Okiewan
Very cool hack Logician!
Question about the .wav hack... installed and tested, plays, but it loops continuously
Looping should be a browser issue. For Internet Explorer (4+) "PLAYCOUNT=1" commands makes sure it play once. For Netscape "LOOP=2" does the same. So using both should ensure it plays once in both Netscape and IE. I remember I had tested it before releasing and it was playing once here. But if you have another browser like Opera or Mozilla (or different versions of IE, Netscape), I don't know how they'd behave.
and each time the forumhome is visited. ?
Yes that's true. Unfortunately there is no easy way for the script to know it already played the song for this user before, so it plays in every visit of forum home if day is user's birthday..
gopherhockey
01-13-2003, 04:20 AM
I had a strange thing happen to me tonight. I installed the hack on my Windows 2k test server (an offline server I use to test hacks before putting them on my public server - both are identical, but one is on win2k and one is on freebsd).
Anyway - I installed the hack, did all the sql stuff, date verified etc. - I did this around 11:30pm.. so, I only had to wait 30 minutes and figured maybe something would happen.
Sure enough, I got a popup, a ton of PMs, and a TON of forum posts. This on a forum with only 50 some odd users.
What happened was that a message was generated to EVERY user and a forum message was also posted for every user.
What could have caused this? What a mess - boy, I'm glad I don't have that many users yet, even on my test system. I'm concerned that I had it set to option 6 and some emails may have also been generated - even on my test system, they would have gone out (confused users tomorrow)
What could cause this? I do'nt want to post this on my production system until I figure this out.
I verified the date I put in my sql query and it was accurate...
Hmmm...
?
Just FYI: I'm running version 2.2.9 in case that matters. Also, here is one of the Greeting Reports:
-----------
Daily Birthday Greetings Report
Birthdays for day (2002-09-22) celebrated at January 13, 2003, 12:00 am (Server Time)
Members who have birthday:
* ShaneK(30)1972-09-22 [Email Sent] [Thread Created]
Thread : http://www.devserver.com/forums/showthread.php?threadid=103
----------------------------------
Logician Auto Email/PM Birthday Greeting Hack
Logician
01-13-2003, 08:06 AM
Hi gopherhockey,
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 :
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..
gopherhockey
01-13-2003, 12:26 PM
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/showthread.php?threadid=106
----------------------------------
Logician Auto Email/PM Birthday Greeting Hack
Logician
01-13-2003, 05:41 PM
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:
$n_year= date("Y", mktime (0,0,0, $n_month1, $n_day1, $n_year1));
After that add:
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:
SELECT * FROM timetick WHERE action='birthday' LIMIT 1
gopherhockey
01-13-2003, 06:00 PM
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.
Logician
01-13-2003, 06:14 PM
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:
$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:
//$todays_date1=vbdate("Y-m-d",time());
gopherhockey
01-13-2003, 07:51 PM
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)
gopherhockey
01-14-2003, 04:10 AM
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.
Logician
01-14-2003, 06:41 AM
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.. :)
gopherhockey
01-14-2003, 04:59 PM
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...
Intex
01-28-2003, 04:53 AM
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?
Logician
01-28-2003, 10:19 AM
Originally posted by Intex
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.
Sounds like a template problem. You can
1- make sure templates are created and their names are exact (check CAPS too!)
2- Create the templates in all template sets, if you have more than one..
Either one should fix the problem.. :glasses:
Okiewan
01-28-2003, 10:23 AM
It occassionaly leaves-out the names in posts on my board as well.
Logician
01-28-2003, 11:12 AM
Originally posted by Okiewan
It occassionaly leaves-out the names in posts on my board as well.
if you mean it does not congratulate the birthday for some members this is related to $excluded_usergroups settings. By default usergroup 3 is set to be ignored so if member is from usergroup 3 (ie waiting for email confirmation), hack will ignore them..
Change the settings if you want otherwise..
Okiewan
01-28-2003, 11:16 AM
Not the problem... it leaves ALL names out, meaning, a blank post. Seems to do it every few days.
NuclioN
01-28-2003, 11:33 AM
Fatal error: Cannot redeclare make_seed() in /www/global.php(321) : eval()'d code on line 323
???
Logician
01-28-2003, 11:55 AM
Originally posted by NuclioN
Fatal error: Cannot redeclare make_seed() in /www/global.php(321) : eval()'d code on line 323
???
You have another hack that uses the same function. Just delete these line from my hack code to avoid the clash:
function make_seed()
{
list($usec, $sec) = explode(' ', microtime());
return (float) $sec + ((float) $usec * 100000);
}
it leaves ALL names out, meaning, a blank post. Seems to do it every few days.
Do you have admin notification on? Turn it on and see if its content is also blank or not? Also try to create templates in all templates sets if you have more than 1..
NuclioN
01-28-2003, 12:28 PM
Tnx Logician, it works. :) Clicks install
Intex
01-28-2003, 06:19 PM
I actuallly cut and paste the text titles etc. so those should be ok. However I do have two templates and I didn't copy the template to both. Since you mentioned it, I reckon that must be the answer :).
Thx. m8 and keep up the cool hacks.
Originally posted by Logician
Sounds like a template problem. You can
1- make sure templates are created and their names are exact (check CAPS too!)
2- Create the templates in all template sets, if you have more than one..
Either one should fix the problem.. :glasses:
ChurchMedia
01-30-2003, 05:45 PM
Fantastic hack! I had been emailing users on thier birthdays. Now it's automatic!
I'd like to give them a "birthday present" of 50 points (Lesane's store hack). I know the code is:
$DB_site->query("UPDATE user SET storep=storep+50 where userid='$userinfo[userid]'");
But I'm not sure where to put it in the index.php file. Any help?
Logician
01-31-2003, 08:39 AM
I'd like to give them a "birthday present" of 50 points (Lesane's store hack). I know the code is:
I see.. This should work:
edit hack code (index.php), find:
$celebrated_at_least_one++;
After that add:
$DB_site->query("UPDATE user SET storep=storep+50 where userid='$birthday_children[userid]'");
Enjoy..
ChurchMedia
02-02-2003, 09:07 PM
I'm using vbHome and I have the birthday thread going to the forum for my vcHome page articles. Curiously, the thread shows up on the page, but not the contents of the post.
Example is here: www.churchmedia.net/community/index.php
(I'm working on other vbhome bugs, BTW). Any ideas?
Other than that, the hack is working perfectly and the points addon is great! Fantastic work! :)
Logician
02-03-2003, 09:52 AM
Originally posted by ChurchMedia
I'm using vbHome and I have the birthday thread going to the forum for my vcHome page articles. Curiously, the thread shows up on the page, but not the contents of the post.
The threads created by my hack are just regular vb threads so are not technically different than other vb threads in anyway.
I don't know vbHome hack, never used it nor checked its code so I don't know why they clash but it's certain that it's not accepting "regular" vb threads as articles and requiring some modifications in them to assign them article status.
Sorry this is all help I can offer..
ChurchMedia
02-03-2003, 01:12 PM
Thanks... I'll check with Teck on his hack and see if he has any ideas. Threads posted manually seem to work. I don't know why a thread created automatically wouldn't... :confused:
My members are getting birthday greetings sent to them when their birthdays are months away! :( Help :(
Logician
02-12-2003, 06:48 PM
Originally posted by Sue
My members are getting birthday greetings sent to them when their birthdays are months away! :( Help :(
Did it happen once at the first run of the hack (then it should be related to the wrong applience of installation step 2, very likely month-date order) or do you experience this problem constantly everyday? You can set the hack to debug mode (so members will not get notifications), turn on admin notification and monitor it for a while to make sure if it's a constant problem..
Erwin
02-13-2003, 04:24 AM
Working great so far! Had to make minor changes to incorporate the last title of homepage hack, but it works great!
Originally posted by Logician
Did it happen once at the first run of the hack (then it should be related to the wrong applience of installation step 2, very likely month-date order) or do you experience this problem constantly everyday? You can set the hack to debug mode (so members will not get notifications), turn on admin notification and monitor it for a while to make sure if it's a constant problem..
I set it to debug mode after I realized what was happening. :eek:
I'll take a look @ the date thingie and see what's up.
This is what I have in my timetick table:
id action leftdate leftid
1 birthday 2003-02-13 0
Logician
02-13-2003, 04:51 PM
Originally posted by Sue
This is what I have in my timetick table:
id action leftdate leftid
1 birthday 2003-02-13 0
It looks all right. If your server time is also correct, I strongly believe, the hack should work ok from now on. Please keep an eye on admin notifications..
If it's ok for a few days, this means initial date (step 2) was set wrongly in the installation. You can then turn off debug mode..
tkeil69575
02-20-2003, 04:13 AM
hi logician,
super hack :)
is there a way to display the european date format in the thread e.g. 24.02.2002 after the age?
regards tina
Logician
02-20-2003, 08:47 AM
is there a way to display the european date format in the thread e.g. 24.02.2002 after the age?
Not tested but should work:
Find this:
$greeting_thread.=" * ."]".$birthday_children[username]." ($bburl/member.php?s=&action=getinfo&userid=".$birthday_children[userid)";
if ($birthday_children[yas]!='-') {$greeting_thread.="(".$birthday_children[yas].")";}
$greeting_thread.=" ".$birthday_children[birthday]." \n";
and replace it like this:
if ($birthday_children[birthday] == '0000-00-00') {
$birthday321 = "N/A";
} else {
$bday = explode("-",$birthday_children[birthday]);
if (date("Y")>$bday[0] and $bday[0]>1901 && $bday[0]!='0000') {
$birthday321 = @date($calformat1,mktime(0,0,0,$bday[1],$bday[2],$bday[0]));
} else {
// lets send a valid year as some PHP3 don't like year to be 0
// $calformat2 should not contania year identifier so the year doesn't matter
$birthday321 = @date($calformat2,mktime(0,0,0,$bday[1],$bday[2],1993));
}
if ($birthday321=="") {
$birthday321 ="$bday[1]-$bday[2]-$bday[0]";
}
}
$greeting_thread.=" * ."]".$birthday_children[username]." ($bburl/member.php?s=&action=getinfo&userid=".$birthday_children[userid)";
if ($birthday_children[yas]!='-')
{
$greeting_thread.="(".$birthday_children[yas].")";
}
$greeting_thread.=" ".$birthday321 ." \n";
tkeil69575
02-21-2003, 10:27 AM
works great / thank you logician
tina :)
Sliderx
03-04-2003, 12:01 PM
thx logician for that greet hack
refertech
03-05-2003, 01:21 AM
Logician dont let this go to your head but your to damn smart man. Wow what a cool hack.
Mark
saw this back at the top and thought I'd chime in again. Love this hack and it's been working great. The members get a kick out of it and I love how it works.
I recently went thru this hack and the email congratulation post count hack and adjusted the vars so they were the same then made the vars settable via the cp. the damn admin notify pms were driving me crazy and I forgot that you could just switch them off :)
jancarlo
03-23-2003, 03:38 PM
su vb 230 ogni 15 minuti arrivano gli auguri in pm :( e 24 ore prima :(!!!
???
jancarlo
on vb 230 every 15 minuteren the auguries in pm arrive :( and 24 hours
before :( !!!
???
jancarlo
Logician
03-23-2003, 10:19 PM
Yesterday at 07:38 PM jancarlo said this in Post #136 (https://vborg.vbsupport.ru/showthread.php?postid=371966#post371966)
on vb 230 every 15 minuteren the auguries in pm arrive :( and 24 hours
before :( !!!
jancarlo I'm not sure I understood your problem, but if timing of the greetings were incorrect, change $timeset variable's value..
jancarlo
03-26-2003, 01:49 PM
wowwwwwww grazie tutto ok!!! su vb230 ;)
ciao
jancarlo
wowwwwwww thanks all ok!!! on vb230;)
hello
jancarlo
Intex
03-28-2003, 04:40 PM
Logician - In your readme file you have vbulletin's website scrollable in the window. Just out of curiosity how did you do that?
Logician
03-28-2003, 06:42 PM
Today at 08:40 PM Intex said this in Post #139 (https://vborg.vbsupport.ru/showthread.php?postid=374589#post374589)
Logician - In your readme file you have vbulletin's website scrollable in the window. Just out of curiosity how did you do that?
It's an iframe.. eg.
<iframe name="cwindow" style="border:0" width=800 height=400 src="https://vborg.vbsupport.ru/showthread.php?threadid=38489"></iframe>
maestrosdelweb
04-23-2003, 11:37 AM
For next vertion, How about a birthday cake showing next to the birthday user in all threads and memberlist??
dede1
05-12-2003, 06:18 AM
Hi
I have chop built in that 2.3.0 however nothing happened neither a
P.M/Mail am sent away nor the birthday in the forum registered.
Does someone know advice?
Logician
05-12-2003, 07:12 AM
play with:
// Your estimated daily visitor number for the board (main page only!)
// If the hack sometimes sends the greetings late, lower the number.
$estimated_load=30;
and lower it..
dede1
05-12-2003, 09:06 AM
Ok thanks
dede1
05-12-2003, 10:23 AM
Thanks that was it runs now it :classic:
OmaniMan
05-27-2003, 12:57 AM
Great .... Interesting
Alien
05-27-2003, 08:54 PM
Very very nice work... I have it installed now, just have to test it!
-Jason
monstergamer
06-26-2003, 07:12 AM
testing it now
gmarik
06-26-2003, 09:08 AM
Nice to see this.
Well done, brother.
monstergamer
06-26-2003, 09:17 PM
i did the debug mode and it sent me over 100 pm's of the same people
how do i make it stop
*in scared voice - please make it stop*
Logician
06-27-2003, 06:40 AM
Getting a lot of notifications happens if you applied STEP2 wrongly and entered a wrong date or in a wrong format. So the hack wouldn't know your real installation date and in the first run will greet birthdays starting from your wrongly entered date until today (thus will produce a lot of greetings.)
It will stop "today"'s date is reached so it is safe to assume that the date in the database is correct now. Thus you shouldn't have any problems from now on. It will go on greeting normally from now on as date is now ok. But if you want to make sure, run this query and confirm date is today or yesterday:
SELECT leftdate from timetick where action='birthday';
If you want to remove the hack, you can simply delete the hack code you inserted in index.php. This will uninstall (and stop) the hack.
interfx
07-13-2003, 11:28 AM
I installed this, and appears I did everyhting correct... I set it to option 3 (ADMIN)...
How do I know if it is working??? What do I have to do?
Thanks for your help... (I'm sure it is obvious)
InterFX
Logician
07-13-2003, 11:46 AM
if you turned on DEBUG option (ie 3), set admin notification ON and enter your email so that you can get greeting report from the hack. (Also make sure you have a few birthdays in the following days). If you get birtdays report ok and hack seems that it is greeting birthdays (actually it does not, as debug mode is on!), you can turn off debug mode. :)
interfx
07-14-2003, 09:03 PM
Still never got anyhting (email)
Here's my main settings
$greeting_type=3;
$admin_report=2;
I also entered my correct email...
Also adjusted the load to
$estimated_load=10;
I added the right SQL stuff, and added directly into the index.php inside of Vbulletin... Any other things I should look for to amke this work??? I'm afraid to turn on live, if the debug is not working correctly...
Thanks for any suggestions out there...
INterFX
Logician
07-15-2003, 07:24 AM
Today at 01:03 AM interfx said this in Post #154 (https://vborg.vbsupport.ru/showthread.php?postid=417764#post417764)
Still never got anyhting (email)
Here's my main settings
$greeting_type=3;
$admin_report=2;
I also entered my correct email...
Also adjusted the load to
$estimated_load=10;
I added the right SQL stuff, and added directly into the index.php inside of Vbulletin... Any other things I should look for to amke this work??? I'm afraid to turn on live, if the debug is not working correctly...
Thanks for any suggestions out there...
INterFX
Run this query and confirm date is today or yesterday:
SELECT leftdate from timetick where action='birthday';
If date is today or yesterday it means that hack is working ok.
So why don't you get admin report emails? This is most probably because there some problems about templates. Here is a check list:
* Check all templates are created successfully
* Check template names are correct (CASE - SENSITIVE!!)
* Check there are no trailing space or something in template names
* If you have more than 1 template sets, make sure you created hack templates in your ALL sets.
interfx
07-15-2003, 08:48 AM
I tried a few things, and it now seems to be working fine...
I had to lower the estimated load time from 30 to 10 to finally 5... At 5 it finally worked... I'm not sure what this really means - but others out there - go ahead and lower it right away to see if it makes it work correctly...
Thanks for all of the help -
InterFX
Logician
07-15-2003, 09:15 AM
if hack didnt work for 3 days altough your estimated load was 10, it means that you have less than 10 visitors a day in your forum home page or testing the script in localhost or testboard so never got visitors in the homepage to initiate the hack.
Cant wait to try it out. *Clicks Install*
Strange, I installed this and for some reason I can not post polls anymore on the site. I have not installed any other hacks or anything and the polls worked fine before. The hack works great, but I need my polls back, any ideas?
Aaron1
08-26-2003, 07:59 AM
Great Hack!
But is it also possible that the automatic birthday greeting thread adds a birthday greet Post into (a specified) Birthday thread? I think a new Birthday Greet Thread each day is a bit too much though.
Thanks in advance for helping!
Logician
08-26-2003, 03:36 PM
08-18-03 at 12:02 AM dano said this in Post #159 (https://vborg.vbsupport.ru/showthread.php?postid=426660#post426660)
Strange, I installed this and for some reason I can not post polls anymore on the site. I have not installed any other hacks or anything and the polls worked fine before. The hack works great, but I need my polls back, any ideas?
I'm safe to say that this can not be related to this hack. It has nothing to do with polls of vb, nor changes any poll related codes.
buro9
10-14-2003, 06:55 PM
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 (https://vborg.vbsupport.ru/showthread.php?postid=260201#post260201))
* 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 (https://vborg.vbsupport.ru/showthread.php?s=&postid=260006#post260006)
* New Added Feature: You can change his style in the day user has his birthday. Check here (https://vborg.vbsupport.ru/showthread.php?postid=260203#post260203))
* New Added Feature: You can play Happy Birthday Song to your members in their birthdays. Check here (https://vborg.vbsupport.ru/showthread.php?s=&postid=262074#post262074)
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 (https://vborg.vbsupport.ru/misc.php?s=&action=install&threadid=39663), thank you..
Logician \\=^))
I've noticed that the hack stopped working on my site a little while ago.
The last timetick was about two months ago.
I've examined the code and the problem appears to be in the seeding of rand.
After a certain version of PHP this is no longer needed... and doing so seems to make PHP only return the maximum from rand.
So... where rand should have been producing a number between 1 and 6 (in my case)... it only ever produced 6... but you need a value of 1 to run Logicians code.
The solution... is merely to remove the make_seed function and the seeding of srand from the beginning of the hack.
BUT... only do this if you're affected by it.
Logician
10-14-2003, 08:17 PM
I've noticed that the hack stopped working on my site a little while ago.
The last timetick was about two months ago.
I've examined the code and the problem appears to be in the seeding of rand.
After a certain version of PHP this is no longer needed... and doing so seems to make PHP only return the maximum from rand.
So... where rand should have been producing a number between 1 and 6 (in my case)... it only ever produced 6... but you need a value of 1 to run Logicians code.
The solution... is merely to remove the make_seed function and the seeding of srand from the beginning of the hack.
BUT... only do this if you're affected by it.
thanks for letting us know and it will be also helpful if you mention your PHP version :)
psico
01-03-2004, 11:20 AM
Hi.
I have a serious problem with this hack, since 1/1/04 my users receive mails and PM's greetings without stopping. The hack is not sending or creating new threads since 31/12, just looping the mails and PMs for the 1/1 birthdays.
Please anyone can help me?
Sorry for my english.
Psico.
CaptChill
01-16-2004, 11:36 AM
I installed the hack but I receive the following email with SQL Error. I'm sure it is something simple but I can't seem to find it. Thanks
Invalid SQL: SELECT userid, username, birthday, email, receivepm FROM user WHERE birthday LIKE '%-01-16' AND usergroupid!='3'
mysql error: Unknown column 'receivepm' in 'field list'
I have VB Version 3 rc 2
Logician
01-16-2004, 06:52 PM
mysql error: Unknown column 'receivepm' in 'field list'
I have VB Version 3 rc 2
uhh this hack is NOT for VB3! :speechless: Please uninstall ASAP! :)
Besides you dont need it so badly, because VB3 already have a birthday greeting mailing as a default feature. You can find it under CRON management section.. ;)
CaptChill
01-19-2004, 02:22 AM
OOPS...Thanks, Logician
Hi Logician,
I am testing this on my laptop test server, and after running the SQL command in part 1, you say i should get "SQL ... Run Successfully!" but i didnt any message at all?
Should i continue or is there a problem.
Im using it in vB2.3.0
Thanks
actually, i have continued with the hack and i didnt get any indication that the command was actioned. There was no "todays date" to confirm that it was done ok. but there was no error either???
Please help, thanks
I get this error
Database error in vBulletin 2.3.0:
Invalid SQL: SELECT * FROM timetick WHERE action='birthday' LIMIT 1
mysql error: Table 'forum.timetick' doesn't exist
mysql error number: 1146
Date: Friday 01st of October 2004 10:53:06 PM
Script: http://localhost/forum/forum_wip/
Referer:
Logician
10-01-2004, 01:27 PM
I get this error
You can use any SQL running tool to apply these SQL commands. For instance use phpmyadmin. Apparently logician_query.php didn't run it for somereason.
You can use any SQL running tool to apply these SQL commands. For instance use phpmyadmin. Apparently logician_query.php didn't run it for somereason.
Hi Logician,
I tried running the script in PhpMyAdmin but i couldnt see any response either, so it could be a MySQL setting, however i did notice that the error says that the script is located at "http://localhost/forum/forum_wip/" which is also incorrect, it is located at http://localhost/forum_wip/admin/
So could this assist in determining where the issue is?
Thanks
This is what PhpMyAdmin says:
Error
The additional Features for working with linked Tables have been deactivated. To find out why click here.
Which links to the below message.
PMA Database ... not OK[ Documentation ]
General relation features Disabled
How can i enable this???
Thanks
Logician
10-02-2004, 05:47 AM
This is what PhpMyAdmin says:
Error
The additional Features for working with linked Tables have been deactivated. To find out why click here.
Which links to the below message.
PMA Database ... not OK[ Documentation ]
General relation features Disabled
How can i enable this???
Thanks
This is not a hack problem, you have a MYSQL configuration/installation problem. Please fix it first. You can try searching the error in google. Also this can help:
http://forums.devside.net/viewtopic.php?t=198
Hi Logician, I was able to load your queries through phpMyAdmin.
I believe the problem lies in the configuration rather than the installation.
But for now, i think im ok since i could load your queries via phpMyAdmin (unless you tell me thats not possibe)
Already Clicks install. (just using it on my test setup for now!)
thanks for your help!
Takamine334
10-28-2004, 10:13 PM
is this available for 3.0.3?
Takamine334
10-28-2004, 10:14 PM
nevermind
bigdaddy04
10-31-2004, 11:17 AM
Anyone try this with vB 2.3.5?
Thanks.
TruthElixirX
02-26-2005, 12:56 AM
Database error in vBulletin 3.0.5:
Invalid SQL: SELECT userid, username, birthday, email, receivepm FROM user WHERE birthday LIKE '%-02-25' AND usergroupid!='3'
mysql error: Table 'vbulletin.user' doesn't exist
mysql error number: 1146
Date: Friday 25th of February 2005 09:54:26 PM
Script: http://www.punktek.com/forums/?
Referer: http://www.punktek.com/?
Username: Chris
IP Address: 162.40.130.58
MySql Error....Crud
EDIT:: I refreshed and it worked. Also could this have screwed with my member pages? Whenever some looks at the member list and tries to click on someon'es profile they/me get a blank page.
EDIT 2:: I have found the problem! This is a Vb2 mod...I'm running Vb 3. God..-_-. I can't frigging believe this.
*Goes to uninstall*
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.