I am really new at customizing the code for components, modules, and bots. I tried to follow your very clear instructions, but the bot doesn't work for me.
I only want three fields searchable: name, city, and researchinterests (a CB custom field I created). So, I edited lines 64-77 as follows:
// customize this query to show your results and specify search fields as desired
$query = "SELECT a.name AS title,"
. "\n CONCAT_WS( ', ', a.name, b.city,b.cb_researchinterests ) AS text,"
. "\n '' AS created,"
. "\n '' AS section,"
. "\n '2' AS browsernav,"
. "\n CONCAT( 'index.php?option=com_comprofiler&task=userProfile&user=', a.id ) AS href"
. "\n FROM #__users AS a"
. "\n INNER JOIN #__comprofiler AS b ON b.user_id = a.id"
. "\n WHERE ( a.name LIKE '%$text%'"
. "\n OR b.city LIKE '%$text%'"
. "\n OR b.cb_researchinterests LIKE '%$text%' )"
. "\n GROUP BY a.id"
. "\n ORDER BY $order"
I wasn't sure if the new bot makes profiles searchable through the default public search (NOT what I want) or through the profile search box in the CB component. It didn't work either way. When I logged in and did a profile search for a word that I know is in the cb_researchinterests field of my profile, I got no results.
So, I'd be grateful for any assistance someone can give me.
Please Log in to join the conversation.