Customized Maintenance Scripts

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
Post Reply
bjcollin
Registered User
Posts: 3
Joined: Tue Sep 10, 2019 3:43 pm

Customized Maintenance Scripts

Post by bjcollin » Tue Sep 10, 2019 11:50 pm

I have a lot of board maintenance of posts to do, and I am looking for some shortcuts to doing topic moving. For example, we get about 1000-2000 posts a year, and most of those are inside of one or two forums. I would like to be able to move all topics in a certain year into an archive forum. So do I need a custom SQL command through the command line or is there a way within phpbb 3.2.7 to select large numbers of posts and do a move topic command on them? I started doing this manually one by one and it is just a bit cumbersome and slow moving to do that in this manner.

Example: Move every topic started in year 2014 from forum A to forum Archive_2014.

Thank you in advance.

Brian Collins

User avatar
Brf
Support Team Member
Support Team Member
Posts: 51834
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: Customized Maintenance Scripts

Post by Brf » Wed Sep 11, 2019 2:18 pm

If you go into your MCP for a forum, you can select a page-full of topics and move them all at once.

User avatar
warmweer
Registered User
Posts: 2688
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Belt ... well actually Belgium

Re: Customized Maintenance Scripts

Post by warmweer » Wed Sep 11, 2019 2:44 pm

bjcollin wrote:
Tue Sep 10, 2019 11:50 pm
Example: Move every topic started in year 2014 from forum A to forum Archive_2014.
I know you're just giving an example, but just in case: topics started in 2014 can still be active in 2019 (and later)
My board's not broken, it just went peculiar

User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 50682
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: Customized Maintenance Scripts

Post by stevemaury » Wed Sep 11, 2019 4:10 pm

^^This. Perhaps it would be better to move topics that have not been replied to in a year? Once you are sure what you want to do, we can help you do it
For REALLY good and VERY inexpensive hosting CLICK HERE

I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)

bjcollin
Registered User
Posts: 3
Joined: Tue Sep 10, 2019 3:43 pm

Re: Customized Maintenance Scripts

Post by bjcollin » Wed Sep 11, 2019 8:25 pm

Thank you guys for the replies!

Brf - The MCP is EXACTLY what I was looking for. That interface is great for moving large numbers of posts at one time instead of going topic by topic. I can't believe that I had not seen that section before today and I have been administrating our board since 2007!

Warmweer - That is a good idea going by last post time instead of topic creation time, but I think for our board's purposes I will just do the topic creation time as our replies tend to be short turn times and then they move onto the next topic instead of coming back for replies to the same topics over longer periods of time.

stevemaury - Thank you for the topics that have not been replied to in a year idea. I think for our board's purposes I will just leave the current year and one past year's worth of topics in the active forums and then move everything older than 2 years into the archives.

Brian Collins

bjcollin
Registered User
Posts: 3
Joined: Tue Sep 10, 2019 3:43 pm

Re: Customized Maintenance Scripts

Post by bjcollin » Wed Sep 11, 2019 8:50 pm

One last question on this topic... After moving the large numbers of topics, I noticed that there are a lot of what I am going to call un-selectable shadow topics leftover at the bottom of the pages. They start "TOPIC TITLE [ Delete shadow topic ]"... How do I move those into the archives, or is it safe to go ahead and delete them? It looks like most of them were generated when a user posted in the wrong forum, and we the admins/mods moved the topic to the correct forum and it must have created a shadow topic at the time? Thank you.

Brian Collins

User avatar
warmweer
Registered User
Posts: 2688
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Belt ... well actually Belgium

Re: Customized Maintenance Scripts

Post by warmweer » Wed Sep 11, 2019 9:00 pm

bjcollin wrote:
Wed Sep 11, 2019 8:50 pm
hey start "TOPIC TITLE [ Delete shadow topic ]"... How do I move those into the archives, or is it safe to go ahead and delete them?
There's really no point in keeping them in archives. They're nothing more than a link to the full topic, and (I'm not 100% sure about this but in the code I can't find anything relating to fixing the shadow topic) the link may not even work since the full topic was moved.
I just tested (made a topic and moved it, leaving a shadow topic, then deleted the shadow topic ... and the full topic stayed untouched) and it looks safe to delete the shadow topic - but better be safe than sorry and await confirmation from the phpBB team.
My board's not broken, it just went peculiar

User avatar
3Di
Former Team Member
Posts: 14088
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: Customized Maintenance Scripts

Post by 3Di » Wed Sep 11, 2019 11:49 pm

In ACP / Forums you can set the frequency of auto-pruning shadow topics for each forum.

Image

It works if in ACP / General / server settings the Run periodic tasks from system cron if set to NO.

Image
warmweer wrote:
Wed Sep 11, 2019 9:00 pm
it looks safe to delete the shadow topic
It is but a re-sync is also needed.
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
👨‍🏫 | Take a tour to | The Studio | 👨‍🏫

Post Reply

Return to “[3.2.x] Support Forum”