Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 08-16-2004, 04:20 PM
vonedaddy's Avatar
vonedaddy vonedaddy is offline
 
Join Date: Jan 2004
Posts: 96
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Limit posts per thread

Is there a way I can limit the amount of posts in a certain time frame someone can post to a particular thread??? In other words say I want to limit a user names bob to only be able to post in the same thread once every day is that possible??

Can that be possible?
Reply With Quote
  #2  
Old 08-16-2004, 04:37 PM
Colin F's Avatar
Colin F Colin F is offline
 
Join Date: Jul 2004
Location: Switzerland
Posts: 1,551
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by vonedaddy
Is there a way I can limit the amount of posts in a certain time frame someone can post to a particular thread??? In other words say I want to limit a user names bob to only be able to post in the same thread once every day is that possible??

Can that be possible?
Sure it's possible.

Add a check with something like this in your newreply.php

$lastpost = $DB_site->query_first("SELECT dateline FROM post WHERE threadid = $thread[threadid] AND userid = $bbuserinfo[userid]");
if (vbdate("Ymd", $lastpost[dateline]) == vbdate("Ymd"))
{
eval(print_standard_error('error_posttoday'));
}

you would have to add an errorphrase "error_posttoday".

Also, enclose the whole thing with a check if it's the forum or thread you want.
Reply With Quote
  #3  
Old 08-17-2004, 03:30 AM
vonedaddy's Avatar
vonedaddy vonedaddy is offline
 
Join Date: Jan 2004
Posts: 96
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I appreciate the help but I dont know if I am good enough with PHP to do this... I would be willing to pay someone to make a hack for me that I can use from my admincp or something.
Reply With Quote
  #4  
Old 08-17-2004, 04:02 AM
Colin F's Avatar
Colin F Colin F is offline
 
Join Date: Jul 2004
Location: Switzerland
Posts: 1,551
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'll contact you per PM then
Reply With Quote
  #5  
Old 08-21-2004, 06:07 AM
Gholsie Gholsie is offline
 
Join Date: Nov 2001
Posts: 72
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there a way to limit the posts per hour, per thread? I'd like to set up a user so he can only post once per hour per thread instead of an entire day.
Reply With Quote
  #6  
Old 08-21-2004, 06:29 AM
Colin F's Avatar
Colin F Colin F is offline
 
Join Date: Jul 2004
Location: Switzerland
Posts: 1,551
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Add a check like this:

$lastpost = $DB_site->query_first("SELECT dateline FROM post WHERE threadid = $thread[threadid] AND userid = $bbuserinfo[userid]");
if (vbdate("YmdH", $lastpost[dateline]) == vbdate("YmdH"))
{
eval(print_standard_error('error_posttoday'));
}

this wil allow users to post at 10.55 AND at 11.05 though. Just not again till 12.xx
Reply With Quote
  #7  
Old 09-11-2004, 03:32 AM
pran's Avatar
pran pran is offline
 
Join Date: Dec 2001
Location: Caloocan, PH
Posts: 65
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Colin F
Add a check like this:

$lastpost = $DB_site->query_first("SELECT dateline FROM post WHERE threadid = $thread[threadid] AND userid = $bbuserinfo[userid]");
if (vbdate("YmdH", $lastpost[dateline]) == vbdate("YmdH"))
{
eval(print_standard_error('error_posttoday'));
}


this wil allow users to post at 10.55 AND at 11.05 though. Just not again till 12.xx
Hi, I'm getting
Code:
Invalid SQL: SELECT dateline FROM post WHERE threadid =  AND userid = 2
mysql error: You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND userid = 2' at line 1
when I used your code. It doesn't seem to get the threadid variable from PHP.
Reply With Quote
  #8  
Old 09-11-2004, 08:44 AM
Colin F's Avatar
Colin F Colin F is offline
 
Join Date: Jul 2004
Location: Switzerland
Posts: 1,551
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

funny... I guess you don't have table prefixes, do you?

You might try this:

$lastpost = $DB_site->query_first("SELECT dateline FROM post WHERE (threadid = $thread[threadid]) AND (userid = $bbuserinfo[userid])");
Reply With Quote
  #9  
Old 09-22-2004, 11:17 AM
blackshadowc4p blackshadowc4p is offline
 
Join Date: May 2004
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I need something a little different. We have a validation period were all posts from a user are validated before going to the board.

We have a Polls forum, and some of the validating users try to scape the period by posting there a lot.

I want to allow just 1 post on the whole Poll forum per day for all users that are on a particular usergroup (in my case Validating Members).

Is this possible? If yes, how?

Thanks.
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 03:12 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.07019 seconds
  • Memory Usage 2,241KB
  • 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
  • (1)bbcode_code
  • (2)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