![]() |
|
most recent images - 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: most recent images (/thread-768.html) Pages:
1
2
|
most recent images - asherwood - 2006-08-29 Is there a way of displaying the most recent images on the index page? Thanks most recent images - antoxa - 2006-08-31 http://www.zenphoto.org:8080/confluence/display/PLUG/Home most recent images - bbish007 - 2006-11-02 Has anyone details of this post as the link appears to be broken? I really need a way to display recent images. most recent images - koffee - 2006-11-03 `` this should work, I hope.. most recent images - koffee - 2006-11-03 It work only with mod rewrite enabled. And ZP version 1.0.2 for sure, don't know if in 1.0.3 too most recent images - bbish007 - 2006-11-03 Thanks for the reply koffe. I am using 1.0.3 and it works to a point. It seems that in 1.0.3 they changed the naming of the thumbs so they no longer are 'filesnames_thumb.jpg' but the filesname and then some dimensions. e.g. filename.jpg_100_cw85_ch85.jpg Any thoughts? Your help would be appreciated. most recent images - thinkdreams - 2006-11-03 bbish007- I have a function that seems to work well for me. You can see it in operation Here. / Show Latest Images / `function show_latest_images($number) { $iw = $cw = zp_conf('thumb_crop_width'); $ih = $ch = zp_conf('thumb_crop_height'); $sql = "SELECT * FROM ". prefix("images") ." ORDER BY id DESC LIMIT $number"; $result = mysql_query($sql); while($r = mysql_fetch_array($result)) { $id=$r['albumid']; $sql="SELECT * FROM ". prefix("albums") ." WHERE id = $id"; $album = mysql_query($sql); $a = mysql_fetch_array($album); echo ' [*]'; echo ''; echo '[img]'.WEBPATH.'/zen/i.php?a='.$a['folder'].'&i='.$r['filename'].'&s=thumb[/img]'; // echo '[img]'.WEBPATH.'/zen/i.php?a='.$a['folder'].'&i='.$r['filename'].'&w='.$iw.'&h='.$ih.'&cw='.$cw.'&ch='.$ch.'[/img]'; echo ''; echo ' '; } }``` most recent images - thinkdreams - 2006-11-03 `/ Show Latest Images / function show_latest_images($number) { $iw = $cw = zp_conf('thumb_crop_width'); $ih = $ch = zp_conf('thumb_crop_height'); $sql = "SELECT * FROM ". prefix("images") ." ORDER BY id DESC LIMIT $number"; $result = mysql_query($sql); while($r = mysql_fetch_array($result)) { $id=$r['albumid']; $sql="SELECT * FROM ". prefix("albums") ." WHERE id = $id"; $album = mysql_query($sql); $a = mysql_fetch_array($album); echo ' [*]'; echo ''; echo '[img]'.WEBPATH.'/zen/i.php?a='.$a['folder'].'&i='.$r['filename'].'&s=thumb[/img]'; // echo '[img]'.WEBPATH.'/zen/i.php?a='.$a['folder'].'&i='.$r['filename'].'&w='.$iw.'&h='.$ih.'&cw='.$cw.'&ch='.$ch.'[/img]'; echo ''; echo ' '; } }````` most recent images - thinkdreams - 2006-11-03 Sorry if the code got mangled. If it doesn't seem to come through right for you, let me know at craig (at) thinkdreams.com and I can email it to you. most recent images - bbish007 - 2006-11-06 Thats great, thanks Craig..... just what I was looking for. most recent images - EduardoMercovich - 2008-03-10 Hello Thinkdreams, kofee and bbish. This is just a suggestion. Since this function could make the home page more like a photoblog, which is a relatively widespread use of galleries, could it be inserted in the default theme available with a theme option? ("show last photos in the home page" and "how many photos to show in the home page?"). Should I post this in the Trac wiki to see if it is a popular desire? Best regards... most recent images - acrylian - 2008-03-10 That function is already a template function (this thread is a little old). You can do that simply by yourself. Just add `` on your index.php where you want them to be shown. Please take a look at our functions guide in the user guide section of our site, too. most recent images - EduardoMercovich - 2008-03-10 Hello Acrylian. Thanks a lot for your precise help. I have managed to find where to put it, and it works great. :-) However, I have no php or coding knowledge, and I don't know how to read/use the functions guide to create the paging (previous/next) links. If I manage to do it, which is the right place to document this how-to? The trac wiki? Thanks a lot and best regards... -- most recent images - acrylian - 2008-03-10 The trac wiki is more or less a place for users to add things, all important stuff is on the normal site. Regarding the pagelist the best would be you look at one of the standard themes how it's done there. The functions guide not that hard to read actually, you just need to get into it once. Example: most recent images - EduardoMercovich - 2008-03-11 Thanks Acrylian. After some trial and error, I could understand the syntax. However, it still doesn't print the page navigator (take a look @ http://eduardo.mercovich.net/fotos/ if you like). This is the code I inserted in the index.php: Ăštimas fotos... ` The latest 50 images are shown, but I have 77, so at least there should be a link with "siguiente". What am I doing wrong? Thanks a lot... :-) PS: maybe a hint... in the markup, the class is pagelist disabled_nav. Why?EM most recent images - acrylian - 2008-03-11 Re: pageslist Re: latest images most recent images - EduardoMercovich - 2008-03-11 Hi Acrylian. `` Ah, sorry, I had a syntax problem... Regarding ZP use, I want to use it as it is and with a navigable list, as a photoblog. However, I believe there is a workaround... :-) I am using 1 album ("Todas") with all the photos. The rest are dynamic albums except one specific album that has a password, since it is for the family only. I can make in the home page a list of the album "todas" that has pagination, and has all the photos except the ones in the family album (that don't have to be listed in the first page). Now, with your keyword "photoblog" (seems stupid but I didn't thought about that one, my fault) I searched and found a few posts regarding it, and the sigle physical album with N dynamic albums solution seems to have even more sense. I believe that would work perfectly for me (and for others, I hope). :-) Best regards... most recent images - acrylian - 2008-03-11 Ok, I see, it is of course possible to build a theme to use zp as a photoblog. If I recall right there has been an theme for that before I became developer, but that is now not compatible anymore. most recent images - -Vincent - 2008-04-28 Hello, I want to use the function in another page of my website (not on the index of my portfolio). I am a novice, sorry... Now, an error sentence is appearing : "Fatal error: Call to undefined function: printlatestimages() in /home.10.16/boutsdep/www/portfolio/8photos.php on line 55" Thanks a lot in advance for your help. Vincent most recent images - acrylian - 2008-04-28 I presume you mean a not-zenphoto-page: http://www.zenphoto.org/2008/01/hacks/#zenphoto-as-plugin |