Member
Member
JerryE   16-02-2012, 21:47
#1

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 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.

Member
Member
JerryE   16-02-2012, 21:52
#2

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
Member
Member
sbillard   16-02-2012, 23:13
#3

Your approach is correct.

$_zp_current_album= $_zp_current_zenpage_news->getAlbum(); printCustomAlbumThumbImage([i]you fill in what you want for the parameters[/i]);

Administrator
Administrator
acrylian   17-02-2012, 10:30
#4

Before you can use printCustomAlbumThumbImage() you need to make the album current. Easier is probably to use the image class methods directly.

Member
Member
JerryE   19-02-2012, 01:43
#5

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:

`

Administrator
Administrator
acrylian   19-02-2012, 10:34
#6

Yep, that's it.

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.