PDA

View Full Version : Send email on user's X post


Koutaru
10-24-2004, 02:35 AM
I think it would be kind to send an email to a user whenever they pass an important post mark (ex 100, 500, 1000, 2000, etc)

I would code this myself but I'm not too familiar with the vbmail system :p
I'm sure it's a quick hack

Anyone interested ;)

Thanks!
Kou

Polo
10-25-2004, 03:35 PM
yeah, sounds cool... i would like something like this too :)

M1th
10-25-2004, 03:55 PM
I think it would be kind to send an email to a user whenever they pass an important post mark (ex 100, 500, 1000, 2000, etc)

I would code this myself but I'm not too familiar with the vbmail system :p
I'm sure it's a quick hack

Anyone interested ;)

Thanks!
Kou

It's the conditional check that you should be worried about. If thats sorted then its as easy as inserting a line of code to email the user.

Just to give you an idea:

functions_newpost.php

add a conditional to check for number of users post.
if post = xx then vbmail($touser['email'], $subject, $message);

Ianomed
10-25-2004, 10:33 PM
It's a pretty nice idea, indeed :)

It would be even nicer if you could administer the milestones these are sent on from the AdminCP, instead of them being hardcoded.

Similarly some admins may want to have a PM sent with the congrats, instead of an email. Or if the user chose to not receive email from administrators, in which case it could also revert to a PM.

Additionally, the actual text emailed/pm'd and the subject can be set from the AdminCP as well. Username and Post Count could be variables in this text so it can be personalised to a degree.

Would any of these extras be considered overkill, because I'm contemplating of writing this hack ;)

Koutaru
10-25-2004, 11:58 PM
It's the conditional check that you should be worried about. If thats sorted then its as easy as inserting a line of code to email the user.

Just to give you an idea:

functions_newpost.php

add a conditional to check for number of users post.
if post = xx then vbmail($touser['email'], $subject, $message);
It would be great if you made the hack :)

I was thinking about having right after updating the user's post count, it could have like

if bbuserinfo[posts] == 100, 200, 500, etc or have an array which users can edit
Then it would submit the email, otherwise if the condition is false, it will resume the script without sending the email.

The only part I couldn't exactly figure out was the vbmail part. The rest is pretty simple to set up :)