2.7.0 beta Search ONLY in Keywords, possible ?

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

Post Reply
clesage
Posts: 6
Joined: Wed Sep 01, 2010 9:23 am

2.7.0 beta Search ONLY in Keywords, possible ?

Post by clesage »

Hello

I need to tweek a little bit PHPMYFAQ

The main goal is to search ONLY in keywords (not in the content, not in the thema)

I found this code in Search.php (line 152)

if (is_numeric($searchterm)) {
$search->setMatchingColumns(array($fdTable . '.solution_id'));
} else {
$search->setMatchingColumns(array($fdTable . '.thema', $fdTable . '.content', $fdTable . '.keywords'));
}

I tried to remove the thema and content var

$search->setMatchingColumns(array($fdTable . '.keywords')); <= not working, no result
$search->setMatchingColumns(array($fdTable . '', $fdTable . '', $fdTable . '.keywords')); <= not working, no result

How can i do ?

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

Re: 2.7.0 beta Search ONLY in Keywords, possible ?

Post by Thorsten »

Hi,

you have to change the file inc/PMF_Search/Database.php as well, please check the setMatchingColumns() and getMatchingColumns() methods as well.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
clesage
Posts: 6
Joined: Wed Sep 01, 2010 9:23 am

Re: 2.7.0 beta Search ONLY in Keywords, possible ?

Post by clesage »

Hi

As you are the coder, could you help me with your code ?

What can i change to have ONLY keywords search in client interface AND admin interface
How do you do the index.php?action=view tree , i don't understand how categories are sorted (Edit an article menu)

I really don't know how people could use phpmyfaq, my installation is 'basic' and nothing is working properly. Could i send you my whole DB on mysql to test it ??
Thorsten
Posts: 15725
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: 2.7.0 beta Search ONLY in Keywords, possible ?

Post by Thorsten »

Hi,

what's not working?

btw, if you're using the beta version, it's not ready for production yet.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Post Reply