Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Autoclose Thread After X Days Inactivity (Works from date of last post in thread!) Details »
Autoclose Thread After X Days Inactivity (Works from date of last post in thread!)
Mod Version: 1.00, by rwoelich (Member) rwoelich is offline
Developer Last Online: Jul 2008 I like it Show Printable Version Email this Page

This modification is in the archives.
vB Version: 3.5.0 Rating: (2 votes - 5.00 average) Installs: 41
Released: 14 Mar 2006 Last Update: 30 Oct 2006 Downloads: 182
Not Supported Uses Plugins Template Edits  

Old Thread Autoclosing Hack
by Rob Woelich of www.teenhelp.org


Update - 10/29/06:
Threads that have been autoclosed have the closed icon in the forum display (thanks to Kall for the code/suggestion). Also, the "New Reply" button still shows for admins and supermods who have permission to post in the thread.

This seems to work fine on 3.6.0+, but I'm not going to bother releasing it just for that version because it's such a simple hack. If something isn't working right, verify your template edits... if you use a custom skin/style, they could be different.


DESCRIPTION:
This is a relatively simple hack that makes a thread appear "closed" after a specified amount of time. The amount of time is calculated from the last post in the thread, not from the start of the thread, making this a very effective way to keep old topics from being brought up without locking them out while they're still being discussed.

This installation consists of:
1 Product XML Upload for 3.5.0+ (should work on all versions above)
3 Template Edits in the SHOWTHREAD template
1 Image Upload (Optional, really... looks better with image though)

Into more detail:

This hack installs plugins on your showthread and newreply pages. When a user views a thread, the plugin will check the date of the last post in the thread and if the post was made more than a predetermined amount of time ago (one month by default), the thread will appear closed to the user. The thread isn't actually set as closed in the database. If a user clicks on the "Closed" button, they'll be given a No Permission message, keeping them from replying, and the Quick Reply box at the bottom of the thread will be hidden from the user as well. Administrators and super moderators by default are still able to reply to autoclosed threads and will still see the Quick Reply box.

As mentioned, the expiration time is calculated from the last post in the thread, so if a thread is autoclosed and an admin or supermod makes a post in the thread, the thread will be reopened. Since the thread isn't actually set as closed in the database, it's important to note that using the "Open Thread" option from the thread administration menu won't reopen the thread to other users. The only thing that will keep the thread open is a post existing in the thread that's dated as to deter the expiration time.

INSTALLATION:
Complete installation and template editing instructions are included in the ZIP file.

CUSTOMIZATION:
This hack was designed for a specific purpose, to keep those old annoying topics from being brought back up after two months by that one annoying newb.

However, there are a few customizations available, including the usergroups that can reply in the autoclosed threads, the amount of time until a thread is autoclosed, and the message displayed at the top of the thread when the thread has been autoclosed. Customization instructions are included in the ZIP file and are extensive enough for anybody to understand.

OTHER:
Two screenshots of an autoclosed thread have been included. One shows the Quick Reply still visible for administrators. Please click Install if you used and liked this...

Download Now

Only licensed members can download files, Click Here for more information.

Supporters / CoAuthors

Screenshots

Click image for larger version

Name:	screenshot1.gif
Views:	551
Size:	53.1 KB
ID:	44313   Click image for larger version

Name:	screenshot2.gif
Views:	516
Size:	40.9 KB
ID:	44314  

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Comments
  #2  
Old 14 Mar 2006, 09:22
Tralala's Avatar
Tralala Tralala is offline
 
Join Date: Jan 2006
What a nice idea. Good work!
Reply With Quote
  #3  
Old 14 Mar 2006, 09:31
rwoelich's Avatar
rwoelich rwoelich is offline
 
Join Date: Jan 2005
Real name: Rob
I just updated the ZIP file because I noticed that I didn't include one of the template edits to put the autoclose message at the bottom of the thread like in the screenshot. It should all be good now, though.
Reply With Quote
  #4  
Old 14 Mar 2006, 18:56
LeeCHeSSS's Avatar
LeeCHeSSS LeeCHeSSS is offline
 
Join Date: Dec 2001
Would it be possible to only apply this in certain specific forums?
Reply With Quote
  #5  
Old 14 Mar 2006, 23:19
rwoelich's Avatar
rwoelich rwoelich is offline
 
Join Date: Jan 2005
Real name: Rob
Sure! Give me two seconds and I'll give you a modified code sample.

Ok, here it is... to apply this hack to only certain forums:

Open the plugin for the showthread_getinfo hook and find:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

And replace it with:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

...changing 1,2,3 to the forum ids you want to apply the hack to (you can add more or less as you please). Then in the newreply_start plugin, find:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

And replace with:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

