![]() |
Send User a PM on Birthday
Ok, I made a little hack to send users a PM on their Birthday.
Fixed First, make a new file, pmbday.txt, and chmod it to 777. Next open index.php and add this code: Quote:
If you have questions or comments, feel free to post them. |
great !!! thx for this hack !!
|
Thanks. I will be adding more hacks as I make them.
|
Why do i receive 17 pm's???
|
]LOL :D I have birthday only once a year... ;)
|
Hmm what happens if the user doesn't accept cookies?
Oh they get a pm for every view of index.php ;) |
]good idea for spamming.... :D ;)
|
I think this hack needs a switch to specify the birthday PM as having already been sent. :)
|
how about sending the PM when the system updates the birthday-templates once per day (first hit after midnight) ?
search for "if ($showbirthdays) {" in your index.php and for "function getbirthdays() {" in admin/functions.php I'd change the while-loop inside getbirthdays() to send the PM or create a new function wich is called from within that loop. Maybe You can create new templates for the message and the title and give fromuserid its own variable to let the admin decide which userid is the sender of this message. I'd make this changes on my own, but i don't have the time and melondog needs to learn ;) sneak |
Ok, I didn't realize this, it was a quick hack. I will have a fixed version for you guys soon. Thanks pwr_sneak for the tips.
|
It's all fixed guys. I hope there arn't anymore problems with it.
|
ok, this works now, but adds load to the server and doesn't work on forums, which use multiple boxes, but these problems are very special :)
Another problem could occur more often. Your hack won't work if a user got a pipe (|) in his username, better to use userid. My idea was, send all PM notifications just once a day on the first page-impression after midnight. Do do that add right after: while ($birthday=$DB_site->fetch_array($bdays)) { Code:
while ($birthday=$DB_site->fetch_array($bdays)) { |
All times are GMT. The time now is 05:02 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:
|