Creating a folder only shown on startpage

Hy, is there a possibility to create a folder in zenphoto, which is only shown at the startpage (i use that random image function) BUT not in zenphotos library at all?

that would be cool ;-)

I have this question, b´cause i got problems with vertical and horizontal images, on the startpage only landscape images should be shown. So i thought i could create a folder where i just put some images in, that contain only these specific parameters.

Comments

  • acrylian Administrator, Developer
    Create an unpublished album and write a custom function that gets its the data directly from the db.
  • puh, sounds complicated. but of course i got to figure out by myself...

    any tip?
  • How can i connect to the database?
  • acrylian Administrator, Developer
    The database is already connected, take a look at function within template-function.php as a guide
  • oky! but before i go to the hills:

    --> getAlbumId [line 3222]

    am i right with that?
  • I tried, but got an error showing up:

    `<?php $randomImage = getRandomImagesAlbum(getAlbumId(11)); $randomImageURL = getURL($randomImage); print <br />
    "imagegetSizedImage('400')."' alt='".$randomImage->getTitle()."'/>"; ?>`

    so, Album with id 11 is the unpublished album (got id from database), what´s wrong?

    I´m sorry, i´m really bad with php...
  • acrylian Administrator, Developer
    That would not work. Please take the time to read what is written in the functions guide.
    You should use this function instead if you want to show random images of a specific album: http://www.zenphoto.org/documentation-official/zenphoto/_template-functions.php.html#functionprintRandomImages (the above one shows only a random image of the currently selected album).
Sign In or Register to comment.