Remove Answer from Search Results

You made an own skin or theme for phpMyFAQ. You can share it here with others!

Moderator: Thorsten

Post Reply
terryrogers
Posts: 14
Joined: Tue Mar 08, 2016 10:49 am

Remove Answer from Search Results

Post by terryrogers » Tue Mar 08, 2016 10:53 am

How can I remove the answer section from search results?

Thorsten
Posts: 14431
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Remove Answer from Search Results

Post by Thorsten » Tue Mar 08, 2016 7:29 pm

Hi,

which version do you use?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist

terryrogers
Posts: 14
Joined: Tue Mar 08, 2016 10:49 am

Re: Remove Answer from Search Results

Post by terryrogers » Tue Mar 08, 2016 8:50 pm

v2.8.26

Although will look to upgrade to v2.9 once it is released out of beta/alpha testing. And likewise v3.0 once released as final stable. :)

Thorsten
Posts: 14431
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Remove Answer from Search Results

Post by Thorsten » Wed Mar 09, 2016 8:02 am

Hi,

just remove these lines:

https://github.com/thorsten/phpMyFAQ/bl ... #L323-L327

This will work with v2.9, too (maybe not the same lines, but same code).

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist

terryrogers
Posts: 14
Joined: Tue Mar 08, 2016 10:49 am

Re: Remove Answer from Search Results

Post by terryrogers » Wed Mar 09, 2016 9:16 am

I've removed these lines, but results are still showing with Answer:

Is there a cache I need to clear perhaps?

Ive attached what I am now seeing and the current version of Search.php can be seen here...
https://onedrive.live.com/redir?resid=2 ... file%2cphp
You do not have the required permissions to view the files attached to this post.

Thorsten
Posts: 14431
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Remove Answer from Search Results

Post by Thorsten » Wed Mar 09, 2016 9:22 am

Hi,

but this is instant response, right?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist

terryrogers
Posts: 14
Joined: Tue Mar 08, 2016 10:49 am

Re: Remove Answer from Search Results

Post by terryrogers » Wed Mar 09, 2016 9:30 am

Yeh?

Is that different?

Thorsten
Posts: 14431
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Remove Answer from Search Results

Post by Thorsten » Wed Mar 09, 2016 9:36 am

Hi,

yes :)

It's this code here: https://github.com/thorsten/phpMyFAQ/bl ... #L164-L170

Change the code to:

Code: Select all

                $html .= sprintf(
                    "<li><strong>%s</strong>: %s</li>\n",
                    $categoryName,
                    $oLink->toHtmlAnchor()
                );
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest