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

Fixed $postHash Added Before $extraParams

Jaxel

Well-known member
#1
I am extending the Thread route prefix controller in order to add an $extraParam to my links called "format".
Code:
<?php
 
class EWRporta_Route_Thread extends XFCP_EWRporta_Route_Thread
{
    public function buildLink($originalPrefix, $outputPrefix, $action, $extension, $data, array &$extraParams)
    {
        if (!empty($data['format']))
        {
            $extraParams['format'] = $data['format'];
        }
 
        return parent::buildLink($originalPrefix, $outputPrefix, $action, $extension, $data, $extraParams);
    }
}
Example:
http://8wayrun.com/threads/soulcalibur-v-ttt2-playable-at-nec-xii.8827/?format=default

You will notice on that page that when you click on any of the links for that thread (page-nav for example) it will keep that "format=default" extra parameter. The problem is when you click on any of the post-permalinks. When you click on them, it creates a link as follows:

http://8wayrun.com/threads/soulcalibur-v-ttt2-playable-at-nec-xii.8827/#post-311703?format=default

As you can see, the "#post-311703" is before the "format-default"... it should be after.