Znpage theme - customizing home page

Hi, I'm trying to swap the default home page with images of my choice. I think I could achieve it in one of two ways: either displaying images with a particular tag, e.g 'start'; or creating a gallery which would be excluded from the list of galleries and shown only on the first page (the later seems to be more work).
The thing is I can't find in the documentation how I could display filtered image list (with both link, and description).
Is there any easy way to achieve this goal? Thanks in advanced.


  • acrylian Administrator
    You will probably need to use the dynamic album feature. There is a tutorial on the user guide. You also will need to get familiar with the object model to actually display that on the homepage. There is a tutorial as well. Of course before all that you should be familiar with Zenphoto theme. There is - you guessed it..;-) - a tutorial as well.
  • mc44 Member
    Maybe I'm a dummy but I can't find it. I'm hitting search box, but perhaps I'm looking for something wrong? I went through the whole functions documentation to no success. Please help. Otherwise I'll just make a new db query for desired images - but I don't think it's a 'proper' way to do it.
    Thanks in advanced.
  • By "it" I am presuming you mean creating a dynamic album as acrylian has suggested.

    Once you have done a search returning what you want in the dynamic album click on the admin toolbox link on the search page. The dropdown will have a link to create an album.
  • mc44 Member
    Not sure, how this works, but I my 'static' albums, I tagged photos with a 'start' tag, but when I try and type start in search box I get 0 results. Same is when I try typing a title of a particular photo. Do I need to enable search results somehow. I'm using zenpage theme.
  • mc44 Member
    Ok I've figured this out now my next question is how to disable this dynamic album from albums list?
  • acrylian Administrator
    A dynamic album is an album as all others. You need to unpublish it to remove it from the list (again admins loggedin with the rights see all) or make it private. It iwll then not appear anyway, not in menus, too.

    See the user rights tutorial on the user guide.
  • mc44 Member
    Next question :-)
    I've figured out how to use the dynamic album feature. The thing is that it works only on the list of albums. I tried to include it in the index.php with new Album() method:

    $albumobject = new Album($galleryobject,"startpage.alb");


    but the dumped object is empty:

    { ["name"]=> string(13) "startpage.alb" ["localpath"]=> string(47) "/public_html/albums/startpage.alb" ["exists"]=> bool(true) ["images"]=> NULL ["parent"]=> NULL ["parentalbum"]=> NULL ["gallery"]=> object(Gallery)#10 (7) { ["albumdir"]=> string(34) "/public_html/albums/" ["albums:protected"]=> NULL ["theme:protected"]=> NULL ["themes:protected"]=> NULL ["lastalbumsort:protected"]=> NULL ["data:protected"]=> array(23) { ["gallery_sortdirection"]=> int(0) ["gallery_sorttype"]=> string(2) "id" ["gallery_title"]=> string(23) "Gallery" ["Gallery_description"]=> string(45) "About

    /admin/options/gallery/description" ["gallery_password"]=> NULL ["gallery_user"]=> NULL ["gallery_hint"]=> NULL ["hitcounter"]=> NULL ["current_theme"]=> string(7) "zenpage" ["website_title"]=> string(23) "Gallery" ["website_url"]=> string(0) "" ["gallery_security"]=> string(6) "public" ["login_user_field"]=> bool(false) ["album_use_new_image_date"]=> int(1) ["thumb_select_images"]=> int(1) ["persistent_archive"]=> int(0) ["unprotected_pages"]=> string(98) "a:5:{i:0;s:5:"index";i:1;s:10:"normalizer";i:2;s:7:"gallery";i:3;s:7:"contact";i:5;s:7:"archive";}" ["album_publish"]=> int(1) ["image_publish"]=> int(1) ["album_session"]=> int(0) ["multilevel_thumb_select_images"]=> int(1) ["sort_direction"]=> int(0) ["codeblock"]=> string(39) "a:3:{i:1;s:0:"";i:2;s:0:"";i:3;s:0:"";}" } ["unprotected_pages:protected"]=> array(5) { [0]=> string(5) "index" [1]=> string(10) "normalizer" [2]=> string(7) "gallery" [3]=> string(7) "contact" [5]=> string(7) "archive" } } ["searchengine"]=> NULL ["sidecars"]=> array(0) { } ["manage_rights"]=> int(8388608) ["manage_some_rights"]=> int(262144) ["view_rights"]=> int(512) ["subalbums:protected"]=> NULL ["index:protected"]=> NULL ["lastimagesort:protected"]=> NULL ["lastsubalbumsort:protected"]=> NULL ["albumthumbnail:protected"]=> NULL ["subrights:protected"]=> NULL ["dynamic:protected"]=> bool(true) ["comments"]=> NULL ["commentcount"]=> NULL ["data"]=> array(37) { ["id"]=> string(2) "15" ["parentid"]=> NULL ["folder"]=> string(13) "startpage.alb" ["title"]=> string(9) "startpage" ["desc"]=> string(0) "" ["date"]=> string(19) "2012-06-07 15:42:56" ["updateddate"]=> NULL ["location"]=> string(0) "" ["show"]=> string(1) "1" ["closecomments"]=> string(1) "0" ["commentson"]=> string(1) "0" ["thumb"]=> string(1) "1" ["mtime"]=> string(10) "1339080176" ["sort_type"]=> string(0) "" ["subalbum_sort_type"]=> string(0) "" ["sort_order"]=> NULL ["image_sortdirection"]=> string(1) "0" ["album_sortdirection"]=> string(1) "0" ["hitcounter"]=> string(1) "0" ["password"]=> string(0) "" ["password_hint"]=> string(0) "" ["publishdate"]=> NULL ["expiredate"]=> NULL ["total_value"]=> string(1) "0" ["total_votes"]=> string(1) "0" ["used_ips"]=> NULL ["custom_data"]=> string(0) "" ["dynamic"]=> string(1) "1" ["search_params"]=> string(51) "words=start&searchfields=tags&inalbums=0&inimages=1" ["album_theme"]=> NULL ["user"]=> NULL ["rating"]=> NULL ["rating_status"]=> string(1) "3" ["watermark"]=> NULL ["watermark_thumb"]=> NULL ["owner"]=> string(3) "lea" ["codeblock"]=> string(39) "a:3:{i:1;s:0:"";i:2;s:0:"";i:3;s:0:"";}" } ["updates"]=> array(0) { } ["loaded"]=> bool(true) ["table"]=> string(6) "albums" ["unique_set"]=> array(1) { ["folder"]=> string(13) "startpage.alb" } ["cache_by"]=> string(13) "startpage.alb" ["id"]=> int(15) ["use_cache"]=> bool(true) ["transient"]=> bool(false) ["tempdata"]=> array(0) { } }`
    I don't see here any images either filenames or ids
  • acrylian Administrator
    And here comes again the advise to get familiar with the object model.

    Alternatively you could use makeAlbumCurrrent() (view the doc for the correct name and usage) to make it a current album and then use the image and/or album loops (you read about these on the theming tutorial).
  • mc44 Member
    I got it but there's nothing about it in here http://www.zenphoto.org/news/zenphotos-object-model-framework or I'm reading a wrong documentation
  • acrylian Administrator
    That of course only explains the basics. To understand this you need to know what object orientation itself is:

    Then you need to review our function documentation which methods the album and image class have you can use.

    Sorry, we can't take you by the hand with this. The easiest for you is to make the album current and use the loops. BAsic php knowledge is not avoidable, sorry.
  • mc44 Member
    It's not about my lack of php knowledge it's just the lack of documentation.
  • Just what do you think is missing in the documentation? I rather suspect it really is your lack of basic knowledge. If you wish to do things beyond the basics then your knowledge must progress past the basics.

    For instance, if you really understand object programming you would not be suprised that there are no images listed when no method has been invoked that would populate the images.

    You might also want to put your arrogance on hold and pay attention to what acrylian has suggested as the best approach for you.
  • mc44 Member
    Sorry guys. Chillout, please.
    No intention to offend anyone. Honestly, I think it's not systematic enough for someone who wants to customize a core theme quickly and is dealing with the script for the first time. I reached my goal according to your advice. Otherwise I would do it in a less elegant manner. Great thanks for your help. Peace, no need for flames.
  • Feel free to contribute documentation that would someone to quickly customize a core theme.
  • acrylian Administrator
    Zenphoto is a quite complex tool if you leave the standard way. So it is not avoidable that you need to put some time into it to understand how it works. That is not different from any other CMS out there.

    So I would like to repeat that you are welcome to provide documentation on what you think is missing. But if you get into the object model you will see that you most likely don't know where to stop as you can do quite a lot things with it. Putting out images is the simplest actually.
Sign In or Register to comment.