Display full size version of albumThumb

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.

Comments

  • jlang Member
    I use the following code (not to imply that it's the only or even a good way to do it.)
    `image" id="mainimage" alt="<?php echo getImageTitle();?>"/>`
  • tcserpa Member
    <b>jlang</b>: 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: `printAlbumThumbImage(getAlbumTitle())</code`> without the extra bits added on, specifically `<code>&s=thumb`.

    I am hoping i do not need to resort to a SQL query. Those hurt my head.
  • tcserpa Member
    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 "image
    "&i=".$row['thumb']."&s="

    .zp_conf('image_size')."" width="".zp_conf('image_size')."" alt="".$row['desc'].""/>";

    }

    // Free the resources associated with the result set

    mysql_free_result($result);

    }

    `
    which spits out: `Alright, let's try that again.` but i still get a thumbnail!!!

    crazy!
Sign In or Register to comment.