How do I display the AlbumThumb inside the ZenPage news loop?

I am writing my own theme that utilizes ZenPage and CombiNews. In the next_news() loop, when the current news item is an album, I wish to display a custom sized album thumbnail. It appears that I want to use printAlbumThumbImage() or perhaps getAlbumThumbImage() in an <img> tag. I verify that the getNewsType() == "album" before I try to display the thumb. Is that the right approach?

I've looked at the news loop in Zenpage's news.php, but it packs too much together for my taste (no offense intended).

I admit to being new at working with HTML, CSS, and PHP combined and I think that I am probably just having difficulty in getting the syntax and escape sequences correct. I have tried several variations and I get lots of interesting results ranging from nothing, to "not an object" errors to a crashed page.

Can someone provide a couple lines of correctly formatted, escaped code that I can plug into the next_news() loop of my index.php to simply display the current news item's album thumb?

I realize this is a noob type of question and I appreciate your patience.

Comments

  • Some of my config Info:
    Zenphoto version 1.4.2.1 [9138] (Official Build)
    Current locale setting: en_US.UTF8
    Current gallery theme: SimpleMix
    PHP version: 5.2.14
    Graphics support: PHP GD library bundled (2.0.34 compatible)
    PHP memory limit: 96M (Note: Your server might allocate less!)
    MySql version: 5.1.54
    14 active plugins:

    class-video v1.4.2
    colorbox v1.4.2
    comment_form v1.4.2
    contact_form v1.4.2
    deprecated-functions v1.4.2
    security-logger v1.4.2
    show_not_logged-in v1.4.2
    tag_extras v1.4.2
    tiny_mce v1.4.2
    xmpMetadata
    zenpage v1.4.2
    zenphoto_news v1.4.2
    zenphoto_sendmail v1.4.2
    zenphoto_seo v1.4.2
  • Your approach is correct.

    `
    $_zp_current_album= $_zp_current_zenpage_news->getAlbum();
    printCustomAlbumThumbImage(you fill in what you want for the parameters);
    `
  • acrylian Administrator, Developer
    Before you can use `printCustomAlbumThumbImage()` you need to make the album current. Easier is probably to use the image class methods directly.
  • Thank you both for your help!

    sbillard's code didn't work out the box for me but it gave me some more clues. Here's what I end up with:

    `

    <?php<br />
    if(getNewsType() == "album") {

    echo "imagegetAlbumThumb()."'/>";

    }?>

    `

    Thanks again.
  • acrylian Administrator, Developer
    Yep, that's it.
Sign In or Register to comment.