Need to Merge All Identical Topics

Converting from other board software? Good decision! Need help? Have a question about a convertor? Wish to offer a convertor package? Post here.
Enterfrize
Registered User
Posts: 18
Joined: Sun Nov 16, 2008 2:55 am

Need to Merge All Identical Topics

Post by Enterfrize »

Hi all,

I have a unique need. I ran a special import on my website to transition it from a Joomla website to a Wordpress website. It runs on a software bridge with PHPBB and everything is working.

The only thing left to do is merge the PHPBB threads in a handful of specific forum categories. In particular, all the threads with identical subject headers (messages and threads could be different, but they share exactly the same topic subject). The catch is there are too many of these duplicate subject header posts to do manually, so I need to figure out a way to merge them in bulk.

I'm not a programmer, but I do have access to PHPMYADMIN and MYSQL Workbench if needed.

Is there a mysql query I could run that will:

1. Merge only the topics that share the exact same subject line.
2. Merge them in specific forum categories (one at a time)

All help appreciated!

I'm running PHPBB 3.3 on IIS 8.5 Windows Server 2012.
User avatar
david63
Registered User
Posts: 20646
Joined: Thu Dec 19, 2002 8:08 am

Re: Need to Merge All Identical Topics

Post by david63 »

Before going any further I think that you need to get your terminology correct.

In phpBB terms a category is a group of fora therefore you cannot merge into a category. So the question is are you trying to merge these posts into one topic or into one forum?

Without creating a complicated script it is virtually impossible to merge anything outside of phpBB due to the fact that there are many interlinked tables which would need updating.
David
Remember: You only know what you know and - you don't know what you don't know!

I now no longer support any of my extensions but they will start to become available here
Enterfrize
Registered User
Posts: 18
Joined: Sun Nov 16, 2008 2:55 am

Re: Need to Merge All Identical Topics

Post by Enterfrize »

This is a sample forum:

https://www.mtbs3d.com/phpbb/viewforum.php?f=111

I want the duplicate header posts merged into a single thread.
User avatar
david63
Registered User
Posts: 20646
Joined: Thu Dec 19, 2002 8:08 am

Re: Need to Merge All Identical Topics

Post by david63 »

I don't see any duplicate "topics" in that link.

You need to explain what it is that you are wanting to do using phpBB's terminology because at the moment it does not make any sense.
David
Remember: You only know what you know and - you don't know what you don't know!

I now no longer support any of my extensions but they will start to become available here
Enterfrize
Registered User
Posts: 18
Joined: Sun Nov 16, 2008 2:55 am

Re: Need to Merge All Identical Topics

Post by Enterfrize »

You wouldn't see the doubles unless you are organizing your view by topic / subject name. You'd also have to go a couple pages in because I did some manual merging.
User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 52802
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve

Re: Need to Merge All Identical Topics

Post by stevemaury »

Merge them into what? A single topic in the same forum? And is there one set of topics with identical subjects, or are there many? IOW, are there N topics with subject "x", or are there N topics with subject "x" and N topics with subject "y", etc.?

If there were only a few, then pick the topic_id of the topic into which you want to merge the others - let's say it is X. And let's say the subject of topic X is "foobar".

Then:

Code: Select all

UPDATE phpbb_posts SET topic_id = X where post_subject = 'foobar'
Not tested, so backup the posts table first.
I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)
Enterfrize
Registered User
Posts: 18
Joined: Sun Nov 16, 2008 2:55 am

Re: Need to Merge All Identical Topics

Post by Enterfrize »

Merge them into what? A single topic in the same forum? And is there one set of topics with identical subjects, or are there many? IOW, are there N topics with subject "x", or are there N topics with subject "x" and N topics with subject "y", etc.?
The forum is filled with many "twin" subject titled posts, but the content in them (could be a series of posts under the topic name) is different. So I need something that will seek out all posts in a given forum with the same subject name, and merge them. There are no more than two topics in the same forum with the same subject.

Let me explain it this way too. This is how it currently exists:

Post 1: SUBJECT ABC
CONTENT: XXX

Post 2: SUBJECT ABC
CONTENT: YYY

Post 3: Subject DEF
CONTENT: GGG

Post 4: Subject DEF
CONTENT HHH

Lots of posts - many, many twin threads / posts!

I need something that will make it:

POST 1: SUBJECT ABC
CONTENT: XXX + YYY

Post 2: SUBJECT DEF
CONTENT: GGG + HHH

Regards,
Enterfrize
User avatar
Mick
Support Team Member
Support Team Member
Posts: 26908
Joined: Fri Aug 29, 2008 9:49 am

Re: Need to Merge All Identical Topics

Post by Mick »

Can I ask how you intend to deal with threads as phpBB doesn’t have threads. Surely they’ll need some special type of handling? You can’t leave them threaded.
  • "The more connected we get the more alone we become” - Kyle Broflovski© 🇬🇧
Enterfrize
Registered User
Posts: 18
Joined: Sun Nov 16, 2008 2:55 am

Re: Need to Merge All Identical Topics

Post by Enterfrize »

Maybe I'm just not using the right terminology and this is causing confusion.

In the moderator quicktools, I can "merge topics". Right now I can only do that manually by picking two topics and merging them.

All I want to do is find a quick way to automatically find the topics in a specific forum which share the exact same title...and merge them. So two different topics which share the same subject name would become a single long topic with the same subject name. However, because there are so many of these in the forum, I need a quick way of doing it in bulk form.

Return to “[3.3.x] Convertors”