Member
Member
pennystewart   2011-04-09, 20:50
#1

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:

`

`
i have read the theme tutorial & have done a search on google and the zenphoto support forum & could not find anything to help me...

http://pennystewartdesigns.com/merrepen/gallery

positive search result would be to search "emu" for example. negative search would be "Jamaica".

Member
Member
gjr   2011-04-09, 20:58
#2

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?

Member
Member
pennystewart   2011-04-09, 21:28
#3

Hmm, well that would explain it...

my album & image loops on search.php look like this:

`

">

">

">

`
where do i put this $c?

Member
Member
gjr   2011-04-09, 21:59
#4

`

and

`

and make sure your "no results" code is below these two loops.

Member
Member
pennystewart   2011-04-10, 04:04
#5

thank you! works a charm now!

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.