XF 2.2 Stuck with "Building with XenForo 2"

Fitering seems to work after applying the changes I suggested in

... but you really need to clean up the code, it's basically a giant mess :D
 

Attachments

I don't know... I looked for changes in the code and didn't find. And refine search thingy still doesn't work.
 
Well, that's strange as it works for me :)

I did apply the three changes I already mentioned:
  1. Modified $viewParams
  2. Modified setupNoteFilterer
  3. Modifed the template
 
Last edited:
Well, that's strange as it works for me :)

I did apply the there changes I already mentioned:
  1. Modified $viewParams
  2. Modified setupNoteFilterer
  3. Modifed the template
Killed the day, it doesn't work.
I give up with this filterer thingy.
 
I am sorry that it doesn"t work for you, ad posted before it the filter action does work for me.

Your code posted in https://xenforo.com/community/threads/stuck-with-building-with-xenforo-2.207385/post-1584197

PHP:
$viewParams = [
        'notes' => $finder->fetch(),
        'total' => $finder->total(),
        'page' => $page,
        'perPage' => $perPage,
        'pageParams' => ['q' => $noteFilterer->getLinkParams()],
        'filterDisplay' => $noteFilterer->getDisplayValues()
    ];

PHP:
protected function setupNoteFilterer(): \AV\ThreadTitles\Filterer\Note
 {
    /** @var \AV\ThreadTitles\Filterer\Note $filterer */
    $filterer = $this->app()->filterer('AV\ThreadTitles:Note');
    $filterer->addFilters(
        $this->filter('q', 'array'),
        $this->filter('_skipFilter', 'str')
    );

    return $filterer;
 }

Code:
<xf:selectrow name="q['order']" value="{$pageParams.order}" label="Order By">

My changes as posted in https://xenforo.com/community/threads/stuck-with-building-with-xenforo-2.207385/post-1584215

PHP:
$viewParams = [
            'notes' => $finder->fetch(),
            'total' => $finder->total(),
            'page' => $page,
            'perPage' => $perPage,
            'linkParams' => $noteFilterer->getLinkParams(),
            'pageParams' => $noteFilterer->getFiltersForForm(),
            'displayValues' => $noteFilterer->getDisplayValues()
        ];

PHP:
protected function setupNoteFilterer(): \AV\ThreadTitles\Filterer\Note
    {
        /** @var \AV\ThreadTitles\Filterer\Note $filterer */
        $filterer = $this->app()->filterer('AV\ThreadTitles:Note');
        $filterer->addFilters(
            $this->request,
            $this->filter('_skipFilter', 'str')
        );

        return $filterer;
     }

Code:
<xf:selectrow name="order" value="{$pageParams.order}" label="Order By">

If you can"t see the changes I am somewhat lost as to how I could provide further help :(
 
Back
Top Bottom