![]() |
|
show latest album only - 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: show latest album only (/thread-493.html) Pages:
1
2
|
show latest album only - dendraya - 07-05-2006 hi guys, show latest album only - Jasper - 25-07-2006 This would be superexcellent! A feature I'm currently missing on my homepage... show latest album only - antoxa - 26-07-2006 here it is
} function get_album_image($id) {
} just add it to your zen/functions.php file end and then add show_latest_album($number) to your theme show latest album only - CJ92 - 02-08-2006 Hi, I really want to use this script, unfortunately I have no idea how. What I am looking for is, on the main page, display the last 3 or 4 albums (the most recently added), and then have a main page that contains all of the galleries. Excuse my ignorance, but is this something that would be able to use to do that sort of thing? show latest album only - antoxa - 05-08-2006 yes. show latest album only - Guest - 10-08-2006 thanks for that function antoxa. I was looking for a 'list latest images' function like this. here's what I've come up with: function list_latest_images($number) { $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 ''; echo ''; } } ` show latest album only - antoxa - 14-08-2006 I've already posted latest images function in this forum, so use search show latest album only - roraz - 15-08-2006 Is there a way to change the latest albums code above so you can limit the characters in the albums title (if too long)?? currently Im using this in my index.php for listing album titles those album titles that are too long are shortened and a "..." is placed at the end of the title to show that it was shortened is there a way to do the same with the above code, if you don't want longer album titles? show latest album only - antoxa - 15-08-2006 to roraz: there is a zenphoto function truncate_string show latest album only - antoxa - 15-08-2006 here is my(taken from zenphoto admin :] ) latest comments function show latest album only - roraz - 15-08-2006 antoxa, how would i employ that in your latest album code, to get a short album title? My knowledge of php is practically non existent ??! show latest album only - antoxa - 16-08-2006 i was wrong about truncate_string it doesn't work correctly here how it should look: function truncate_string2($string, $length) { paste it in your functions.php file show latest album only - roraz - 16-08-2006 I have this tag for showing a galleries total number of photos: would there be a way to include this within the hack, say like if I want it next to the title within the h3 tags?? show latest album only - antoxa - 21-08-2006 you want your title to look like this show latest album only - edasque - 21-08-2006 is this all going in the wiki ? There has been a lot of useful scripts recently that should be archived there:
show latest album only - antoxa - 21-08-2006 i will try to add all my hacks there show latest album only - roraz - 23-08-2006 it could look like this gallery_name > album_name Im just wondering if theres a way to show the total number of photos in a gallery as well?? =) show latest album only - antoxa - 23-08-2006 of course there is =) show latest album only - antoxa - 23-08-2006 sorry i mixed up a bit =) show latest album only - roraz - 24-08-2006 isn't that what I posted a few posts above?? What I was asking was if there was a way to include the total number of images in an album within the hack?? =) |