Uutiset:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu
Advertisement:

Merging many pairs of topics [SMF2]

Aloittaja spiros, marraskuu 20, 2013, 03:08:21 IP

« edellinen - seuraava »

spiros

I have a list of topics (about 2000), mainly pairs and some in three, that need to be merged. Since doing it manually would take ages, I wonder whether there could be an easier way.

The topic ids to be merged could be provided like this:

7897,896,89809
75,800
806,9876

So that each line has the topics to be merged. The idea is to have the default settings, i.e.

1. use the board of the oldest topic in case topics are in different boards
2. do not change topic subjects

If there was an option for a reply to be posted on each merged topic with the message "Merged" that would be an extra bonus.

Oldiesmann

There is no automated way to merge topics. All of the functionality within SMF depends on the request being done in real-time - session checks, permission checks, etc. If you're familiar enough with PHP coding, you should be able to copy that function and modify it to your needs.
Michael Eshom
Christian Metal Fans

emanuele

Actually...MergeExecute takes as argument a list of topics to merge and if $_GET['from'] and $_POST['topics'] are empty uses that, so having the topic ids in arrays you could easily merge them.

There are just a couple of things in a superglobal to consider:
* $_REQUEST['sa'] (that should be not empty and not equal to options),
* $_REQUEST['board'] (that if the topics are in a different boards should be equal to the destination board id)
* $_POST['notifications'] (that should be not empty if you want to merge the notifications too)

and that's all AFAICS.


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

Advertisement: