Hi
I've got the Gallery module installed with one main gallery. I would like to try and use the search module to find individual images. The thumbnail template is formatted to show not only the image thumbnail, but also it's title and comments. I am using the Fancybox template.
At the moment if I search, even knowing that the image title contains a unique word the results return the page that the image appears on and then all the images in the gallery appear when you click on the search link.
Any suggestions how to narrow this down so the user can search for individual keywords and then only see the appropriate images. This may not be possible, but is certainly beyond my basic skills.
I'm using cmsms 2.1.5 and Gallery 2.1.6.
Any suggestions gratefully received.
Gallery image search
Re: Gallery image search
I'm sorry. That's just the way Gallery was designed to do.howey wrote:if I search, even knowing that the image title contains a unique word the results return the page that the image appears on and then all the images in the gallery appear when you click on the search link.
I don't think there is an easy way to make it act otherwise.
Re: Gallery image search
Yep - what Jos says. I think making the Search module work would be difficult
A possible alternative would be to have a input box on the thumbnails page that filters the images shown as the user types using javascript.
That would be fairly easy to do in just a few lines of js (assuming you have all the thumbnails on the page).
Here's a random fiddle that shows the kind of thing I'm thinking of: https://jsfiddle.net/rb7hm/4/
A possible alternative would be to have a input box on the thumbnails page that filters the images shown as the user types using javascript.
That would be fairly easy to do in just a few lines of js (assuming you have all the thumbnails on the page).
Here's a random fiddle that shows the kind of thing I'm thinking of: https://jsfiddle.net/rb7hm/4/
Re: Gallery image search
I guess search somehow returns the image ID which - I think - gives you some possible solutions:
* change the search template to link to the single image call of Gallery. Check this tag https://docs.cmsmadesimple.org/tags/cms ... action_url to create the url. Read Gallery help to learn how setup the single image template and how to call the single image action
* change the search template to add a query string to the Gallery url (http://....?...&img=<img_id>. Then in your Gallery template or Page template or page specific metadata use some smarty to check if the img parameter is set and if so, add some javascript to mimic a click on the image with that id.
* change the search template to link to the single image call of Gallery. Check this tag https://docs.cmsmadesimple.org/tags/cms ... action_url to create the url. Read Gallery help to learn how setup the single image template and how to call the single image action
* change the search template to add a query string to the Gallery url (http://....?...&img=<img_id>. Then in your Gallery template or Page template or page specific metadata use some smarty to check if the img parameter is set and if so, add some javascript to mimic a click on the image with that id.
Re: Gallery image search
No, Gallery only provides the gallery-id to search.velden wrote:I guess search somehow returns the image ID
Re: Gallery image search
What was I thinking...
Re: Gallery image search
Hi
Sounds as if this might be a tricky one.
Would it be possible to either add additional functionality to the Gallery module to allow an image search, or ...
I dabble with other CMS's but I use CMSMS as my go to solution. Dependent on cost, I would be willing to fund the expansion of the module if it benefited the wider community. I have an immediate need, although it's not critical, so this might be a way for me to feed back into the project. As a designer, who implements code, this would be beyond my skills.
Sounds as if this might be a tricky one.
Would it be possible to either add additional functionality to the Gallery module to allow an image search, or ...
I dabble with other CMS's but I use CMSMS as my go to solution. Dependent on cost, I would be willing to fund the expansion of the module if it benefited the wider community. I have an immediate need, although it's not critical, so this might be a way for me to feed back into the project. As a designer, who implements code, this would be beyond my skills.