View Full Version : Close threads after X replies
VBDev
01-10-2004, 10:00 PM
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:
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
KJ_innit
01-11-2004, 03:42 PM
this would be great for a TABS forum on music sites. has anyone installed it and seen how it works?
*goes to download and instal*
cheers
FleaBag
01-11-2004, 04:45 PM
This will come in handy for my e-mail competitions. First 10 responses e.t.c. Thanks!
This will come in handy for my e-mail competitions. First 10 responses e.t.c. Thanks!
very nice. :)
Mr. HillBilly
01-13-2004, 10:14 PM
I have a suggestion, When a thread is closed after 100 posts for example, have the hack make a New thread title: (The last thread name closed) II
Or something like that..
The Quibbler
01-14-2004, 12:08 AM
I have a suggestion, When a thread is closed after 100 posts for example, have the hack make a New thread title: (The last thread name closed) II
Or something like that..
I second this request. I might install this later, but if I did, I (or someone else) would just have to create a new one, because that's the way it would work on my forum. I would love this hack and install it in an instant if you added that feature.
Of course, I may end up installing anyway.
bolynn
01-14-2004, 10:10 PM
Is it only me or there is no hack to download in this thread?
Bo
WoooW ! I need this. But where is the ZIP file ? I'v go to the vbdev site but it is in french :(
assassingod
01-16-2004, 10:39 PM
Yes, where is the attachment vBDev?
VBDev
01-16-2004, 10:50 PM
Beuh, it has disapeared :D
I re-attach it now ;)
VBDev
01-16-2004, 10:56 PM
In the first post of the tread ;)
bolynn
01-17-2004, 04:35 AM
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
gmarik
01-17-2004, 07:26 AM
This is fundamental ;)
bolynn
01-17-2004, 05:18 PM
It may be but your command of the English language is not (no offence)
mili
poetic
03-16-2004, 06:45 PM
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
In the file includes/functions_newpost.php
replace :
//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
//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]'");
}
}
VBDev
03-24-2004, 08:43 PM
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 :)
In vBulletin RC2 or 4 (can't remember) the hack worked. Now, in vB3 FINAL i get this error :
Database error in vBulletin 3.0.0:
Invalid SQL: SELECT replycount FROM thread WHERE threadid =
mysql error: You 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.
P.S. I also want to make it clear that i have Forum Description installed (if it mathers).
Database error in vBulletin 3.0.1:
Invalid SQL: 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
mysql error number: 1064
Script: profile.php?do=editsignature
My users are getting this error when trying to edit there profile signature from the User CP. I tested it and get the same error, everything else works fine in the UserCP except the "Edit Signatures" link which gives the above error.
Hi, can you make it so that when the threads are closed, they are moved to a specified forum?
As in this example: if forumid=1 or forumid=2 and its closed then move to forumid=3
This would be a great since it lessens the burden on having to manually move closed threads ourselves.
Killahbyte
07-15-2004, 10:47 PM
installl worked perfect thanks alot!!!
KB
Tombstone
09-25-2004, 12:16 AM
Invalid SQL: SELECT fermeture FROM vb_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
Get this when I try and send a PM :(
Have the problems been resolved on this great idea ?
I checked your support forum but it seems no solutions were given too.
Do keep us in the loop vbdev :D
sjaakie
01-22-2005, 06:54 PM
Invalid SQL: SELECT fermeture FROM vb_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
Get this when I try and send a PM :(
I have this problem after upgrading to 3.0.6. Reinstalled hack and then problems with sending pm's and opening topics in certain forums.
GeoffE
02-21-2005, 06:21 PM
Same thing when I upgraded to 3.6 .. anyone got any ideas?
it don't works anymore on 3.0.7
In the file includes/functions_newpost.php
replace :
//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]'");
}
//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" and $threadinfo[threadid] != '') {
$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]'");
}
or Newthread will not work for any forums with set limit on replies
dimdan
05-16-2005, 05:55 AM
Fatal error: Call to a member function on a non-object in /home/virtuald/public_html/new/forum/includes/functions_newpost.php on line 705
Got This Error
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.