vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=228)
-   -   Mini Mods - ZH - Auto Lock Thread (https://vborg.vbsupport.ru/showthread.php?t=165618)

Ziki 12-18-2007 10:00 PM

ZH - Auto Lock Thread
 
This modification was brought to you by
KXDesign
http://www.kxdesign.com/


~Modification name
Auto Lock Thread

~Modification description
Locks an old thread after X amount of days.

~Modification options
  • Turn on/off
  • Choose thread id's
  • Choose amount of days

~Modification info
File uploads: 0
Template edits: 0
File edits: 0
Plugins: 1
SQL Queries: 0
Phrases: 7
Settings: 3

Install time: 3 sec
Install level: Easy

~Modification installation
Step 1: Import Product



~Modification screenshots
None


~Modification copyright
This may not be distributed,released or claimed as your work without author's permission.

Ziki 12-19-2007 06:51 PM

~Reserved~

johnr 12-19-2007 08:40 PM

Do you have any plans to expand this hack?

It would be really useful to me if I could lock a thread after x days of inactivity.

Amenadiel 12-19-2007 09:03 PM

Quote:

Originally Posted by johnr (Post 1404955)
Do you have any plans to expand this hack?

It would be really useful to me if I could lock a thread after x days of inactivity.

That's easy, you should edit the xml before importing and on line 25, where it says:

PHP Code:

WHERE threadid IN($zhthread) AND open AND sticky AND dateline ".intval(TIMENOW-(86400*$zhtime)) 

replace it with

PHP Code:

WHERE threadid IN($zhthread) AND open AND sticky AND lastpost ".intval(TIMENOW-(86400*$zhtime)) 


I haven't seen vb_thread table structure for vb3.7, but I'm pretty sure "lastpost" field is still there. ;)

Ba$im 12-20-2007 09:06 AM

thanx.

Snake 12-21-2007 02:31 PM

Thanks!

Cyrus [Hwluxx] 12-25-2007 01:10 PM

Any Suggestions if you expand this Hack to close Threads after xxx Posts ?

stwilson 01-26-2008 06:33 PM

Can you apply this MOD to specific forums or is it thread specific?

Rich 02-07-2008 08:52 PM

This mod is not very user friendly if we have to enter each threads ID individually. I recall a version where you entered the forum ID, or something like that, and it would close every thread that was "x" amount of days old. Is this one also going to have that added functionality or is this the end product? (I ask because i need to know if I need to figure it out on my own. lol)

LuBi 02-10-2008 12:29 AM

I always enjoy a nice automated add-on like this. Thanks for taking the time and sharing it with us, this is a great start. I like some of the ideas I'm reading, may I also suggest this mod be able to move threads. I used to have a mod like this auto lock then move the locked thread to a sub-forum archive. It really made life easy and kept things clean. Thanks again.


All times are GMT. The time now is 04:14 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.01146 seconds
  • Memory Usage 1,738KB
  • 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
  • (2)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