vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Schedule move closed threads (https://vborg.vbsupport.ru/showthread.php?t=319241)

baderandsonsco 06-26-2015 04:57 PM

Schedule move closed threads
 
Hello! I am looking for a way to schedule a task to move all closed threads from a particular forum into another. We use this forum as a "todo" list. Weekly it would be nice to schedule a task to move the closed threads to another archive forum that could still be searched if needed, leaving just the threads that will need to be done. I know how to do it manually through the admincp, is there a way to accomplish the same thing via a schedule task? I have lost my php programmer, so at this time I have no one that could write it for me. Thanks in advance for any solutions! We are running VB 4.2.2

kh99 06-26-2015 06:52 PM

I haven't used it, but there's this: https://vborg.vbsupport.ru/showthread.php?t=178050 (which I only noticed by seeing it in the "SImilar Threads" below). The posts near the end of the thread say that it works with vb4, but if you decide to try it read the last post because apparently there is a minor problem with a phrase.

MarkFL 06-27-2015 01:40 AM

1 Attachment(s)
I have written a simple add-on that will allow you to set the source and destination forums, and then once a week (on Sundays) all closed threads in the source forum will be moved to the destination forum.

Download the attached .XML file and then follow:

AdminCP ► Plugins & Products ► Manage Products ► Add/Import Product.

Click on "Choose File" and browse to the product .XML file that you downloaded.

Click "Import"

Next, set the options for the product and let me know if this does everything you need. :D

edit: I have uploaded an update which rebuilds the forum counters...which I initially failed to take into account

baderandsonsco 06-29-2015 12:04 PM

You are my hero. The only thing that would be nice is a way to manually test it. I installed it this morning, but I need to wait until Sunday to see if it works. Thank you very much though...much appreciated!!!

--------------- Added [DATE]1435587274[/DATE] at [TIME]1435587274[/TIME] ---------------

One more quick question...if I wanted to move the closed threads from multiple forums can I put the ID's in separated by commas or am I limited to 1 forum?

MarkFL 06-29-2015 12:23 PM

Quote:

Originally Posted by baderandsonsco (Post 2548924)
You are my hero. The only thing that would be nice is a way to manually test it. I installed it this morning, but I need to wait until Sunday to see if it works. Thank you very much though...much appreciated!!!

--------------- Added [DATE]1435587274[/DATE] at [TIME]1435587274[/TIME] ---------------

One more quick question...if I wanted to move the closed threads from multiple forums can I put the ID's in separated by commas or am I limited to 1 forum?

To test it, you could edit the first line of the plugin, which is:

PHP Code:

if ($vbulletin->options['markfl_weekly_archive_enabled'] AND date("N") == '7'

to read:

PHP Code:

if ($vbulletin->options['markfl_weekly_archive_enabled']) 

and then manually run the daily cleanup from the "Scheduled Task Manager." When finished, then restore the first line of the plugin to the original.

As it is now, you can only enter one id for the source and one for the destination, however I can update the product to allow multiple source forums...do you want all closed threads to go to the same destination?

baderandsonsco 06-29-2015 03:37 PM

I already cleaned them up manually this morning so they started fresh this week, so I can wait...no problem...but thanks for the solution.

Yes, it would be multiple source into one destination. Once again...you are my hero.

MarkFL 06-29-2015 03:55 PM

1 Attachment(s)
Okay, I have updated the product to allow multiple source forums and one destination. Enter the source forums as a comma-delimited list. :D

tanzeelniazi 06-29-2015 05:45 PM

Quote:

Originally Posted by MarkFL (Post 2548947)
Okay, I have updated the product to allow multiple source forums and one destination. Enter the source forums as a comma-delimited list. :D

I want say something
Example:
i have a 200 reported threads and these threads no longer working its mean i have 200 reports so my question is your this mod can these 200 dead thread move in auto dead section like: 1 section is working and 1 is dead when thread going dear i move dead thread in Dead section can your mod work like this ?
because i have 200 reports and 1 by 1 thread moving is so hard like a headache
How my these dead threads in 1 click going in Dead section ?

MarkFL 06-29-2015 05:49 PM

If those 200 report threads are all closed, then you can use the add-on I attached in post #7 to move them, otherwise it would be better to run a manual query to move those threads. Also, you could probably move them with the inline moderation tools a page at a time, and you could temporarily set the number of threads per page to a sufficiently large number that you could grab all of them in one pass.

tanzeelniazi 06-29-2015 06:44 PM

Ooho you dont understand
example when some one make a report when you open the report you see blah blah and Thread link then you open the link and move your thread in dead section after you need to move the report in completed reports section.
its not a problem moving report problem in 200 dead threads link move
any other suggestion how to automatically dead threads going in dead section ?


All times are GMT. The time now is 06:11 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.01717 seconds
  • Memory Usage 1,738KB
  • 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
  • (2)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)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