![]() |
|
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: Search results (/thread-8473.html) |
Search results - pennystewart - 2011-04-09 hi there, whenever i do a search it will display the text "Sorry, no image matches. Try refining your search." even when image matches do come up. the search actually works fine - it's just i can't figure out how to get rid of this text when search gives positive results. i am using zenphoto 1.4.0.1. my code looks like this: ` ` http://pennystewartdesigns.com/merrepen/gallery positive search result would be to search "emu" for example. negative search would be "Jamaica". Search results - gjr - 2011-04-09 You need to have $c increment in the album,image (news, pages) loops, essentially counting the number of matches. If there are no matches then the loops won't increment $c, which will be 0, then the no results message will output. Do you see $c++ in the album or image loops? Search results - pennystewart - 2011-04-09 Hmm, well that would explain it... my album & image loops on search.php look like this: ` "> "> "> ` Search results - gjr - 2011-04-09 `
` and make sure your "no results" code is below these two loops. Search results - pennystewart - 2011-04-10 thank you! works a charm now! |