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

XF 1.1 Where are post links converted to a page number?

Discussion in 'XenForo Questions and Support' started by Stephen Melton, Feb 4, 2013.

  1. Heya Everyone,

    I was wondering where a URL like this:

    Is converted into this:

    Specifically, I'm looking for which part of the code takes a post ID and finds the page it's supposed to be on.

    The reason why is a little tricky, but I'm essentially creating a system where each page in a thread can have a variable amount of actual posts. I can paginate this correctly, but I need to put a little extra logic in the part where those links are converted so links with just a post ID will go to the right page.

    Thank you very much for any help! :)
  2. Aha, found it!

    If anyone else is curious, it's the function

    public function getPostSpecificRedirect(array $post, array $thread,
                    $redirectType = XenForo_ControllerResponse_Redirect::SUCCESS
    In XenForo/ControllerPublic/Post.php.

Share This Page