On the other side, if you want to exclude only a few forums from using this hack, use the same procedure, but add an ! in front of the in_array (to look like !in_array) and then the forum id numbers you use would be the forums that you don't want to apply the hack to. Depending on whether you're excluding or including more forums, you may use either method. Use the one that you'll have to type the least forum ids.


Last edited by rwoelich; 14 Mar 2006 at 23:32.
Reply With Quote
  #6  
Old 26 Mar 2006, 14:35
Fergal C Fergal C is offline
 
Join Date: Dec 2004
Real name: Fergal Crawley
Great idea, might use it to help control spam posts.
Reply With Quote
  #7  
Old 30 Mar 2006, 03:08
Tinbendr Tinbendr is offline
 
Join Date: Jan 2006
Clicked installed.

I have the Quick Reply turned off for ALL users, (a useless feature IMO), but the quickreply box is showing anyway.

Last edited by Tinbendr; 30 Mar 2006 at 03:46.
Reply With Quote
  #8  
Old 30 Mar 2006, 04:34
bada_bing's Avatar
bada_bing bada_bing is offline
 
Join Date: Feb 2004
Looks like a sweet hack and something I need for my selling and trading forums.
I do have a couple questions before I click install.

- Will this work on vb 3.5.3 ?

- Also when does this hack start closing threads older then 30 days with no activity , does it start closing already created thread that are beyond 30 days with no activity or does it start with new threads created after the hack is installed?

- Also if this hack checks dates everytime a user enters that thread what is the query count and server load like?

Thanks
Reply With Quote
  #9  
Old 04 Apr 2006, 07:36
Logikos Logikos is offline
 
Join Date: Jan 2003
Hmm.. this is like mine here. http://www.vbulletin.org/forum/showthread.php?t=82827
__________________
Full Time PHP Developer
Please feel free to contact me if you have any paid work to be done.

Last edited by Logikos; 04 Apr 2006 at 07:39.
Reply With Quote
  #10  
Old 04 Apr 2006, 11:23
kall's Avatar
kall kall is offline
 
Join Date: Apr 2004
Real name: Ace
Originally Posted by LiveWire
Similar yes. Normally, I would choose yours, but this one has the cute little box that tells the user about the fact that it has expired.

Chuck that in and you have a winner.
__________________
vBulletin Styles (All styles compatible with 3.8.4 - Steel Blue 4.0 Available) | vBulletin Hosting
Reply With Quote
  #11  
Old 11 Apr 2006, 05:01
bada_bing's Avatar
bada_bing bada_bing is offline
 
Join Date: Feb 2004
Originally Posted by bada_bing
Looks like a sweet hack and something I need for my selling and trading forums.
I do have a couple questions before I click install.

- Will this work on vb 3.5.3 ?

- Also when does this hack start closing threads older then 30 days with no activity , does it start closing already created thread that are beyond 30 days with no activity or does it start with new threads created after the hack is installed?

- Also if this hack checks dates everytime a user enters that thread what is the query count and server load like?

Thanks
Anyone?
Reply With Quote
  #12  
Old 13 Apr 2006, 20:14
Tinbendr Tinbendr is offline
 
Join Date: Jan 2006
Originally Posted by bada_bing
Anyone?
- Will this work on vb 3.5.3 ?
I installed with 3.5.3.

- Also when does this hack start closing threads older then 30 days with no activity , does it start closing already created thread that are beyond 30 days with no activity or does it start with new threads created after the hack is installed?
My understanding is that is uses the last date of the last thread.

- Also if this hack checks dates everytime a user enters that thread what is the query count and server load like?
I don't know that one.
Reply With Quote
  #13  
Old 14 Apr 2006, 20:58
phonexpo's Avatar
phonexpo phonexpo is offline
 
Join Date: Sep 2005
Location: Dublin
Real name: Patrick
Installed, thanks. Working fine on 3.5.4 !
Reply With Quote
  #14  
Old 15 Apr 2006, 16:47
nasser71's Avatar
nasser71 nasser71 is offline
 
Join Date: Jul 2005
nice jop m8
thanks
instaled
Reply With Quote
  #15  
Old 16 Apr 2006, 04:38
DementedMindz DementedMindz is offline
 
Join Date: Jan 2006
ill tell you what would be great for this is say the thread gets closed have it where they can set up a option to move threads to a 'recycle bin' forum this way it will get moved to that forum and closed... cause they have this hac that moves them http://www.vbulletin.org/forum/showthread.php?t=106774 but it basiclly does it if you chose... would be nice if it closed it and moved it... hope you usnderstand what i mean
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

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


New To Site? Need Help?

All times are GMT. The time now is 11:39.

Layout Options | Width: Wide Color: