Anton's Latest Images

OK. If I can get this answered, I'll have all of the anton functions, including those for show most popular and highest rated (hit counts and ratings respectively) working.

The functions are basically all the same, but they tank at the image generation of the thumbnails. Anton uses the cache directory, I changed that to reference the actual thumbnail image, so that if it didn't exist in the cache it would create it. Worked fine under 1.0.3. However, note here that it doesn't show the images. (See the bottom of the screen for the 3 blank image frames under "Show Latest Images". Here is the function for show_latest_images that I am using:

` function show_latest_images($number) {

$images = query_full_array("SELECT images.albumid, images.filename AS filename, images.title AS title, albums.folder AS folder FROM ".prefix('images')." AS images, ".prefix('albums')." AS albums WHERE images.albumid = albums.id AND images.show = 1 ORDER BY images.id DESC LIMIT $number");

$size = '_'.zp_conf('thumb_size').'_cw'.zp_conf('thumb_crop_width').'_ch'.zp_conf('thumb_crop_height');

foreach ($images as $image) {

$filename = $image['filename'];

$album = $image['folder'];

$desc = $image['title'];

echo '';

if (zp_conf('mod_rewrite') == false) {

echo '';

} else {

echo '
';

}

/* echo 'image
'; */

echo 'image';

echo '';

}

}`

Note where I commented out the cache "echo" line, and replaced it with a direct link to i.php. That reference to i.php gets me an album doesn't exist error. Since I'm using 1.0.4, mod_rewrite isn't on, and the syntax seems correct.

What am I missing, is it anything obvious?

Comments

  • Sorry, credit for these functions goes to Anton, and I added a couple of extended ones for the hit counts, and ratings, which now are working as well. Wanted to make it clear what the "anton" functions were. ;)
  • duh. path to i.php was wrong. oh, i need a break from code. back to the workshop! :)
Sign In or Register to comment.