Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons

Reply
 
Thread Tools
Auto Prune Threads Details »»
Auto Prune Threads
Version: 1.0.0, by Andreas Andreas is offline
Developer Last Online: Jan 2023 Show Printable Version Email this Page

Version: 3.5.0 Rating:
Released: 11-01-2005 Last Update: Never Installs: 175
DB Changes Uses Plugins
 
No support by the author.

<font size="3">Auto Prune Threads</font>

Description
This hack gives you the ability to specify if you want to have
threads pruned from a forum after x days.
The amount of days can be set separately for each forum in forum manager.

Details
1 Product XML (3 Plugins, 1 Phrase)

Compatibility Note vBulletin 3.7
As of vBulletin 3.7 Beta 4, the hook used for this Mod does not exist any longer.
After installting this Mod, please change the Hook location to cron_script_cleanup_hourly

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #82  
Old 09-03-2010, 01:53 PM
Trevor Hannant's Avatar
Trevor Hannant Trevor Hannant is offline
Senior Member
 
Join Date: May 2003
Location: Edinburgh, Scotland
Posts: 111
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #83  
Old 09-08-2010, 03:33 AM
Acido Acido is offline
 
Join Date: Apr 2003
Location: Argentina
Posts: 187
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Trevor Hannant View Post

Works fine in my 4.0.6 install.
I confirm that.

Thank you very much trevor :up:
Reply With Quote
  #84  
Old 10-24-2010, 01:29 AM
atcspaul atcspaul is offline
 
Join Date: Feb 2008
Posts: 58
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks trevor. works great with 4.0.7 also
Reply With Quote
  #85  
Old 11-05-2010, 06:07 PM
POL_ED POL_ED is offline
 
Join Date: Sep 2009
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks.
Works great with 4.0.8 also
Reply With Quote
  #86  
Old 12-27-2010, 06:54 AM
AusPhotography's Avatar
AusPhotography AusPhotography is offline
 
Join Date: Nov 2007
Location: Hobart & Adelaide .au
Posts: 521
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #87  
Old 02-05-2011, 05:10 AM
TheGorf TheGorf is offline
 
Join Date: Oct 2006
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #88  
Old 03-04-2011, 06:04 PM
enbro enbro is offline
 
Join Date: Jan 2011
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've installed this on my board which is 4.1.1 and it seems to be working, thanks so much!
Reply With Quote
  #89  
Old 05-05-2011, 07:03 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by snoopytas View Post
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.
Reply With Quote
  #90  
Old 05-22-2011, 09:06 AM
AusPhotography's Avatar
AusPhotography AusPhotography is offline
 
Join Date: Nov 2007
Location: Hobart & Adelaide .au
Posts: 521
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #91  
Old 07-21-2011, 01:56 PM
Infopro Infopro is offline
 
Join Date: May 2003
Location: Pennsylvania
Posts: 267
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:50 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05435 seconds
  • Memory Usage 2,313KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (2)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete