• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.5 Redirect after 'Mark Forums Read'

#1
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.
 

Amaury

Well-known member
#2
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.
 

wang

Well-known member
#4
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']))
                );