Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
TheJackal84 Posted October 5, 2017 Posted October 5, 2017 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
Adriano Faria Posted October 5, 2017 Posted October 5, 2017 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.
TheJackal84 Posted October 5, 2017 Author Posted October 5, 2017 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
Adriano Faria Posted October 5, 2017 Posted October 5, 2017 8 minutes ago, TheJackal84 said: I did find some $quickSearch in some front files Where?
TheJackal84 Posted October 5, 2017 Author Posted October 5, 2017 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" />
TheJackal84 Posted October 5, 2017 Author Posted October 5, 2017 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
bfarber Posted October 5, 2017 Posted October 5, 2017 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.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.