Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Max replies per week per user in specified forums Details »»
Max replies per week per user in specified forums
Version: 1.00, by VBDev VBDev is offline
Developer Last Online: Dec 2021 Show Printable Version Email this Page

Version: 3.0.0 Rating:
Released: 01-11-2004 Last Update: Never Installs: 6
 
No support by the author.

This hack allows the administrator to set in a specific (by editing it or by adding a new one) forum a maximum number of replies per week

and per user.
The week is defined as 7 days before the current date. There is no specific day for the beginning of the week. The week is so dynamic and a

member which has created too much posts during the last 7 days, will have to wait to be able to post again in this forum




Ce hack permet a l'administrateur de specifier dans le(s) forum(s) qu'il veut si une limite de posts par semaine et par membre doit etre

fix?e ou non.
La semaine correspond au 7 derniers jours, il n'y a pas de jour specifique pour le debut de la semaine. La semaine est donc dunamique et si

un membre a post? trop de posts pendant la derniere semaine, il devra attendre avant de pouvoir poster a nouveau.



Installation time : 10 min
Files to modify : 2
Phrases to add: 5
Template to modify: 1
Template to create : 1


I made this hack from an original idea of bigdaddy04 on vbulletin.org
:devious:

[HIGH]This hack has been released by VBulletinDev's team : http://www.vbulletindev.net

Ce hack a ete realis? par la team de VBulletinDev et est telechargeable en FR sur http://www.vbulletindev.net[/HIGH]

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 01-12-2004, 06:27 PM
VBDev's Avatar
VBDev VBDev is offline
 
Join Date: Jan 2004
Location: France
Posts: 2,570
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have tested it a little but can't have seen if all was OK during 1 week

I'm waiting your bug report if there are
Reply With Quote
  #3  
Old 01-15-2004, 05:49 PM
bigdaddy04 bigdaddy04 is offline
 
Join Date: Jan 2004
Posts: 60
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So you finally did it

2 questions:
1. Do you have a 2.3.x version of this?
2. If this is the hack I requested...I think I said threads, not replies

Thanks for your time bud, good to see you actually take me up on this idea.
Reply With Quote
  #4  
Old 01-20-2004, 07:01 PM
*arie's Avatar
*arie *arie is offline
 
Join Date: Jan 2004
Location: New Orleans {504}
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nice job.
Reply With Quote
  #5  
Old 06-06-2004, 08:39 PM
plauderer plauderer is offline
 
Join Date: Feb 2002
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

how can i make it that they only couldnt reply on threads anymore when limit is reached but still can post new threads ? because when limit is reached now they also couldnt post new threads and i only want to limit replys not new threads.
Reply With Quote
  #6  
Old 06-27-2004, 11:36 PM
sharjah sharjah is offline
 
Join Date: May 2002
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great hack .. I've been looking for this hack for sometime ... Thank you.
Is it possible to modify this hack to limit the number of replies per day?
Reply With Quote
  #7  
Old 08-05-2004, 03:51 PM
calvin.krause calvin.krause is offline
 
Join Date: Apr 2004
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by sharjah
Great hack .. I've been looking for this hack for sometime ... Thank you.
Is it possible to modify this hack to limit the number of replies per day?
Yes, in includes/function_newpost.php find this:

Code:
$temps_restant = time() - 604800;
604800 is the number of seconds that must elapse before the user can post again. You can change this value to whatever you want. There are 3600 seconds in one hour, so a 24 hour day is 86400.

However, remember to update your phrases to reflect if the limit is for an hour, a day, a week, etc., so your users don't get confused.
Reply With Quote
  #8  
Old 08-06-2004, 01:09 AM
calvin.krause calvin.krause is offline
 
Join Date: Apr 2004
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've noticed a small problem with this hack and am having trouble fixing it.

In the forumdisplay.php file, the code in question is below:

PHP Code:
$reponses $DB_site->query_first("SELECT COUNT(" TABLE_PREFIX "post.postid) AS rep_week FROM " TABLE_PREFIX "post, " TABLE_PREFIX "thread WHERE " TABLE_PREFIX "post.dateline>$temps_restant AND thread.forumid=$forumid AND " TABLE_PREFIX "post.threadid=" TABLE_PREFIX "thread.threadid AND " TABLE_PREFIX .  "post.username='$bbuserinfo[username]'"); 

The problem lies with the very end of the statement

PHP Code:
"post.username='$bbuserinfo[username]'"); 

Everything normally works great, until you have a user that has an ' in their username. For example: Bob'sAutoShop

PHP is gonna throw out an error because the string Bob'sAutoShop is going to end as soon as it see's the ' mark.

How do I need to format the code (the " and the ' marks) in order for this to work correctly? I want to keep my fix inside this line of code if at all possible, so I don't have to change much of the default vBulletin code.

Can you help me here? I'd GREATLY appreciate it if you could. Thanks!
Reply With Quote
  #9  
Old 08-07-2004, 01:16 AM
calvin.krause calvin.krause is offline
 
Join Date: Apr 2004
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by VBDev
I have tested it a little but can't have seen if all was OK during 1 week

I'm waiting your bug report if there are
Actually, I'm discovering that this hack doesn't actually stop users from making replies. It does keep members from being able to create new threads, but they can still reply on any thread in your forum. It will show you the number of posts allowed and the number that you have left. Members can continue to post even after they have exceeded the max amount.

Is there a way to modify this so that it keeps members from being able to reply?

Thanks!
Reply With Quote
  #10  
Old 08-07-2004, 12:03 PM
NetRover NetRover is offline
 
Join Date: Jul 2004
Posts: 123
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sounds useful, could this work to fit in with subscriptions also?

Waiting to see if anyone else says this does not stop replies even after the set limit.

Andy
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 02:49 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.04452 seconds
  • Memory Usage 2,299KB
  • Queries Executed 23 (?)
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)bbcode_code
  • (2)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete