ZenphotoCMS Forum
Images only in search results? - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: General support (https://forum.zenphoto.org/forum-4.html)
+--- Thread: Images only in search results? (/thread-4436.html)



Images only in search results? - RachelL - 2009-01-10

Hi,

Does anyone know if there is a way for the search results to show images only, and not albums?

Thanks in advance,
Rachel




Images only in search results? - sbillard - 2009-01-10

You would have to modify the search.php page of your theme to omit the album display part.




Images only in search results? - RachelL - 2009-01-10

Thanks Sbillard,

That's the only thing I've tried so far; when I do that, the first page of the search results is empty, but page #2 onwards starts displaying the images alone perfectly with no albums.. the thing I deleted was the section with
to endwhile

I'm using the default theme with v1.1, would the new version allow this to work or should it work all the same?

Thanks for the help,
Rachel




Images only in search results? - RachelL - 2009-01-10

Sorry, I'm using v1.2.1 not 1.1!




Images only in search results? - sbillard - 2009-01-10

You are right, the pagination will include any albums found. The only way to do what you want is to 'criple' the album part of the search engine. Find function getAlbums() in class-search.php and insert return array()' as the first line of the function.




Images only in search results? - RachelL - 2009-01-10

It worked perfectly, thank you so much!

Rachel