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

Discussion in 'XenForo Questions and Support' started by Jwrbloom, Jul 25, 2016.

Tags:
  1. Jwrbloom

    Jwrbloom 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.
     
  2. Amaury

    Amaury Well-Known Member

    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.
     
  3. Jwrbloom

    Jwrbloom Member

    I know. I want to change that.
     
  4. wang

    wang Well-Known Member

    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']))
                    );
     
  5. Jwrbloom

    Jwrbloom Member

    Thank you.

    It makes sense to me when a User marks the forum read, they're done with the forum.
     
  6. wang

    wang Well-Known Member

    You are welcome sir.
     

Share This Page