Searchable in Joomla

dbain 05 Jan, 2011
I've created a list using ChronoConnectivity and I'm wondering is there a Joomla plugin that will add my ChronoConnectivity data to the global Joomla search?

I have a local search in the actual module, but can't figure a way so if someone searches using the Joomla search, data from the database will be called up.
GreyHead 05 Jan, 2011
Hi dbain,

Sorry, I can't help with that one.

How does the Joomla! search work? Not something I've ever looked at?

Bob
dbain 05 Jan, 2011
I found this documentation of how to create a Joomla search plugin. It is a little over my abilities but I'm going to give it a try.

http://docs.joomla.org/How_to_create_a_search_plugin

I'm not sure where to put the name of the table and fields in it I want searched which would be fname, lname, and body.

I'll post something if I can get it to work. Wish me luck!
GreyHead 06 Jan, 2011
Hi dbain,

It looks as though this is the main search query
//the database query; differs per situation! It will look something like this:
        $query = 'SELECT a.name AS title,'
        . ' CONCAT_WS( " / ", '. $db->Quote($searchNameofplugin) .', b.title )AS section,'
        . ' "1" AS browsernav'
        . ' FROM #__nameofplugin AS a'
        . ' INNER JOIN #__categories AS b ON b.id = a.catid'
        . ' WHERE ( '. $where .' )'
        . ' AND a.published = 1'
        . ' AND b.access <= '. (int) $user->get( 'aid' )
        . ' ORDER BY '. $order
        ;

Bob
kayostar 25 Jan, 2011
That query works great.
This topic is locked and no more replies can be posted.