PDA

View Full Version : includes/cron/birthday.php hook?


lemarvelous
01-13-2009, 02:41 PM
I have a little script that generates a coupon for users celebrating birthdays. I think it's best to convert it to a plug-in, but I don't see a relevant hook to pull everything together. It needs to run for each user, so I think the hook should be within the loop in birthday.php that sends out each e-mail.

Can I just create a custom hook? Pardon me for asking, but I can't find where this is possible. From what I've read, it looks like I have to request a hook at vbulletin.com for inclusion in a later version. Hopefully, I'm wrong!

Thanks for your guidance,

Jen

Bellardia
01-13-2009, 03:13 PM
Why not just toss it inside the birthday cron?

lemarvelous
01-15-2009, 09:19 PM
That's where I have it now, works A-OK, but it's sort of a pain to cut and paste with each and every upgrade. Just looking for a cleaner solution. Thanks! :)

ragtek
01-15-2009, 10:15 PM
You could use the cron_complete hook.


if ($nextitem['varname'] == 'birthday')
{
the birthday cron was executed complete so generate coupon...
}


I think that should work