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 »

How can I remove the answer section from search results?
Thorsten
Posts: 15559
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Remove Answer from Search Results

Post by Thorsten »

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 »

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: 15559
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Remove Answer from Search Results

Post by Thorsten »

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 »

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: 15559
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Remove Answer from Search Results

Post by Thorsten »

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 »

Yeh?

Is that different?
Thorsten
Posts: 15559
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Remove Answer from Search Results

Post by Thorsten »

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