JOOM::GALLERY::FORUM

JoomGallery 3.x JUX => Frontend => Topic started by: doopz on 16-11-2018 07:11:36



Title: JoomSearch
Post by: doopz on 16-11-2018 07:11:36
Set Joomsearch search mode to images, description and author selected for search and no results.


Title: Re: JoomSearch
Post by: MrMusic on 16-11-2018 14:20:32
Hi,

is the search plugin 'JoomSearch' installed and activated?
It is needed for the search module. See here (http://www.en.joomgallery.net/downloads/joomgallery-for-joomla-3/modules/joomsearch.html) and here (http://www.en.joomgallery.net/documentation/plugins/search-plugin-joomsearch/interface-to-the-module-joomsearch.html).


Title: Re: JoomSearch
Post by: doopz on 24-03-2019 03:18:05
Is there any way to expand the default search to search authors/owners?

Although Joomsearch is a cool plugin, it is not working very well with my site. I like the search results much better with the default search bar, I just need it to be able to search Authors/Owners. Is this possible?


Title: Re: JoomSearch
Post by: MrMusic on 25-03-2019 12:46:45
...I like the search results much better with the default search bar, I just need it to be able to search Authors/Owners. Is this possible?
In JoomSearch plugin in the second tab you can define exactly what to use for:
Descriptions / comments / authors / owners.
What do you mean with "default search bar"? The Standard Joomla Search module?
Then the JoomSearch plugin is the solution for this.


Title: Re: JoomSearch
Post by: doopz on 25-03-2019 20:50:03
I'm unsure what search bar it is, but the one we currently use can be set it up through the Joomgallery configuration and set up it's results outcome and column and even displays the thumbnails; which is required for my site.

With the Joomsearch plugin, the ajax popup isn't ideal.
Even after disabling the popup, the results display on the main page (which I do not want, I'd rather it appear on a new page) and it disrupts the entire design of the website. The results page design is quite bare, and does not seem to be very configurable within the settings. Sure, it could search various areas (author, owner etc.) but the results look much worse in my opinion.

I just thought maybe there would be an "easy" way to allow the search I'm using to search through authors and owners.


Title: Re: JoomSearch
Post by: MrMusic on 26-03-2019 13:20:45
I'm unsure what search bar it is, but the one we currently use can be set it up through the Joomgallery configuration...
Ok, so you are using the search in the JoomGallery component. This is different than the search with the plugin JoomSearch or module.

The search in the component is currently searching in title, description and owner.
If you want to stay with this search you would have to modify the code to search for the "author".
By changing lines 78-80 in the file components/com_joomgallery/models/search.php
you could change the search accordingly.


Title: Re: JoomSearch
Post by: doopz on 26-03-2019 14:12:51
Okay, so would I just add a line and just add "author"??

ie:

OR author       LIKE '.$this->_db->q('%'.$searchstring.'%')

???


Title: Re: JoomSearch
Post by: MrMusic on 26-03-2019 14:23:59
You must use the database column name:
Code:
OR a.imgauthor      LIKE '.$this->_db->q('%'.$searchstring.'%').'


Title: Re: JoomSearch
Post by: doopz on 28-03-2019 01:29:37
Oh!
That worked perfectly!! Thank you so much!!!


Title: Re: JoomSearch
Post by: doopz on 01-04-2019 05:24:58
One last thing, is there a line I could add to also search categories?


Title: Re: JoomSearch
Post by: MrMusic on 02-04-2019 11:46:00
Yes, for search the category title you can add this:
Code:
OR ca.name          LIKE '.$this->_db->q('%'.$searchstring.'%').'


Title: Re: JoomSearch
Post by: doopz on 09-04-2019 22:36:42
Thank You!!

What I don't understand is; why it comes up without results if I search for an image name and a category for instance.

It seems you have to be VERY specific otherwise it's turns up with no results.

And is there a way to enable it to search just within a category that I'm in as opposed to it searching the entire site?