profile search

18 years 1 month ago #7176 by kerron
Replied by kerron on topic Re:profile search
A PROFILE SEARCH IS CRITICAL!! i need one yesterday, id like a search box that has options to search the entire site, profiles or articles

www.itropica.com check us out

Please Log in to join the conversation.

18 years 1 month ago #7181 by lennox
Replied by lennox on topic Re:profile search
ford wrote:

The search feature is actually my code, written when CB was still beta 4. I don't know if anyone modified it since then.

I AM looking into re-writing it for RC2 / 1.0 stable but it still seems far away. Right now, I'm programming an internal messaging system for Joomla (like uddeIM and others). It's taking a long time (I'm not very skilled at programming, so it's a learning effort).

But it would be cool to get the search feature running (again), this time for RC2/1.0 final. But I am very sorry that I cannot give any guarantees on success and ETA.

Cheers from

Ford :)


Goodluck Ford! You're back :) :) :)


LENNOX
Official CB 3th Party Developer
Working on the CBRC2 Lennoxonline module
Official partner and PR-man of dcsFlashGames
RELEASED: Highest Karma Module
RELEASED: PROFILE VOTE KARMA PLUGIN


www.nightcity.nl

Please Log in to join the conversation.

18 years 1 month ago #7273 by beat
Replied by beat on topic Re:profile search
ford wrote:

The search feature is actually my code, written when CB was still beta 4. I don't know if anyone modified it since then.

I AM looking into re-writing it for RC2 / 1.0 stable but it still seems far away. Right now, I'm programming an internal messaging system for Joomla (like uddeIM and others). It's taking a long time (I'm not very skilled at programming, so it's a learning effort).

But it would be cool to get the search feature running (again), this time for RC2/1.0 final. But I am very sorry that I cannot give any guarantees on success and ETA.

Cheers from

Ford :)


Hi Ford,

Nice to see you around :)

Hope you will find the time this time ;)

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info

Please Log in to join the conversation.

18 years 1 month ago #8035 by mephistophele
Replied by mephistophele on topic Re:profile search
lmcguire wrote:

All,

I took the default Joomla contacts search bot, copied the XML and PHP files and modified them to query the CB table and fields I wanted. I attach it in case it's useful to others.

To modify it, change the .php file as follows:

1. On line 66, change the field names to show the field values you wish to use as the descriptive text of your results page.

(a is the default jos_users table; b is the default jos_comprofiler table)

In this case, I'm showing the name field from users and 4 custom fields from my CB profiles.

2. On lines 73 to 77, specify the fields you'd like to search. You can add or remove rows, just maintain the proper SQL syntax.

3. You may wish to change the order options found in the switch on rows 47 to 61.

I'm a newbie at all this, so hopefully others will be able to help if there are questions, but I've tested the files as they are in the attachment and they work fine for me.

{EDIT: Forgot to mention - install it and publish it as you would any mambot. The default search in Joomla will then include the CB fields you specify.]

Liz

Attachment bot_cbsearch.zip not found



Post edited by: lmcguire, at: 2006/01/26 23:23


Hi, i'd like to modify your bot in order to search only the default USERNAME of a user in the CB tables... How have i to modify the .php? I'm more newbie than you :laugh:
Thanks
:)

Please Log in to join the conversation.

18 years 1 month ago #8070 by spinoza
Replied by spinoza on topic Re:profile search
Ok, ive edited the file:

[code:1] // 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.cb_beschrijving,b.cb_plaats ) 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.cb_beschrijving LIKE '%$text%'"
. "\n OR b.cb_plaats LIKE '%$text%'"
. "\n GROUP BY a.id"
. "\n ORDER BY $order"
;[/code:1]

installed the mambot, published it, ..but doesnt seem to change anything for me.

anyone has a idea?

thanks!

Post edited by: spinoza, at: 2006/03/11 22:33

Please Log in to join the conversation.

18 years 3 weeks ago #9158 by tngenewhiz
Replied by tngenewhiz on topic Re:profile search
Thank you for making this available. I have installed CB on a genealogy/history site, where making connections is important!

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.

Moderators: beatnantkrileon
Time to create page: 0.269 seconds

Facebook Twitter LinkedIn