vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Send email on user's X post (https://vborg.vbsupport.ru/showthread.php?t=70929)

Koutaru 10-24-2004 02:35 AM

Send email on user's X post
 
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

Quote:

Originally Posted by Koutaru
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

Quote:

Originally Posted by M1th
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 :)


All times are GMT. The time now is 08:11 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
  • Page Generation 0.00924 seconds
  • Memory Usage 1,718KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete