Recent Images, Most Popular, Highest Rated, Latest Albums

So I couldn't figure out why my code I adapted from Anton wasn't working. I adapted his recent comments, images, and albums, and extended them to include highest rated, and most popular (based on other code culled from various postings on the forums). I finally determined that Anton was using the cache images rather than the actual images from the zenphoto image processor. The problem I saw with this, is that when there are no images in the cache directory (such as a new gallery, or a recently flushed cache) then it won't display anything.

So, I changed this line to read:

echo '<img src="'.WEBPATH.'/'.$album.'/image/thumb/'.$filename.'">';

which uses mod_rewrite functionality to grab the thumb sized image from the default settings for thumbnails in zp_conf. Note you do have to have mod_rewrite on to make it work, but it shouldn't be a big deal to modify it to pull from the non-rewrite link URLs.

Anyway, hope this helps someone. I'd be glad to share the full code with any one who wants it, but bear in mind it was adapted from code found at the website above, and uses hit counts, and ratings from other posters on this forum, so I take no credit for the code itself.

:)

Comments

  • I would love to have the recent images code for this as my library is getting pretty large now and images are getting buried within subalbums.
  • @aitf311-

    send me an email to craig (at) thinkdreams.com and I'll zip you up a copy of the functions file I use with the functions mentioned above in it.
  • thinkdreams - i emailed yesterday morning, perhaps I got caught as spam. Could you email me the code to aitf311 at gmail.com
  • Coming at you via email.
  • Hey thinkdreams I would love that code too if you wouldn't mind :) subjunk at gmail. Cheers!
  • aitf311 has kindly sent me the file, so cancel that request :) Thanks
Sign In or Register to comment.