Member
Member
tcserpa   2007-05-01, 18:38
#1

I would appreciate some help figuring out how to display the full size version of the selected album thumb image on a given album page. I have looked at the template functions until my eyes crossed and can't quite figure it out.

Thanks in advance.

Member
Member
jlang   2007-05-01, 21:29
#2

I use the following code (not to imply that it's the only or even a good way to do it.)
[img][/img]"/>

Member
Member
tcserpa   2007-05-02, 13:44
#3

jlang: Thanks for the reply, but that was not quite the answer i was looking for. That looks like the standard code for displaying an image on an image page, and does not seem to work properly on an ALBUM page because i cannot tell it which FullImageURL() to get.

What i really want is the file referenced by this code: [code]printAlbumThumbImage(getAlbumTitle()) without the extra bits added on, specifically&s=thumb[/code]`.

I am hoping i do not need to resort to a SQL query. Those hurt my head.

Member
Member
tcserpa   2007-05-02, 17:58
#4

so close. i wrote this function thing that looks like it should be giving me back the right info:
`function printFullAlbumThumb() {

global $_zp_current_album;

$thisAlbum = getAlbumTitle();

$query = sprintf("SELECT a.folder, a.title, a.thumb, i.desc

FROM albums AS a

LEFT JOIN images AS i ON i.filename = a.thumb

WHERE a.title='%s'",

mysql_real_escape_string($thisAlbum));

// Perform Query

$result = mysql_query($query);

// Check result

if (!$result) {

$message  = 'Invalid query: ' . mysql_error() . "n";

$message .= 'Whole query: ' . $query;

die($message);

}

// Use result

while ($row = mysql_fetch_assoc($result)) {

echo "[img][/img]";

}

// Free the resources associated with the result set

mysql_free_result($result);

}

which spits out:[img]/~tcserpa/tagsite/zp/zen/i.php?a=RESIDENTIAL&i=rear3.jpg&s=400[/img]` but i still get a thumbnail!!!

crazy!

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