Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
  #1  
Old 06-03-2005, 03:30 AM
SFishy SFishy is offline
 
Join Date: Nov 2001
Location: NY
Posts: 188
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Automatically Close Threads after X Replies

Not per forum, not per day, not per week, not per member...

just a generic setting for the whole board... close any thread once it exceeds X number of replies -- or better -- when a member tries to reply to a post with X (the limit) number of replies already, it puts their reply as a new thread (and maybe gives them a message on screen that says it's doing so)...

Anyone know if something likes this exists?
Reply With Quote
  #2  
Old 06-03-2005, 04:04 AM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
just a generic setting for the whole board... close any thread once it exceeds X number of replies
This is easy.

In functions_newpost.php

FIND
PHP Code:
// update the thread if there are any conditions to update 
ABOVE that ADD
PHP Code:
if ($threadinfo['replycount'] == X])
{
    
$threadupdate[] = 'open = 0';

Reply With Quote
  #3  
Old 06-03-2005, 04:42 AM
SFishy SFishy is offline
 
Join Date: Nov 2001
Location: NY
Posts: 188
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by KirbyDE
This is easy.

In functions_newpost.php

FIND
PHP Code:
// update the thread if there are any conditions to update 
ABOVE that ADD
PHP Code:
if ($threadinfo['replycount'] == X])
{
    
$threadupdate[] = 'open = 0';

Okay, that's easy enough...

but how about a message at the bottom of the page, or something, that indicates the post can't be replied to anymore?

Your code didn't exactly work... when I hit "reply" on a post that had reached the limit of X, all I got was a blank page.
Reply With Quote
  #4  
Old 06-03-2005, 11:28 AM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmm, does work just fine for me.

As for the message, put

Code:
<if condition="!$thread['open']">
This thread is closed and you cannot post any further replies
</if>
in Template SHOWTHREAD.
Reply With Quote
  #5  
Old 06-03-2005, 01:20 PM
SFishy SFishy is offline
 
Join Date: Nov 2001
Location: NY
Posts: 188
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm using version 3.0.7 and I tried it again and your code doesn't work. I cut and paste it exactly as per your instructions and when I hit "reply" on the post that has reached the limit I just get a blank white page.

I still like the idea of the thread splitting into a new thread .... someone has posted a while back they were going to try that hack... did anyone ever?
Reply With Quote
  #6  
Old 06-03-2005, 03:13 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am also using 3.0.7 and as said it works fine for me.
Anyone else to try?
Reply With Quote
  #7  
Old 06-03-2005, 04:11 PM
SFishy SFishy is offline
 
Join Date: Nov 2001
Location: NY
Posts: 188
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I tried it again, but it definitely doesn't work. I do have some hacks, but none of them include any modifications at all to the functions_newpost.php file. I tried putting your code ABOVE the "// update the thread if there are any conditions to update line", and even just to give it a shot, below that line. Same result both ways. Are you sure you cut and paste it here correctly? I'm not a php guru (by far) so if you had a little typo in there I might not notice it.

(and yes, I replaced "X" with the number I want to be the limit)
Reply With Quote
  #8  
Old 08-30-2005, 09:53 PM
VirtualBurn VirtualBurn is offline
 
Join Date: Nov 2003
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

could this be implemented to auto close a specific thread or threads in a category after 'x' amount of replies? maybe as a choice in forum manager.

In other words not a default setting for the whole board. Only certain Categories will be affected by this.
Reply With Quote
  #9  
Old 01-08-2006, 12:33 PM
peanut666 peanut666 is offline
 
Join Date: Feb 2003
Location: uk
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

if i want to make this only work on certian forums can i change if ($threadinfo for if ($forumid 1,3,4
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 07:55 AM.


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.04271 seconds
  • Memory Usage 2,242KB
  • Queries Executed 13 (?)
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
  • (4)bbcode_php
  • (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_postinfo_query
  • fetch_postinfo
  • 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