vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Email User when they've hit post count (https://vborg.vbsupport.ru/showthread.php?t=77864)

no1SomeGuy 03-10-2005 04:16 PM

Email User when they've hit post count
 
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

Quote:

Originally Posted by tnguy3n
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.
Code:

$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:
Code:

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/showthrea...939#post629939
You can discuss it with other coders.


All times are GMT. The time now is 12:52 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.01599 seconds
  • Memory Usage 1,725KB
  • 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_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)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