Firefox PHP

Moved posts: redirecting points to first post in a thread

Posted by mysza 
Moved posts: redirecting points to first post in a thread
December 21, 2011 08:09PM
Hi,

I've got problem with posts moved from one forum to another. Redirecting points to first post in the thread.

See:

http: //wspinanie .pl/forum/read.php?7,527421,527630
[wspinanie.pl]

redirecting to:

http: //wspinanie .pl/forum/read.php?23,527421

Phorum version 5.2.8

Best
Wojtek
Re: Moved posts: redirecting points to first post in a thread
December 21, 2011 08:37PM
you can only move full threads, not single posts therefore the redirect goes to the new place of the thread - thats all that the original post knows about the move.


Thomas Seifert
Phorum Development Team / Mysnip-Solutions.de
Custom Phorum and general software development
worry-free Phorum Hosting
Re: Moved posts: redirecting points to first post in a thread
December 21, 2011 09:10PM
I wasn't clear. Our users have done a lot of links pointing to posts inside the thread. I had to move a lot of this threads into new forum. Now those links are broken. Redirecting misses the second arguments (message_id) and points to thread only.
Re: Moved posts: redirecting points to first post in a thread
December 22, 2011 09:03AM
Quote
mysza
Hi,

I've got problem with posts moved from one forum to another. Redirecting points to first post in the thread.

See:

http: //wspinanie .pl/forum/read.php?7,527421,527630
[wspinanie.pl]

redirecting to:

http: //wspinanie .pl/forum/read.php?23,527421

Phorum version 5.2.8

Best
Wojtek

I've found the soulution. In "read.php" you have to add one argument to function:


} elseif($toforum=phorum_check_moved_message($thread)) { // is it a moved thread?

$PHORUM["DATA"]["OKMSG"]=$PHORUM["DATA"]["LANG"]["MovedMessage"];
$PHORUM['DATA']["URL"]["REDIRECT"]=phorum_get_url(PHORUM_FOREIGN_READ_URL, $toforum, $thread, $message_id);
$PHORUM['DATA']["BACKMSG"]=$PHORUM["DATA"]["LANG"]["MovedMessageTo"];

$PHORUM["DATA"]["HTML_TITLE"] = htmlspecialchars($PHORUM["DATA"]["HTML_TITLE"], ENT_COMPAT, $PHORUM["DATA"]["HCHARSET"]);
// have to include the header here for the Redirect
phorum_output("message");
Sorry, only registered users may post in this forum.

Click here to login