vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Thread Maintenance v1.0 (https://vborg.vbsupport.ru/showthread.php?t=59204)

g-force2k2 12-15-2003 10:00 PM

Thread Maintenance v1.0
 
Well here goes nothing, my first hack at vb.org in sometime now.

Based on an idea by rooshine in this thread -
https://vborg.vbsupport.ru/showthread.php?t=59179

I built on the idea somewhat and in my opinion made a fairly nice system :)

This hack will close threads if they're not replied to within X amount of days as set per the Administrator. Also if you use a forum to archive your threads you can use that featrue and it will automatically move the thread to the specified forum. You can disable or enable this system whenever you want and can set the amount of time to check for updates so that you're not running the database down.

Screenshot and zip below. Easy Installation just run the installer in the admin directory then upload a file and one file mod and you're done.

Tested on vb2.3.3 but should work for all vb2.x.x.

If you install please click install and thanks.

Any questions, comments, etc are welcomed.

If this hack becomes somewhat popular I already have some ideas for v2.0 including automatic forum updating and bypassing sticky threads etc, but this is just a start, please do enjoy.

Thread Maintenance v1.1

Thanks to Brolly I have updated this hack. It contains the following fixes for the following bugs.

[Bug 1]Maintenance Update even though settings set for minutes updated in seconds instead. Fix Applied.

[Bug 2]Even once Thread Maintenance was ran it updated the setting, but did not updated in the special templates. Fix Applied with the reformattingsettings function.

[Bug 3]Thanks to Brolly with the existing query it selected posts but not those older then X amount of time so that is why there was the issue with closing threads that were created x amount of days ago. Anyways fix applied.

To Update to Thread Maintenance v1.1 (TM) Simply Download updated zip and upload the new threadmaintenance.php to the main directory and thats all. Enjoy.

Regards,
g-force2k2

PixelFx 12-16-2003 07:18 AM

Kewl hack :) I'll try this soon :)

Dean C 12-16-2003 10:29 AM

Very nice idea. Good to see you back and posting hacks :)

Vivi Ornitier 12-16-2003 12:15 PM

i been lookin for sometrhin like this for awhile! great ta see u back gforce!

MindTrix 12-16-2003 03:46 PM

WOOT looks brilliant, ill be sure to use this when i get my forums up again. Nice one and thanks.

lasto 12-16-2003 09:21 PM

can we exclude certain forums from this hack as if u have a mod room and u have no replies then obviously these posts are gonna be removed to the same section as well which is deffo a no no

g-force2k2 12-16-2003 09:30 PM

Quote:

Originally Posted by lasto
can we exclude certain forums from this hack as if u have a mod room and u have no replies then obviously these posts are gonna be removed to the same section as well which is deffo a no no

open threadmaintenace.php

find:

PHP Code:

        WHERE post.dateline <= $timenow - ( $TMClosed 86400 ) AND open=

replace with:

PHP Code:

        WHERE post.dateline <= $timenow - ( $TMClosed 86400 ) AND open=AND thread.forumid NOT IN 

Just replace the 0 in the parethesis with the staff forumids and seperate each one with a comma

ie:
PHP Code:

NOT IN 3,25,42 

regards,
g-force2k2

lasto 12-16-2003 10:00 PM

thanks for quick reply g-force much appreciated the support u give to your hacks :)

Hobbes 12-17-2003 12:00 AM

niceeeeeeeeeeeeeee *installs*

Hobbes 12-17-2003 05:15 AM

!

found something:

change the install from

PHP Code:

 
 
if ( $TMaintenance ) :
     include_once ( 
"threadmaintenance.php" ) ;
 endif ; 

to

PHP Code:

if ( $TMaintenance ) :
     include_once ( 
"threadMaintenance.php" ) ;
 endif ; 

the file name is capitalized...so the reference in the code needs to be too :)


All times are GMT. The time now is 04:02 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.01124 seconds
  • Memory Usage 1,744KB
  • 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
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete