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
Close threads after X replies Details »»
Close threads after X replies
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-10-2004 Last Update: Never Installs: 14
 
No support by the author.

This hack allow the administrator to set, in a forum, a limit of replies. So, with this hack, you can control easily the maximum number of replies in forums you want.

This hack can be usefull for example, if you have a 'Bug forum' and you don't want other members to reply, just you, and the thread to be close after.




Ce hack permet a l'administrateur du forum d'ajouter dans son panneau de controle admin d'ajouter des forums ou il peut controler le nombre de reponses avant la fermeture des posts dans ce forum.

Ce hack est en fait une evolution d'un hack que j'avais deja fait pour VB2 mais qui fermait les posts automatiquement apres 1 reponse.



Installation time : 4min
Templates to add : 0
Templates to modify : 0
Files to upload : 3
Files to modify : 2
Phrases to add : 5
Query to run : 2



: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
  #12  
Old 01-16-2004, 10:54 PM
PET's Avatar
PET PET is offline
 
Join Date: Jan 2002
Location: Timisoara/Romania
Posts: 305
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

where where ?
Reply With Quote
  #13  
Old 01-16-2004, 10:56 PM
VBDev's Avatar
VBDev VBDev is offline
 
Join Date: Jan 2004
Location: France
Posts: 2,570
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

In the first post of the tread
Reply With Quote
  #14  
Old 01-17-2004, 04:35 AM
bolynn bolynn is offline
 
Join Date: Jul 2002
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok instructions are unclear. I figured that I needed to run two separate SQL Queries and then add the phrases but this "and add above" thing is utterly confusing. If you'd be kind enougt to let us know UNDER what lines should we paste the additional code instead of the Above thing we may even succeed. Also I assume the setting options for this hack should show up in the Admin control panel but exactly where?

Bo
Reply With Quote
  #15  
Old 01-17-2004, 07:26 AM
gmarik's Avatar
gmarik gmarik is offline
 
Join Date: May 2002
Location: Mocsow
Posts: 1,288
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is fundamental
Reply With Quote
  #16  
Old 01-17-2004, 05:18 PM
bolynn bolynn is offline
 
Join Date: Jul 2002
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It may be but your command of the English language is not (no offence)

mili
Reply With Quote
  #17  
Old 03-16-2004, 06:45 PM
poetic poetic is offline
 
Join Date: Apr 2003
Posts: 125
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am getting a db error when doing things exactly as you stated.

SELECT fermeture FROM forum WHERE forumid =
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 '' at line 1

in private.php (Pulling the newpost.php)

and

newthread.php

SELECT replycount FROM thread WHERE threadid =
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 '' at line 1
Reply With Quote
  #18  
Old 03-21-2004, 02:31 PM
hawk hawk is offline
 
Join Date: Mar 2002
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

In the file includes/functions_newpost.php

replace :

PHP Code:
           //Fermeture apres X posts Grog6 VBulletinDEV
           
$fermeture $DB_site->query_first("SELECT fermeture FROM forum WHERE forumid = $foruminfo[forumid]");

           if (
$fermeture[fermeture] != "x") {
           
$reponses $DB_site->query_first("SELECT replycount FROM thread WHERE threadid = $threadinfo[threadid]");

           if (
$fermeture['fermeture'] <= ($reponses['replycount']))
            
$DB_site->query("UPDATE thread SET open= '0' WHERE threadid = '$threadinfo[threadid]'");
           } 

by

PHP Code:
           //Fermeture apres X posts Grog6 VBulletinDEV
           
$fermeture $DB_site->query_first("SELECT fermeture FROM " TABLE_PREFIX "forum WHERE forumid = $foruminfo[forumid]");

           if (
$fermeture[fermeture] != "x") {
           
$reponses $DB_site->query_first("SELECT replycount FROM " TABLE_PREFIX "thread WHERE threadid = $threadinfo[threadid]");

           if (
$fermeture['fermeture'] <= ($reponses['replycount']))
            
$DB_site->query("UPDATE " TABLE_PREFIX "thread SET open= '0' WHERE threadid = '$threadinfo[threadid]'");
           }

Reply With Quote
  #19  
Old 03-24-2004, 08:43 PM
VBDev's Avatar
VBDev VBDev is offline
 
Join Date: Jan 2004
Location: France
Posts: 2,570
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Our team has opened its support forum.

Now we will make support on our forum

So if you want better support on our hacks go on our forum: http://www.vbulletindev.net/

There are not a lot of hacks for the moment but it will come.

Cya soon on our forum
Reply With Quote
  #20  
Old 03-30-2004, 12:27 AM
PET's Avatar
PET PET is offline
 
Join Date: Jan 2002
Location: Timisoara/Romania
Posts: 305
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

In vBulletin RC2 or 4 (can't remember) the hack worked. Now, in vB3 FINAL i get this error :

PHP Code:
Database error in vBulletin 3.0.0:

Invalid SQLSELECT replycount FROM thread WHERE threadid 
mysql errorYou have an error in your SQL syntax near '' at line 1

mysql error number
1064 
I have made the changes that Hawk post, now i get an error about a }. I remove the } and...the SQL problem appears again.
Reply With Quote
  #21  
Old 03-30-2004, 12:29 AM
PET's Avatar
PET PET is offline
 
Join Date: Jan 2002
Location: Timisoara/Romania
Posts: 305
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

P.S. I also want to make it clear that i have Forum Description installed (if it mathers).
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 04:31 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.04709 seconds
  • Memory Usage 2,313KB
  • Queries Executed 25 (?)
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
  • (3)bbcode_php
  • (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
  • (2)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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