Jump to content

  • twitter
  • youtube
  • googleplus
  • facebook
  • rss
  • newsletter


(M31) Close Old Topics 1.0.0


  • Please log in to reply
18 replies to this topic

#1 Michael

Michael

    Management

  • Management
  • 3,129 posts
  • Gender:Male
  • Location:Australia
  • IP.Board Version:IPB 3.1.x
  • First Name:Michael
Donator

Posted 26 February 2009 - 09:56 PM

File Name: (M31) Close Old Topics 1.0.0
File Submitter: Michael
File Submitted: 27 Feb 2009
File Updated: 02 Jun 2010
File Category: IP.Board Modifications

Resource Type: Hook & Task
Version: 1.0.0 (10000) - Compatibility: IP.Board 3.0.x / 3.1.x
Author: Michael John (DevFuse)

Description: Searches for topics in selected forums that have a last post date that is older than X days and closes them. Also includes an option to skip pinned topics as well as an option to select which forums this mod will search in.

Click here to download this file

Keep up to date with DevFuse mod development and releases.

Posted Image Posted Image Posted Image Posted Image Posted Image


#2 damirhoni

damirhoni

    Newbie

  • Members
  • Pip
  • 6 posts
  • First Name:damir

Posted 29 March 2009 - 04:11 AM

Downloaded like i post just for future when i get some money to buy this IPB 3 !

Thanks for mods !

#3 Michael

Michael

    Management

  • Management
  • 3,129 posts
  • Gender:Male
  • Location:Australia
  • IP.Board Version:IPB 3.1.x
  • First Name:Michael
Donator

Posted 29 March 2009 - 04:13 AM

View Postdamirhoni, on Mar 29 2009, 09:11 PM, said:

Downloaded like i post just for future when i get some money to buy this IPB 3 !

Thanks for mods !

This is a free mod for both IPB 2.3 and 3.

Keep up to date with DevFuse mod development and releases.

Posted Image Posted Image Posted Image Posted Image Posted Image


#4 GaVrA

GaVrA

    Advanced Member

  • Members
  • PipPipPip
  • 43 posts
  • IP.Board Version:IPB 2.3.x

Posted 15 October 2009 - 01:00 AM

Is this mod working on 3.0.3 and 3.0.4?

Also could you explain to me how to make this mod search for topics in selected forums that are older then the set number of days?

Ie, if there is topic 5 days old, and i put it to close topics that are older then 5 days, asap that topic "turns" 6 days old it should be closed.

#5 Michael

Michael

    Management

  • Management
  • 3,129 posts
  • Gender:Male
  • Location:Australia
  • IP.Board Version:IPB 3.1.x
  • First Name:Michael
Donator

Posted 15 October 2009 - 01:27 AM

View PostGaVrA, on 15 October 2009 - 01:00 AM, said:

Is this mod working on 3.0.3 and 3.0.4?

Also could you explain to me how to make this mod search for topics in selected forums that are older then the set number of days?

Ie, if there is topic 5 days old, and i put it to close topics that are older then 5 days, asap that topic "turns" 6 days old it should be closed.

Yes should be, no reported problems with 3.0.4. That would require file edits to close exactly on the right time, right now this is based on a task. Custom work is currently on hold during extra IPB3 work.

Keep up to date with DevFuse mod development and releases.

Posted Image Posted Image Posted Image Posted Image Posted Image


#6 GaVrA

GaVrA

    Advanced Member

  • Members
  • PipPipPip
  • 43 posts
  • IP.Board Version:IPB 2.3.x

Posted 15 October 2009 - 01:29 AM

Well ofc not "right time", i was thinking about tasks. Just like mod that was used for ipb2.3.x ;)

I can put that task to run at 1am or 00h every day so it will be accurate... :)

I remember back on 2.3.x it was just a matter of one line edit to make mod like this work the way i want it. Is it same here?

#7 Michael

Michael

    Management

  • Management
  • 3,129 posts
  • Gender:Male
  • Location:Australia
  • IP.Board Version:IPB 3.1.x
  • First Name:Michael
Donator

Posted 15 October 2009 - 01:32 AM

View PostGaVrA, on 15 October 2009 - 01:29 AM, said:

Well ofc not "right time", i was thinking about tasks. Just like mod that was used for ipb2.3.x ;)

I can put that task to run at 1am or 00h every day so it will be accurate... :)

I remember back on 2.3.x it was just a matter of one line edit to make mod like this work the way i want it. Is it same here?

Should be but it might be possible to set the task to run every hour for example and then be more precise.

Keep up to date with DevFuse mod development and releases.

Posted Image Posted Image Posted Image Posted Image Posted Image


#8 GaVrA

GaVrA

    Advanced Member

  • Members
  • PipPipPip
  • 43 posts
  • IP.Board Version:IPB 2.3.x

Posted 15 October 2009 - 01:37 AM

Well yeah... hehe... :)

Anyhow im now looking at your mod "Close old topics 1.0.0" for 2.3.x and i think this is what i needed to change to make it work the way i want:

$diff = $r['start_date']+$this->ipsclass->vars['cot_close_topics']*86400;

I belive this "start_date" was not there in your mod, it was something like "last_post" or w/e... :)

