• 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?

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! :)
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.