Truncate Forum Cron Entry [Deleted]

Jon W

Well-known member
Waindigo submitted a new resource:

Truncate Forum Cron Entry (version 1.0.0) - Adds a cron entry to delete all threads in specified forums at a given time.

Description:

This add-on adds a cron entry to delete all threads in specified forums at a given time.

Installation:
  • Upload contents of upload folder to root directory, overwriting any existing files.
  • Install addon-Waindigo_TruncateForum.xml file.
  • Go to Tools > Options > Truncate Forum Cron Entry and select nodes to truncate.
  • (optional) Go to Tools > Cron Entries > Truncate Forums and set the cron entry to run when required.
...

Read more about this resource...
 
I'm a little confused by the description. It deletes all threads when it runs? Or it deletes all threads that are a certain age?
 
I'm a little confused by the description. It deletes all threads when it runs? Or it deletes all threads that are a certain age?
Deletes all threads. Wouldn't be too much work to make it only delete threads of a certain age if you are interested in contributing towards that.
 
I was actually working on it last night. Haven't determined for sure that my method for determining the cutoff date is going to work, though.
 
I found this last night:
http://xenforo.com/community/resources/how-to-create-a-cron-entry-to-move-threads-with-options.317/

And it was pretty informative, but I still had some trouble figuring out what I needed to feed into the xF methods to get the results I want.

I was going to try $cutoffDate = strtotime('-' . $options->metExpirationInterval . ' day'); and then use that in the conditional array for getThreads to compare against last_post_date.

Right now, I'm mainly interested in moving threads that haven't had a reply in X days, but deleting them and then moving all the deleted threads would work equally well.
 
Sounds good to me.

The conditional you will need to add to the array is:
PHP:
last_post_date => array("<", $cutoffDate)

Do take a look at my add-on though if deleting is what you want, because it looks like my method for deleting is very similar to that of Fuhrmann's for moving. You should just be able to copy and paste the bits that you need.
 
This addons can't delete big forum. I have a forum with 100.000 posts -> Overload :(
This add-on was intended for emptying a small forum at a specific time every night. I doubt that even the busiest forums get 100,000 posts in one forum on their busiest day.

It looks to me that, as a fellow developer, you are just looking for an excuse to give a fellow developer a bad review. Bad form!
 
Top Bottom