So i guess something should be changed here for this IPB 3.0.x version:

			$time_diff = time() - $this->settings['cot_close_topics']*86400;	 
	 		$this->settings['cot_skip_pinned'] == '1' ? $pinned = '1' : $pinned = '5';
 		
			$this->DB->build( array( 'select' => 'tid', 'from'   => 'topics', 'where' => "state != 'closed' AND pinned != ".$pinned." AND last_post < ".$time_diff." AND forum_id IN (".IPSText::trimLeadingComma( IPSText::trimTrailingComma( $this->settings['cot_close_topics_forums'] ) ).")" ));

Any idea? :D

Edited by GaVrA, 15 October 2009 - 01:38 AM.


#9 Michael

Michael

    Management

  • Management
  • 3,129 posts
  • Gender:Male
  • Location:Australia
  • IP.Board Version:IPB 3.1.x
  • First Name:Michael
Donator

Posted 15 October 2009 - 01:42 AM

Possibly, try this

Find:
AND last_post

Replace With:
AND start_date

Keep up to date with DevFuse mod development and releases.

Posted Image Posted Image Posted Image Posted Image Posted Image


#10 GaVrA

GaVrA

    Advanced Member

  • Members
  • PipPipPip
  • 43 posts
  • IP.Board Version:IPB 2.3.x

Posted 15 October 2009 - 01:49 AM

It works. :) Thanks!!!

One small problem, you might want to fix this, i never saw this on any hook i installed... :huh:

Attached File  2009-10-15_094816.png   23.34K   8 downloads

#11 Michael

Michael

    Management

  • Management
  • 3,129 posts
  • Gender:Male
  • Location:Australia
  • IP.Board Version:IPB 3.1.x
  • First Name:Michael
Donator

Posted 15 October 2009 - 01:57 AM

View PostGaVrA, on 15 October 2009 - 01:49 AM, said:

It works. :) Thanks!!!

One small problem, you might want to fix this, i never saw this on any hook i installed... :huh:

Attachment 2009-10-15_094816.png

That is strange, I'll upload a fix now.

Keep up to date with DevFuse mod development and releases.

Posted Image Posted Image Posted Image Posted Image Posted Image


#12 GaVrA

GaVrA

    Advanced Member

  • Members
  • PipPipPip
  • 43 posts
  • IP.Board Version:IPB 2.3.x

Posted 15 October 2009 - 02:02 AM

Oki doki... :)

#13 Michael

Michael

    Management

  • Management
  • 3,129 posts
  • Gender:Male
  • Location:Australia
  • IP.Board Version:IPB 3.1.x
  • First Name:Michael
Donator

Posted 15 October 2009 - 02:04 AM

Should be fixed now, should only need to re-upload the hook file to fix.

Keep up to date with DevFuse mod development and releases.

Posted Image Posted Image Posted Image Posted Image Posted Image


#14 GaVrA

GaVrA

    Advanced Member

  • Members
  • PipPipPip
  • 43 posts
  • IP.Board Version:IPB 2.3.x

Posted 15 October 2009 - 02:12 AM

Reimported hook and now it looks ok. ;)

Thanks again!

#15 lucky

lucky

    Newbie

  • Members
  • Pip
  • 6 posts
  • Gender:Male
  • IP.Board Version:IPB 3.0.x

Posted 02 October 2010 - 11:11 AM

Dear Sir,

suggest that the mode (M31) Close Old Topics 1.0.0 upgrade that can close the topic and move it in the forum archive.

Postscript I'm sorry for my bad english

#16 Michael

Michael

    Management

  • Management
  • 3,129 posts
  • Gender:Male
  • Location:Australia
  • IP.Board Version:IPB 3.1.x
  • First Name:Michael
Donator

Posted 03 October 2010 - 02:33 AM

View Postlucky, on 02 October 2010 - 11:11 AM, said:

Dear Sir,

suggest that the mode (M31) Close Old Topics 1.0.0 upgrade that can close the topic and move it in the forum archive.

Postscript I'm sorry for my bad english

I've moved your post to the mods support topic. Thanks for the suggestion, this mod is not likely to be upgraded in the near future but I will keep your idea in mind next update.

Keep up to date with DevFuse mod development and releases.

Posted Image Posted Image Posted Image Posted Image Posted Image


#17 Nuno

Nuno

    Newbie

  • Customers
  • 2 posts
  • IP.Board Version:IPB 3.1.x
  • First Name:Nuno

Posted 24 August 2011 - 03:32 PM

Hello,

Sorry for bump this old topic, but I was looking for am autoclose topic after x days for 3.2.
Can I use this hook for this propose?

Thanks

#18 Michael

Michael

    Management

  • Management
  • 3,129 posts
  • Gender:Male
  • Location:Australia
  • IP.Board Version:IPB 3.1.x
  • First Name:Michael
Donator

Posted 24 August 2011 - 05:46 PM

Not tested yet, see this topic here.

Keep up to date with DevFuse mod development and releases.

Posted Image Posted Image Posted Image Posted Image Posted Image


#19 Nuno

Nuno

    Newbie

  • Customers
  • 2 posts
  • IP.Board Version:IPB 3.1.x
  • First Name:Nuno

Posted 25 August 2011 - 08:57 AM

View PostMichael, on 24 August 2011 - 05:46 PM, said:

Not tested yet, see this topic here.

Thanks!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users