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)
-   -   Auto Prune Threads (https://vborg.vbsupport.ru/showthread.php?t=99881)

Trevor Hannant 09-03-2010 01:53 PM

Once installed using the XML file above, edit the hook location in:

AdminCP > Plugins & Products > Plugin Manager > Auto-Prune Threads

to use the cron_script_cleanup_hourly hook.

Works fine in my 4.0.6 install.

Edit - error caused by a space at the start of the above hook name in the XML - revised file attached.

Acido 09-08-2010 03:33 AM

Quote:

Originally Posted by Trevor Hannant (Post 2093276)

Works fine in my 4.0.6 install.

I confirm that.

Thank you very much trevor :up:

atcspaul 10-24-2010 01:29 AM

thanks trevor. works great with 4.0.7 also

POL_ED 11-05-2010 06:07 PM

Thanks.
Works great with 4.0.8 also

AusPhotography 12-27-2010 06:54 AM

I've got a slightly modified version working in v4.1.0pl2 .
Based on Trevor's version https://vborg.vbsupport.ru/showpost....6&postcount=81

My mod is to NOT prune sticky threads ;)

TheGorf 02-05-2011 05:10 AM

How are you avoiding stickies? I was looking at the simple code in this mod and I see:

PHP Code:

      while ($thread $vbulletin->db->fetch_array($threads))
    {
            
delete_thread($thread['threadid'], falsetrueNULLfalse$thread);
      } 

That easily can be added with a IF block to evaluate if the thread is sticky. Is that all you did? Something like this:

PHP Code:

while ($forum $vbulletin->db->fetch_array($forums))
{
    
$threads $vbulletin->db->query_read("SELECT threadid, forumid, visible, open, pollid, title, sticky FROM " TABLE_PREFIX "thread WHERE forumid=$forum[forumid] AND visible IN (0,1,2) AND sticky IN (0,1) AND lastpost <= " . (TIMENOW - ($forum['pruneafter'] * 86400)));
      while (
$thread $vbulletin->db->fetch_array($threads))
    {
                if ( 
$thread['sticky'] == )
                {
                    
delete_thread($thread['threadid'], falsetrueNULLfalse$thread);
                }
      }
      
build_forum_counters($forum['forumid']);


which adds "sticky" to the thread query, and then ignores the delete_thread call if the thread is sticky. Hmmmm I bet it would be trivial to make this a checkbox option in the forum edit/setup page.

enbro 03-04-2011 06:04 PM

I've installed this on my board which is 4.1.1 and it seems to be working, thanks so much!

Boofo 05-05-2011 07:03 AM

Quote:

Originally Posted by snoopytas (Post 2139484)
I've got a slightly modified version working in v4.1.0pl2 .
Based on Trevor's version https://vborg.vbsupport.ru/showpost....6&postcount=81

My mod is to NOT prune sticky threads ;)

Well, let's see it. ;)

AusPhotography 05-22-2011 09:06 AM

Works on 4.1.3

We also add this line
Code:

  AND sticky = 0
to the SQL to not remove sticky threads

http://www.ausphotography.net.au/for...te_maintenance

Infopro 07-21-2011 01:56 PM

Would anyone have an idea on how I could make this check for deleted threads only and move them to a specific forum? After you've soft deleted many spam threads you might like to move them out of view to a specific forum for archiving instead of deleting.

Thanks!


All times are GMT. The time now is 10:59 AM.

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.01305 seconds
  • Memory Usage 1,748KB
  • 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
  • (1)bbcode_code_printable
  • (2)bbcode_php_printable
  • (2)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