Add new field in searchkeyword module !

Hi there,

I added a new field in Builder > Profile fields and I called it (e.x. color).

 I have copied all the messages and stuff  from the nickname field.

I have checked in profiles mysql table and everything looks ok.

Well,

In SearchKeyword.php we have this in line 155:

 

function getSearchForm () {

    $aList = $GLOBALS['MySQL']->fromCache('sys_objects_search', '');

    $aValues = array();

 

So I checked the 'sys_objects_search'  table and I found the PHP pages that declare where searchkeyword module has to search in,

In my case template/base/script/BxBaseSearchProfiles.php

In BxBaseSearchProfiles.php

in line 13 we have this:

 'searchFields' => array('NickName', 'Headline', 'DescriptionMe', 'City', 'Tags'),

So, I added my new Profile field in there in this way:

'searchFields' => array('NickName', 'Color', 'Headline', 'DescriptionMe', 'City', 'Tags'),

But now when I go for search something I get Mysql error :

Database query error
Query:
SELECT COUNT(*) FROM `Profiles` WHERE 1 AND `Profiles`.`Status` ='Active' AND MATCH(`Profiles`.`NickName`, `Profiles`.`Color`, `Profiles`.`Headline`, `Profiles`.`DescriptionMe`, `Profiles`.`City`, `Profiles`.`Tags`) AGAINST ('red')
Mysql error:
Unknown column 'Profiles.Color' in 'where clause'
and then:
Found error in the file '/home/itoptale/public_html/inc/classes/BxDolSearch.php' at line 516.
Called 'db_value' function with erroneous argument #0.

Any ideas guys???

Many thanks

Quote · 3 Feb 2011

To change search you go to 'Profile Fields' then click on 'Search Profiles'.  Drag new search items there.  You can also click the radio button for 'Advanced Search', then click 'Keyword' items and select the fields in the list.

Quote · 3 Feb 2011

Thanks man you are right.

But it doesn't solve my problem.

Thank you anyway

Quote · 3 Feb 2011
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.