1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Lack of Interest Auto Thread Delete every X Days

Discussion in 'Closed Suggestions' started by Vincent, Feb 6, 2011.

  1. Vincent

    Vincent Well-Known Member

    I'd like to suggest a feature that deleted the thread that are X days old every X days.

    It could be useful on xenforo.com too because the test forum is getting a little bit filled up :D
    soloarquitectura and steven s like this.
  2. steven s

    steven s Well-Known Member

    I used this one for my classifieds forum.
  3. Vincent

    Vincent Well-Known Member

    I actually created this because of the 44-pages long "Test Forum" :D
    I can't really use it at my site.
    Well, maybe sooner or later.
  4. James

    James Well-Known Member

    Couldn't you create a custom cron job for this?
  5. Vincent

    Vincent Well-Known Member

    Well yeah, but as a feature it can be better :)
  6. James

    James Well-Known Member

    Perhaps. But is there need for such a feature? I probably wouldnt ever use this because I value my topics (except perhaps spam). It'd be more useful to just do a tutorial on how to set this up as a cron job
  7. Jaxel

    Jaxel Well-Known Member

    public function deleteThreads()
    	$deleteDate = strtotime('-365 days');
    	$threads = $this->_getDb()->fetchAll("
    		SELECT * FROM xf_thread
    		WHERE last_post_date < ?
    	", $deleteDate);
    	foreach ($threads AS $thread)
    		$this->getModelFromCache('XenForo_Model_Thread')->deleteThread($thread['thread_id'], 'hard');
    		XenForo_Helper_Cookie::clearIdFromCookie($thread['thread_id'], 'inlinemod_threads');
    This function will HARD delete all threads that haven't had a new post in over 365 days. Just add it to a cron.
    James likes this.
  8. ragtek

    ragtek Guest

    XenForo_Helper_Cookie::clearIdFromCookie($thread['thread_id'], 'inlinemod_threads');
  9. Decent60

    Decent60 Well-Known Member

    Topics that have become obsolete on my forum get pruned after x-amount of days from the last posting (well it did while were on vB :p). If this was section specific, it would be really nice as not all sections get an "obsolete" time frame.
  10. Ajaxboy

    Ajaxboy Active Member

    I think it is a bad idea, cause all that old good threads with lots of good info and search engine friendly would also get deleted. I think a simple addon should do it for you or a cron job.
  11. Fossor

    Fossor Member

    any clue how to make it forum specific?
    Lets say for classified forums (and childs) so posts would be auto-deleted after 30 days ?

Share This Page