XF 1.5 Redirect after 'Mark Forums Read'

Jwrbloom

Active member
Where can I change the redirect after the User "Mark Forums Read"? Right now it takes the User back to the topic list. I'd rather it take them back to the Forum home page.
 
It'll take them back to the discussion list if they only choose to mark that forum read. If you want them to be taken back to the forum list, then mark all forums read.
 
You will need an add on to change the redirect url for public function actionMarkRead(). Or you can change it manually. That function can be found in the Forum.php file in this path: library/XenForo/ControllerPublic.

Change this bit of the code:

PHP:
return $this->responseRedirect(
                    XenForo_ControllerResponse_Redirect::SUCCESS,
                    XenForo_Link::buildPublicLink('forums', $forum),
                    new XenForo_Phrase('forum_x_marked_as_read', array('forum' => $forum['title']))
                );

to this:

PHP:
return $this->responseRedirect(
                    XenForo_ControllerResponse_Redirect::SUCCESS,
                    XenForo_Link::buildPublicLink('forums'),
                    new XenForo_Phrase('forum_x_marked_as_read', array('forum' => $forum['title']))
                );
 
Top Bottom