vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Close threads after X replies (https://vborg.vbsupport.ru/showthread.php?t=60059)

VBDev 01-10-2004 10:00 PM

Close threads after X replies
 
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]

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!

M1th 01-11-2004 07:55 PM

Quote:

Originally Posted by FleaBag
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

Quote:

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

PET 01-16-2004 10:34 PM

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 ;)

PET 01-16-2004 10:54 PM

where where ?

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

hawk 03-21-2004 02:31 PM

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]'");
           }



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 :)

PET 03-30-2004 12:27 AM

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.

PET 03-30-2004 12:29 AM

P.S. I also want to make it clear that i have Forum Description installed (if it mathers).

koon 04-25-2004 06:04 PM

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.

koon 06-06-2004 03:59 PM

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 :(

cinq 12-09-2004 12:53 AM

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

Quote:

Originally Posted by Tombstone
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?

PET 02-21-2005 08:16 PM

it don't works anymore on 3.0.7

~rc~ 04-18-2005 04:14 PM

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]'"); 
           } 



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" 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


All times are GMT. The time now is 04:46 PM.

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.01251 seconds
  • Memory Usage 1,822KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (30)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete