![]() |
|
print_album_menu question - 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: print_album_menu question (/thread-2959.html) |
print_album_menu question - missyani - 2008-05-25 I really like the new way plugins are being managed in ZP 1.1.6. I'm currently playing around a little with integrating the print_album_menu into a theme, but I'm wondering if there's a way of limiting the number of albums it lists when using the "list" option instead of the dropdown menu. I'd like to have it so it lists, for example, the 10 most recently added albums. Or perhaps there's another way of achieving this, outside of using the album menu plugin? I'll admit my PHP is limited, but any suggestions on how to accomplish this would be greatly appreciated. print_album_menu question - acrylian - 2008-05-25 Since the album menu is a menu it is clearly not meant for this and there is no way unless you want to code yourself. But we have a function for the latest albums: http://www.zenphoto.org/documentation-official/zenphoto/_plugins---image_album_statistics.php.html#functionprintLatestAlbums This of course shows the thumbs of the latest albums. print_album_menu question - missyani - 2008-05-27 Right. Except I don't want the album thumbs to show up, only a text links list. Since my list of albums is rather long, I didn't want all of them to be listed (I wanted to integrate the album menu as a sidebar menu, clearly a use for which it was designed, I'm sure). Thanks, anyway. print_album_menu question - acrylian - 2008-05-27 Right, the menu was designed for that, but not for the latest x albums..:-) I would suggest that you take a look at the plugin image_album_statistic.php that has the function for latest albums. The nightly build's version has been updated to optionally show title, desc and date. Since Zenphoto is about images I never thought of skipping them.... Would be not that hard, maybe I add that as an option. Meanwhile, you could double and rename that function and make a custom function for your theme where you take out the image display. Of course you could just "hack" that function but you will have to remember that with any further updates. See our theming tutorial about the usage of custom functions. print_album_menu question - wilsul - 2008-05-31 Can the code below be used to show latest albums on the main page? ` ` print_album_menu question - sbillard - 2008-05-31 Not quite. functions in PHP are called by listing the function name followed by the parameters enclosed in open and close parens. So the code you want from your example above is:
print_album_menu question - wilsul - 2008-06-01 thanks now it works, and is showing the latest albums but the path to the album is not showing good. My zenphoto is located in a folder called pasteventsv3/zp-core albums are showing www.site.com/album not www.site.com/pasteventsv3/album how can i solve this? print_album_menu question - acrylian - 2008-06-01 You just found a bug....:-( I will take care of that. EDIT: Sorry, not a bug, please check your htaccess file and run setup again. Maybe you forgot to copy thte included htaccess file. print_album_menu question - wilsul - 2008-06-01 I checked the htacces, and run setup again, ` print_album_menu question - acrylian - 2008-06-01 Then it must be related to the ZENFOLDER and WEBPATH definitions. So I assume the page you want to show the latest albums on is on top level? print_album_menu question - wilsul - 2008-06-01 yes print_album_menu question - wilsul - 2008-06-01 this is the result html i get [list][*] [img]pasteventsv3/cache/2008/04%20MAY%202008%20-%20FEAST%20OF%20ST%20JOSEPH%20-%20PROCESSION/A1%20Procession%20leaves%20Basilica.jpg_100_cw85_ch85.jpg[/img] 04 MAY 2008 FEAST OF ST JOSEPH PROCESSION Sun Jun 1 05:14:40 2008 [img]pasteventsv3/cache/2008/04%20MAY%202008%20-%20FEAST%20OF%20ST%20JOSEPH%20-%20VESPERS%20AND%20MASS/H8%20Concelebrants%20in%20procession%20back%20to%20Sacristy.jpg_100_cw85_ch85.jpg[/img] 04 MAY 2008 FEAST OF ST JOSEPH VESPERS AND MASS Sat May 31 17:44:33 2008 [img]pasteventsv3/cache/2008/27%20APR%2008%20-%20SANT%20ANTON%20-%20END%20OF%20QUARANTORE%20-%20PROCESSION/F7.jpg_100_cw85_ch85.jpg[/img] 27 APR 08 SANT ANTON END OF QUARANTORE PROCESSION Mon May 26 09:51:47 2008 [img]pasteventsv3/cache/2008/27%20APR%2008%20-%20SANT%20ANTON%20-%20END%20OF%20QUARANTORE/A6.jpg_100_cw85_ch85.jpg[/img] 27 APR 08 SANT ANTON END OF QUARANTORE Mon May 26 09:51:10 2008 [img]pasteventsv3/cache/2008/17%20APR%2008%20-%20THIRD%20ANNIVERSARY%20OF%20ARCHPRIEST%20REFALO/D8%20Start%20of%20Adoration%20of%20Holy%20Eucharist.jpg_100_cw85_ch85.jpg[/img] 17 APR 08 THIRD ANNIVERSARY OF ARCHPRIEST REFALO Mon May 26 09:50:27 2008 print_album_menu question - wilsul - 2008-06-01 i solved it by adding the folder name in the following code on image_album_statistics.php
";
print_album_menu question - acrylian - 2008-06-02 Ok, I see you apparently were using the 1.1.6, please try also the nightly, that corrects some issue in that plugin. |