XF 2.2 Stuck with "Building with XenForo 2"

Kirby

Well-known member
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

  • AV-ThreadTitles-10.0.33 Release Candidate 3 (1).zip
    15.8 KB · Views: 2

Anatoliy

Well-known member
I don't know... I looked for changes in the code and didn't find. And refine search thingy still doesn't work.
 

Kirby

Well-known member
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:

Anatoliy

Well-known member
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.
 

Kirby

Well-known member
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 :(
 
Top