Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted October 5, 20177 yr So I am trying to add a $table->quickSearch function to a table on the front end but it don't show, I have tried loads of different ways but can't get it there, The filters / sort and advanced search are all working it's just the quickSearch that isn't, It works fine on the admin panel though, Is it not made for the front end of am I missing something obvious right in front of me?, I have decompiled loads of IPS files and only really found the $table->quickSearch on the admin panel files
October 5, 20177 yr I requested this before and someone said (Brandon, IIRC) that you can do it if you load proper templates/JS files, currently available only in ACP tables. And yes, it was made to work only on ACP.
October 5, 20177 yr Author 11 minutes ago, Adriano Faria said: I requested this before and someone said (Brandon, IIRC) that you can do it if you load proper templates/JS files, currently available only in ACP tables. And yes, it was made to work only on ACP. I did find some $quickSearch in some front files, I will need to look into them more and see where the path takes me, Cheers
October 5, 20177 yr 8 minutes ago, TheJackal84 said: I did find some $quickSearch in some front files Where?
October 5, 20177 yr Author 3 minutes ago, Adriano Faria said: Where? \applications\calendar\dev\html\front\browse\birthdaysTable.phtml \applications\core\dev\html\front\global\reactionLogTable.phtml \applications\core\dev\html\front\global\reputationLogTable.phtml there is a few between 15-25 they all have <ips:template parameters="$table, $headers, $rows, $quickSearch" />
October 5, 20177 yr Author 1 minute ago, Adriano Faria said: Tks. Will take a look too. also found this \system\Helpers\Table\Custom.php (3 hits) Line 99: $quickSearchColumn = $this->quickSearch; Line 100: $rows = array_filter( $rows, is_callable( $this->quickSearch ) ? $this->quickSearch : function( $row ) use ( $quickSearchColumn ) Line 102: return mb_strpos( mb_strtolower( $row[ $quickSearchColumn ] ), mb_strtolower( trim( \IPS\Request::i()->quicksearch ) ) ) !== FALSE; Might be helpful
October 5, 20177 yr I implemented this in a custom project I did. I basically had to add the ACP table mixin javascript file as a plugin javascript file. The front end does not support quick searching out of the box I'm afraid.
Archived
This topic is now archived and is closed to further replies.