Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
  #1  
Old 03-10-2005, 04:16 PM
no1SomeGuy no1SomeGuy is offline
 
Join Date: Nov 2004
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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?
Reply With Quote
  #2  
Old 03-10-2005, 04:50 PM
tnguy3n's Avatar
tnguy3n tnguy3n is offline
 
Join Date: May 2003
Location: U of I, Iowa
Posts: 846
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

you can use schedule task to do the job.
Reply With Quote
  #3  
Old 03-11-2005, 02:11 PM
no1SomeGuy no1SomeGuy is offline
 
Join Date: Nov 2004
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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)
Reply With Quote
  #4  
Old 03-22-2005, 10:40 PM
no1SomeGuy no1SomeGuy is offline
 
Join Date: Nov 2004
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Anyone?
Reply With Quote
  #5  
Old 03-22-2005, 11:11 PM
tnguy3n's Avatar
tnguy3n tnguy3n is offline
 
Join Date: May 2003
Location: U of I, Iowa
Posts: 846
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here's the hack for ya. I've only tested it on localhost. You can change the logic and settings to fit your need.
Reply With Quote
  #6  
Old 03-23-2005, 12:50 AM
no1SomeGuy no1SomeGuy is offline
 
Join Date: Nov 2004
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #7  
Old 03-23-2005, 01:06 AM
tnguy3n's Avatar
tnguy3n tnguy3n is offline
 
Join Date: May 2003
Location: U of I, Iowa
Posts: 846
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #8  
Old 03-23-2005, 01:27 AM
no1SomeGuy no1SomeGuy is offline
 
Join Date: Nov 2004
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #9  
Old 03-23-2005, 12:58 PM
tnguy3n's Avatar
tnguy3n tnguy3n is offline
 
Join Date: May 2003
Location: U of I, Iowa
Posts: 846
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
Reply

Thread Tools
Display Modes

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 03:04 PM.


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.04002 seconds
  • Memory Usage 2,232KB
  • Queries Executed 11 (?)
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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (9)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete