Show images name on one album

Hello,

there is a way to show the name of images only in a specific album?

Can i use the block code on album settings?

My configuration:
Zenphoto version: 1.4.6
Template: zpBase

ThankYou

Comments

  • acrylian Administrator, Developer
    Yes, there is but you need to code it on the theme used by checking for the current album. See the object model tutorial on our site.

    Codeblocks by default work only in the place they are coded. For standard themes that means on the main album page (the thumbs).
  • Hello,

    following your advices, i've modified my album.php in this way:

    `
    <?php $albumname='YOUR_ALBUM_NAME';?>
    <?php $title1 = getAlbumTitle();?>

    <?php $title2 = serialize(getParentBreadcrumb());?>
    <?php $find = strpos($title2,$albumname); ?>

    <?php if (($title1 == $albumname) || $find) { ?>

    <?php printImageTitle(); ?>

    <?php } ?>
    `
    might be useful to someone...
  • acrylian Administrator, Developer
    A bit overly complicated ;-) You better actually check the unique album name, not the title. Especially important in case you plan to use the multilingual mode.

    `$_zp_current_album->name` gets you the folder name. The name includes always the parent albums like `toplevel/sublevel1/sublevel2/(…)`

    So much simpler:

    `
    if($_zp_current_album->name == 'YOUR_ALBUM_NAME") {
    printImageTitle();
    }
    `
    Also see http://www.zenphoto.org/news/zenphotos-object-model-framework
Sign In or Register to comment.