Hi all,
First, snaps to Tristan for coming up with this great app. Now, I know I shouldn't have, but I've been playing around with /zen/i.php. I downloaded and fiddled with the Stoppeddesign theme for a while, and thought of how I wanted to implement Zenphoto on my site. Anyway, I've now created new functions within i.php (as Stoppeddesign did) to produce different-sized thumbnails. However, as a result, I can no longer view the full-sized images on the image.php template...

Here is my current i.php, lines 28-58:
`$size = $_GET['s'];

if ($_GET['f'] == "true") { $size = $size."f";};

} else {

return false;



if ($_GET['f'] == "true") {

$thumb_crop = true;

$thumb_size = 250;

$thumb_crop_width = 210;

$thumb_crop_height = 210;

$thumb = true;};

// RHJF - thumbnails 600x400

if ($_GET['x'] == "true") {

$thumb_crop = true;

$thumb_size = 600;

$thumb_crop_width = 600;

$thumb_crop_height = 400;

$size = $size."x";

$thumb = true;};

// RHJF - thumbnails 300x200

if ($_GET['y'] == "true") {

$thumb_crop = true;

$thumb_size = 300;

$thumb_crop_width = 300;

$thumb_crop_height = 200;

$size = $size."y";

$thumb = true;};

} else {

$thumb = false;


Some notes - I altered the original Stoppeddesign function for my own purposes, so this isn't the one that's distributed by Ben Spicer (kudos to him). What are currently the first few lines in the above excerpt ($size) I moved from below, because it made it work... Or, at least, so I thought. It made my different-sized thumbnails work, at least.

Has anyone got any suggestions for what I can do to fix the problem? I know I should probably just slap the back of my hand and revert to the original files, but I've now got so far! You can see the workings of my theme at http://www.richardflynn.net/zenphoto. (My current 'Photos' section is powered by Markku's iPAP.)

I'm not really a PHP expert – I'm happier playing with XHTML/CSS – but can tinker with the best of 'em. However, in this instance I've tinkered slightly too far...

Keep up the good work everyone: I really hope that the developers might consider incorporating an above-board system where theme developers can choose thumbnail sizes for different parts of the page! (If that makes any sense.)

Thanks in advance for any help.

Richard Flynn


  • trisweb Administrator
    I do believe it's in the statements like: ($_GET['y'] == "true")

    You shouldn't actually be looking for the string "true" -- for that, your URLs would have to look like i.php?s=600&x=true&y=true -- but you're looking for sizes, not true/false!

    To see if the variable is set, you have to do this:

    `if (isset($_GET['y'])) {

    $y = $_GET['y'];

    // Do stuff with $y here...


    And $_GET['y'] contains the value of the variable.

    Also, I'm not sure what you're trying to do with `$size = $size."x";`... That would make a string like "600x" and then "600xy" with `$size = $size."y";` which isn't useful.

    Good luck! I'm actually planning on adding this feature to the main release someday.
Sign In or Register to comment.