PDA

View Full Version : Keep Redirects for merged Threads


Andreas
07-06-2005, 10:00 PM
Keep redirections for merged Threads
This is just a fast redux of my vB 3.0 Mini-Mod, now as a Plugin for vB 3.5 :)

Description
If you merge Thread A into Thread B, Thread A will be deleted afterwards.
Now your users might be confused as they can't find the thread anymore.

This hack changes this behaviour: Thread A will become a redirect to the merged Thread B.

Details
1 Plugin XML

History
0.1 Initial Version for vBulletin 3.5
0.2 Added Support for Inline Moderation
0.3 Added Support for Table-Prefixes

Unfortunately no Screenshots as there is nothing to see :D

Please only click Install if you actually have installed/are using this Hack, and click Uninstall whan you don't use it any longer!

This Hack is redundant as of vBulletin 3.5 Final.
Do not install it on this or any higher Version

Biker_GA
07-07-2005, 01:43 PM
Hmmmmmm. I'm not getting a redirect message left behind. I've just tested by merging two threads into the same forum, and by merging two threads and moving to a different forum.

Andreas
07-07-2005, 01:47 PM
Works for me, no matter if the Threads are in the same Forum or in different Forums.

Christine
07-07-2005, 03:00 PM
Not working for me either -- same forum or different forums.

Andreas
07-07-2005, 03:11 PM
Hmm, then I don't know why :(
Can you put


die("Attempting to delete Thread " . $threadid . " as it was merged with " . $GLOBALS['threadinfo']['threadid']);


inside the if to see if it gets executed?

Biker_GA
07-07-2005, 04:34 PM
Do you want me to replace the existing code with that, or add it?

Biker_GA
07-07-2005, 05:57 PM
I just noticed something.. I did a split and move, and saw the options for merging a thread when I selected the "move" option. However, there was no option to leave a redirect in the dialog box.

Andreas
07-07-2005, 06:07 PM
Man I dont understand anything :)

From the Thread Tools mean you just select "Merge Thread".
In the upcoming dialog you enter the URL of the other Thread that should be merged.
Without this Hack, after the merge this other Thread will be deleted.
With this Hack it should become a redirect to the first one.

Christine
07-07-2005, 06:10 PM
Added the die statement, and that isn't it -- the query is executing. Gave me the 'merging threads - you will be redirected...' splash screen and took me to the new thread.

Just no redirect links.

I attempted a merge with 3 threads on this -- 2 in one forum and 1 in another, leaving the new combined thread in the forum where the 2 originated.

I have no other plugins for threaddata_delete -- so don't believe it is being stepped on.

Christine
07-07-2005, 06:10 PM
Man I dont understand anything :)

From the Thread Tools mean you just select "Merge Thread".
In the upcoming dialog you enter the URL of the other Thread that should be merged.
Without this Hack, after the merge this other Thread will be deleted.
With this Hack it should become a redirect to the first one.
HA!

I was using inline and thread checkboxes...

Edit to add: Just tested the 'add URL' way, and is working just fine. :D

Andreas
07-07-2005, 06:12 PM
Hmm ... dunno if inline works as I hadn't thought of this, lol.
*checking*

Biker_GA
07-07-2005, 06:24 PM
HA!

I was using inline and thread checkboxes...

Edit to add: Just tested the 'add URL' way, and is working just fine. :D

Yep. I was using inline as well. Why use the old fashioned method when we have these nifty new tools? LMAO

Andreas
07-07-2005, 06:53 PM
Well, I simply hadn't thought of it :)
Anyway, should be supported now.
Delete the old Plugin and redownload please.

Biker_GA
07-07-2005, 06:56 PM
Well, I smiply hadn't thought of it :)
Anyway, should be supported now.
Delete the old Plugin and redownload please.
LOL! Will do.

Christine
07-07-2005, 08:10 PM
That works like a charm. Thanks!!

BTW -- does this mean you are close on APM? :D This ZIP File has been automatically created with Advanced Plugin Manager (C) 2005 KirbyDE.

All Hacks are copyrighted to their respective owner.

This is a Release for vBulletin.org

Andreas
07-07-2005, 08:12 PM
It's work in Progress ;)

Biker_GA
07-07-2005, 08:45 PM
Works great now. :)

Paul M
07-08-2005, 12:59 AM
I'll give this a try.

I installed the 3.0.x version on our live forum and had to remove it after two days because of the errors it caused.

Andreas
07-08-2005, 01:09 AM
Hmm, which errors?
This Hack does not do much - it just changes the Threads to be redirects ...

Paul M
07-08-2005, 01:39 AM
SQL errors on replies, due to no parentid.

As best I could tell what I think was happening was that person A has thread 1 open, and were posting a reply - in the meantime thread 1 is merged with thread 2, leaving thread 1 as a redirect. Person A now hits submit, for their reply, and it fails as they are now trying to add a reply to a redirect.

phlogiston
07-08-2005, 11:15 AM
two things I've found with this:

1st. queries within the plugin need changing for THREAD_PREFIX ;)


2nd. not really a problem with this hack, just something I found unexpected; using the inline method of merging works differently - rather than merging thread 2 into thread 1 - it actually creates a new thread 3 containing both 1+2.
Means you get two redirects plus the new thread!
(or obviously however many threads you chose to merge)

Still, very nice & handy plugin :up:

Andreas
07-08-2005, 08:03 PM
Those bloody Table-Prefixes keep driving me nuts ;)

FD929
07-30-2005, 06:15 PM
2nd. not really a problem with this hack, just something I found unexpected; using the inline method of merging works differently - rather than merging thread 2 into thread 1 - it actually creates a new thread 3 containing both 1+2.
Means you get two redirects plus the new thread!
Great hack, though it would be nice for that not to happen. Anything you can do kirby? :)

Andreas
07-31-2005, 04:02 AM
Nah, I fear that would require major changes and can't be done without File edits.

/me hates File Edits!

FD929
07-31-2005, 04:21 PM
Right on. Yeah I hate them too. It's not big deal anyways, just delete the extra redirect it creates. :)

Andreas
09-28-2005, 09:11 PM
This Hack is now redundant as of vBulletin 3.5 Final
Do not install it on this Version

If you already have it installed, I recommend uninstalling it.

As this has become a standard feature, I am withdrawing support for this Hack.