PDA

View Full Version : Keep redirections for merged threads


Andreas
01-25-2005, 10:00 PM
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.

In postings.php FIND

$DB_site->query("DELETE FROM " . TABLE_PREFIX . "thread WHERE threadid = $mergethreadid");


REPLACE that with

$DB_site->query("UPDATE " . TABLE_PREFIX . "thread SET open = 10, pollid = $threadid WHERE threadid = $mergethreadid");

sabret00the
01-26-2005, 09:46 AM
this is great, another great one would be actually making redirects for merged threads.

i.e. making the old thread in the forumdisplay into a redirect to the merged thread.

Andreas
01-26-2005, 12:41 PM
Erm ... this is what this hack does ;)
The old thread (Thread A) will become a redirect to the merged Thread B.

sabret00the
01-26-2005, 01:05 PM
oooh that's even sexier :D

hockyfan
01-26-2005, 01:49 PM
Where'd you ever get the idea for a hack like this? ;)




Just kidding, thanks!


h