![]() |
|
Man I need some help with this random image thing - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: Themes (https://forum.zenphoto.org/forum-5.html) +--- Thread: Man I need some help with this random image thing (/thread-2477.html) |
Man I need some help with this random image thing - motionbug - 2008-03-19 I want to do this http://motionbug.com/eg.jpg I got everything basically together but I can't seem to get it so that I can have it create `<?php while (next_album()): ?> <li class="gal"> " class="img"> [img]<?php echo getRandomImagesAlbum()->getThumb() ?>[/img]` but i get duplicate thumbnails. is there a way just to pull the most 6 photos from a galley? Thanks Man I need some help with this random image thing - acrylian - 2008-03-19 `getRandomImagesAlbum()->getThumb()` That can't work. getRandomImages is a function that it self gets Random Thumbnails and not an object. If you want random images from the gallery use this (but outside the album loop): http://www.zenphoto.org/documentation/Zenphoto/_template-functions.php.html#functionprintRandomImages [i]is there a way just to pull the most 6 photos from a galley?[/i] The most what photos? We have several functions for statistic: http://www.zenphoto.org/documentation/Zenphoto/_template-functions.php.html#functionprintMostRatedImages http://www.zenphoto.org/documentation/Zenphoto/_template-functions.php.html#functionprintLatestImages http://www.zenphoto.org/documentation/Zenphoto/_template-functions.php.html#functionprintPopularImages http://www.zenphoto.org/documentation/Zenphoto/_template-functions.php.html#functionprintTopRatedImages Simply place theme somewhere outside the album or image loop. They work on all pages. Man I need some help with this random image thing - motionbug - 2008-03-19 thanks for that, but I guess I wasn't exactly clear. http://motionbug.com/eg.jpg So the first line of thumbnails is one Album The next line is another and so forth and so forth functionprintLatestImages() looked at that but how would you do it so it can go through the albums and then list the most revcent 5 then go to the next and do that also Sorry I am not great programmer I know my way around but nothing like you guys Man I need some help with this random image thing - acrylian - 2008-03-19 Alright, I didn't get it right. In that case try printlatestimages() that as an option for a specific album. Try in your loop from above instead of this part `" class="img"> [img]<?php echo getRandomImagesAlbum()->getThumb() ?>[/img]getFolder());` That should do it. Although it contains no link to the album itself. You have to add that otherwise in a albumname or so. |