View Full Version : Email User when they've hit post count
no1SomeGuy
03-10-2005, 04:16 PM
Is it possible, or is there code to automatically a user once he/she hits a certain amount of posts that they can be set a pre-defined email? We want to offer the users once they hit 100 posts a discount on the product the forum is related to. Is this possible?
tnguy3n
03-10-2005, 04:50 PM
you can use schedule task to do the job.
no1SomeGuy
03-11-2005, 02:11 PM
you can use schedule task to do the job.
How? A little more detailed...I was looking at that, but it seemed that you had to have the script written in a php file already (which I don't exactly know how to do)
no1SomeGuy
03-22-2005, 10:40 PM
Anyone?
tnguy3n
03-22-2005, 11:11 PM
Here's the hack for ya. I've only tested it on localhost. You can change the logic and settings to fit your need.
no1SomeGuy
03-23-2005, 12:50 AM
Works ... but a couple questions. From what I can tell in the code, it will email them if their post count is equal to xx on an hourly basis. Doesn't this mean that if they don't continue to post for a day, they will get like 24 emails? Or on the other side of things if they continue to post past 100 within an hour, they will not receive the email? Can this be fixed?
tnguy3n
03-23-2005, 01:06 AM
maybe add a column to user table, if the user hit 100 posts, the system will email and update the user table.
$DB_site->query("
UPDATE . TABLE_PREFIX . "user
SET promomail (non-exist) = '1'
WHERE username = '" . addlashes($username) . "'
");
Hope that helps
no1SomeGuy
03-23-2005, 01:27 AM
Sorry to ask so many questions (you are being a great help though) but what do I do with this code? And where do I put it? I haven't really worked with php/mysql stuff "that" much ... at least in the sence of coding it and the whole database php relationship. I am majoring in computer science though (second year right now) and we've mostly focused on C, C++, C# and Java but only c++ on a truely useful level. So a tad more explination could be helpful :) Basically what I have to change in the php file you attached, and what queries (exact copy/paste would be highly beneficial) to run on the database.
tnguy3n
03-23-2005, 12:58 PM
here's the fix.
Add one query to user table:
ALTER TABLE `user` ADD `promoemail` TINYINT( 1 ) DEFAULT '0' NOT NULL ;
re-upload and overwrite the existing file.
I've posted it as a hack here https://vborg.vbsupport.ru/showthread.php?p=629939#post629939
You can discuss it with other coders.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.