Version: 1.00, by tnguy3n
Developer Last Online: Sep 2010
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.
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?
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.
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
// make the count to the numbers you want to identify!
$count_array=array(1000, 2000, 3000, 5000);
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...
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
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.