Go Back   vb.org Archive > vBulletin Modifications > Archive > Modification Graveyard
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
[Cronjob] Email Notification When Users Hit X Amount of Posts Details »»
[Cronjob] Email Notification When Users Hit X Amount of Posts
Version: 1.00, by tnguy3n tnguy3n is offline
Developer Last Online: Sep 2010 Show Printable Version Email this Page

Category: End-User Options - Version: 3.0.7 Rating:
Released: 03-22-2005 Last Update: Never Installs: 10
 
No support by the author.

As its title says, this code will automatically email a user once he/she hits a certain amount of posts. It may be useful for some boards which set Registered group have limited privileges and require XX posts to view the board globally...

It's been posted here, i make a duplicate here in case of other users need it.

It's fairly easy to install, just create a cronjob and let it do the job itself. You can set the cronjob to run hourly or every three hours or whenever you like.
DON'T FORGET TO CHANGE text message in Email Body Text + Email Subject Text to fit you site settings.

Installation Time: 2-3 mins (Easy)
New File: 1
Query: 1

Code:
ALTER TABLE user ADD promoemail TINYINT(1) DEFAULT '0' NOT NULL;
To change amount of posts, look for this line (in promoemail.php):
Code:
$promo_x_posts = 10;

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 03-23-2005, 03:31 PM
Polo's Avatar
Polo Polo is offline
 
Join Date: Jun 2004
Posts: 893
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice Thanks for sharing it with the community tnguy3n I was planning to use this hack to congratulate members everytime they reach an X amount of posts..

For example 1000 and the 2000... is it possible to accompolish this?
Reply With Quote
  #3  
Old 03-23-2005, 03:40 PM
tnguy3n's Avatar
tnguy3n tnguy3n is offline
 
Join Date: May 2003
Location: U of I, Iowa
Posts: 846
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yup, very possible. all you need to do is to change value 10 to 1000, and message in Email Body Text.
Reply With Quote
  #4  
Old 03-23-2005, 03:44 PM
Polo's Avatar
Polo Polo is offline
 
Join Date: Jun 2004
Posts: 893
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by tnguy3n
yup, very possible. all you need to do is to change value 10 to 1000, and message in Email Body Text.
yeah I know... but I was wondering if the message could be sent at different times like when a user reaches 1000 and then 2000....

thanks for the quick reply...
Reply With Quote
  #5  
Old 03-23-2005, 04:19 PM
tnguy3n's Avatar
tnguy3n tnguy3n is offline
 
Join Date: May 2003
Location: U of I, Iowa
Posts: 846
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The easiest way is to copy this file and rename it to a diff name, then upload it to /includes/cron, then add another schedule task to send email to users who reach 2000 posts.
Reply With Quote
  #6  
Old 03-23-2005, 05:13 PM
Polo's Avatar
Polo Polo is offline
 
Join Date: Jun 2004
Posts: 893
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by tnguy3n
The easiest way is to copy this file and rename it to a diff name, then upload it to /includes/cron, then add another schedule task to send email to users who reach 2000 posts.
oh... I see.. i dont know how I didnt thought of that thank you so much tnguy3n... this is will come in really handy for me
Reply With Quote
  #7  
Old 03-23-2005, 05:40 PM
nexialys
Guest
 
Posts: n/a
Default

simply modify your cronjob like:
PHP Code:
// make the count to the numbers you want to identify!
$count_array=array(1000200030005000);
if(
in_array($user[posts], $count_array))
{
  do 
the email!

... but i see in your cronjob that you make a different count... for Polo, my situation can help, but would need a different cron...
Reply With Quote
  #8  
Old 03-23-2005, 05:46 PM
Polo's Avatar
Polo Polo is offline
 
Join Date: Jun 2004
Posts: 893
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i was looking for sometning along those lines nexialys.. however since i'm not a coder..I will stick with tnguy3's suggestion for now.. thanks i appreciate it anyways
Reply With Quote
  #9  
Old 03-23-2005, 06:21 PM
nexialys
Guest
 
Posts: n/a
Default

to make it complete, we need 2 process:
1- tag the users that have a new count of 1000, 2000 etc when they post... (so in newthread.php and newreply.php)
2- in the cron, "SELECT" the users that are tagged and use the in_array() i posted just before...
2b- when selected and email is sent, untag the users...

this 1000, 2000 etc can be configured with a $vboptions[sometag] that we set in the admincp, so it can be used in all the scripts needed.
Reply With Quote
  #10  
Old 03-23-2005, 06:30 PM
Polo's Avatar
Polo Polo is offline
 
Join Date: Jun 2004
Posts: 893
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

are you telling me nexialys?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:20 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04495 seconds
  • Memory Usage 2,291KB
  • Queries Executed 23 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (1)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (8)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete