vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Autoclose Thread After X Days Inactivity (Works from date of last post in thread!) (https://vborg.vbsupport.ru/showthread.php?t=110320)

cunder 10-12-2006 07:50 AM

is there already someone to no or this script become to ubdate to Vbulletin 3.6.2
please :tired:

cunder 10-22-2006 09:46 AM

Quote:

Originally Posted by cunder
is there already someone to no or this script become to ubdate to Vbulletin 3.6.2
please :tired:

help please :(

cunder 10-28-2006 12:00 PM

Quote:

Originally Posted by cunder
is there already someone to no or this script become to ubdate to Vbulletin 3.6.2
please :tired:

Bumb :cross-eyed:

rwoelich 10-30-2006 07:53 AM

I've updated the hack to include Kall's modification of the thread status icons in the forum display to show up as closed (thanks :D) and have made one or two other tweaks.

Also, this works fine on 3.6.0+ but I'm not going to bother re-releasing it in the other category because it's such a simple hack. :)

When I get more time (I'm putting 60 hour weeks in at work :chinese:) I'll add some more features to this.

jyajay 11-04-2006 12:06 PM

There is a minor bug in this hack. We have a forum were trash threads are moved and this forum is closed for new postings. But the hack allows to show the quickreply to group 5 and 6 anyway which causes a pretty ugly quickreply box ;)

I fixxed this by removing these two usergroups from the template edit:

before:
PHP Code:

<if condition="($show['quickreply'] AND !$expiredthread) OR $bbuserinfo[usergroupid]==6 OR $bbuserinfo[usergroupid]==5"

after:
PHP Code:

<if condition="($show['quickreply'] AND !$expiredthread)"


str8bourbon 11-23-2006 03:05 AM

Quote:

Originally Posted by rwoelich (Post 1107339)
I've updated the hack to include Kall's modification of the thread status icons in the forum display to show up as closed (thanks :D) and have made one or two other tweaks.

Also, this works fine on 3.6.0+ but I'm not going to bother re-releasing it in the other category because it's such a simple hack. :)

When I get more time (I'm putting 60 hour weeks in at work :chinese:) I'll add some more features to this.

Simple for us because you did all the work! Thanks so much for making this publicly available. So many users were rooting up ancient threads on my forums and it was making quite a mess. Your work put a stop to that.

I have a small suggestion. The message says something to the effect of "received no new no posts for a year." Perhaps it would be better worded as "in over a year" or "in a year or more" or something to that effect. Pretty trivial point in any event, and I realize I can make it say whatever I want.

Anyway, too cool! Thanks again!

str8bourbon 11-23-2006 02:17 PM

Quote:

Originally Posted by str8bourbon (Post 1123418)
Simple for us because you did all the work! Thanks so much for making this publicly available. So many users were rooting up ancient threads on my forums and it was making quite a mess. Your work put a stop to that.

I have a small suggestion. The message says something to the effect of "received no new no posts for a year." Perhaps it would be better worded as "in over a year" or "in a year or more" or something to that effect. Pretty trivial point in any event, and I realize I can make it say whatever I want.

Anyway, too cool! Thanks again!

An addendum.

I just found something that you might want to add to this hack. It looks like even though a thread is closed by this hack, polls can still be voted on. And of course voting makes the post current and opens it back up again.

Would modifying the hack to keep people from voting in polls be difficult? I'd be happy to help if needed.

ForeverForums 03-08-2007 11:23 PM

im getting this SQL error when i try to install this hack

Quote:

Invalid SQL:

### INSERT QUERY GENERATED BY fetch_query_sql() ###
INSERT INTO plugin
(`active`, `executionorder`, `title`, `hookname`, `phpcode`, `product`)
VALUES
('1', '5', 'No Replies After 1 Month Inactive', 'newreply_start', 'if (($threadinfo[\'lastpost\'] < (TIMENOW - 2592000)) AND ($vbulletin->userinfo[usergroupid]!=6 AND $vbulletin->userinfo[usergroupid]!=5))\r\n{\r\n print_no_permission();\r\n}', 'autocl');

Burley 05-09-2007 07:29 PM

great mod, really!!! usefull

is it possible to set the mod so that it makes an exception for specific threads? Sticky ones for instance?

Domenico 05-30-2007 09:36 AM

Quote:

Originally Posted by rwoelich (Post 925293)
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:
PHP Code:

if ($thread['lastpost'] < (TIMENOW 2592000)) 

And replace it with:
PHP Code:

if ($thread['lastpost'] < (TIMENOW 2592000) AND (in_array($thread['forumid'], array(1,2,3)))) 

...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:
PHP Code:

if (($threadinfo['lastpost'] < (TIMENOW 2592000)) AND ($vbulletin->userinfo[usergroupid]!=AND $vbulletin->userinfo[usergroupid]!=5)) 

And replace with:
PHP Code:

if (($threadinfo['lastpost'] < (TIMENOW 2592000)) AND ($vbulletin->userinfo[usergroupid]!=AND $vbulletin->userinfo[usergroupid]!=5) AND (in_array($thread['forumid'], array(1,2,3)))) 

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.

;)

Well I did this but your hack still closes posts from all the forums instead of the forums I ant using your code. How come?


All times are GMT. The time now is 02:59 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.01192 seconds
  • Memory Usage 1,770KB
  • 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
  • (6)bbcode_php_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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