![]() |
|
Albums on image.php - 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: Albums on image.php (/thread-1054.html) Pages:
1
2
|
Albums on image.php - KiddoMono - 2007-01-07 I know this probably has been asked already somewhere, but I don't seem to find it... (And with the wiki still being down...) Anyway. I would like to list all albums on my image.php page (as text links). How can I do this? I was doing a simple copy/paste code method from the index.php, but it doesn't seem to be working. Any suggestions? Thx. Albums on image.php - KiddoMono - 2007-01-14 Is it possible that the next_ablum is looking for subalbums now, instead of albums? Albums on image.php - simon - 2007-01-21 I have exactly the same question. I am using a dropdown jump menu for quick links nav menu which is outputted on every page(image.php, index.php and albums.php). Since updating to latest version 1.0.6 it only outputs the info on index.php. I am currently using the following code to print the relevant info which was working perfectly before: Albums on image.php - KiddoMono - 2007-01-21 The weirdest part to me is that I created a new page (of my own) and the album listing is working great on that page. Maybe I can solve it that way...? Albums on image.php - KiddoMono - 2007-01-21 Okay found it. In the file "template-functions.php" (in the "zen" directory) you can find a function called "next_album" (somewhere around line 311). Change this part of the code: To this: Albums on image.php - simon - 2007-01-21 Thanks kiddomono, that worked for me. Kudos to you! Albums on image.php - trisweb - 2007-01-21 DANGER: That change disables sub-albums. If you want to loop the root albums, just set the context before calling the function: `set_context(ZP_INDEX); while (next_album()): ... endwhile; set_context(ZP_ALBUM);` In the future maybe I'll make this an option of the next_album() function, something like Albums on image.php - simon - 2007-01-22 Thanks for your help Tris! I will make the relevant changes. Albums on image.php - KiddoMono - 2007-01-22 Aha, even better, thx for the help! Albums on image.php - petter - 2007-03-09 So, how do I list the subalbums on the image.php page?? Albums on image.php - trisweb - 2007-03-09 you should just be able to call Albums on image.php - petter - 2007-03-26 I've tried this, but it doesn't work: ` Albums on image.php - simon - 2007-03-27 I used the following in conjuction with a drop down jump menu, which works fine. You can cut away the bits of form etc. -> should give you something which works in context.
Albums on image.php - protum - 2007-05-30 I too am looking to list sub-albums in image.php...but havent had any luck... I have no trouble listing parent albums in image.php with this code: ` According to trisweb above, this should work to list subalbums in image.php ` But nothing appears--there should be a bunch of subalbums listed.. This doesnt work either. ` It would be great if anyone could point me in the right direction on this. Thanks! Albums on image.php - protum - 2007-06-01 anybody? also, i'd like to list albums and subalbums on the index.php page Albums on image.php - teedog - 2007-11-21 I too am trying to list in image.php the subalbums of the image's immediate parent album. Not having much like, like protum. Here's an example: I'm trying to make Image5's page show a dropdown menu that lists/links to SubAlbum1, SubAlbum2, SubAlbum3. Albums on image.php - acrylian - 2007-11-21 Take a look at the function print_album_menu.php that is located in the zp-core/plugins folder of your zenphoto installations. Move the file to your theme's folder and call it in the head with That does exactly what you want and works on index, album and image.php and has an option for a drop down menu. How to use it is included in the file as comments. One drawback: The menu supports currently only one subalbum level. It will be expanded to support to all levels, but that may take a little time. Albums on image.php - teedog - 2007-11-22 Unfortunately printAlbumMenu() outputs a menu of all the albums and subalbums in your gallery it seems. I wish to only list the subalbums that are one level above the image I am viewing. I will play with it to see if I can modify for my needs. Thanks. Albums on image.php - acrylian - 2007-11-23 teedog: $option = "count" for image counter behind the subalbum name, "" for no image counter The parameters are optional if you want specify CSS-IDs to style the menu. You can leave them blank, too. $id1 = Insert here the ID for the main album menu like this. $active1 = Insert the ID for the currently active album link */ function printSubAlbumMenu($option,$id1,$active1) { if ($id1 != "") { $id1 = " id='".$id1."'"; } if ($active1 != "") { $active1 = " id='".$active1."'"; } // main album query $sql = "SELECT id, parentid, folder, title FROM ". prefix('albums') ." WHERE parentid is NULL ORDER BY sort_order"; $result = mysql_query($sql); while($row = mysql_fetch_array($result))
// sub album query - possibly these two queries could be done better... $sql = "SELECT id, parentid, folder, title FROM ". prefix('albums') ." WHERE parentid ORDER BY sort_order"; $result = mysql_query($sql); while($row = mysql_fetch_array($result))
// album view: list subalbums in this album for ($nr = 1;$nr Albums on image.php - senne - 2007-11-23 Your function uses "getIDForAlbum", I think this has to be getAlbumId. Anyways, great function! Exactly what i'm looking for here: http://www.zenphoto.org/support/topic.php?id=1883&replies=7 |