Great work! If I could code I'd help but look forward to it - will you be including web addresses and/or emails? Would make web links redundant then for business sites like ours.
Be glad to help beta test.
if (strcmp($gallery->album->fields["print_photos"],"none")) {
if (strlen($adminCommands) > 0) {
$adminCommands .="<br>";
}
$adminCommands .= "<a href=# onClick="document.sflyc4p.returl.value=document.location; document.sflyc4p.submit();return false">[print this photo on Shutterfly]</a>";
}
if (strcmp($gallery->album->fields["print_photos"],"none") &&
!$gallery->session->offline &&
!$gallery->album->isMovie($id)) {
$photo = $gallery->album->getPhoto($GLOBALS["index"]);
$photoPath = $gallery->album->getAlbumDirURL("full");
$rawImage = $photoPath . "/" . $photo->image->name . "." . $photo->image->type;
$thumbImage= $photoPath . "/";
if ($photo->thumbnail) {
$thumbImage .= $photo->image->name . "." . "thumb" . "." . $photo->image->type;
} else if ($photo->image->resizedName) {
$thumbImage .= $photo->image->name . "." . "sized" . "." . $photo->image->type;
} else {
$thumbImage .= $photo->image->name . "." . $photo->image->type;
}
list($imageWidth, $imageHeight) = $photo->image->getRawDimensions();
if (strlen($adminCommands) > 0) {
$adminCommands .="<br>";
}
$printService = $gallery->album->fields["print_photos"];
if (!strncmp($printService, "shutterfly", 10)) {
$adminCommands .= "<a href=# onClick="document.sflyc4p.returl.value=document.location; document.sflyc4p.submit();return false">[print this photo on Shutterfly]</a>";
$printShutterflyForm = 1;}}
if (isset($printShutterflyForm)) { ?>
<form name="sflyc4p" action="http://www.shutterfly.com/c4p/UpdateCart.jsp" method="post">
<input type=hidden name=addim value="1">
<input type=hidden name=protocol value="SFP,100">
<?php if ($gallery->album->fields["print_photos"] == "shutterfly without donation") { ?>
<input type=hidden name=pid value="C4P">
<input type=hidden name=psid value="AFFL">
<?php } else { ?>
<input type=hidden name=pid value="C4PP">
<input type=hidden name=psid value="GALL">
<?php } ?>
<input type=hidden name=referid value="gallery">
<input type=hidden name=returl value="this-gets-set-by-javascript-in-onClick">
<input type=hidden name=imraw-1 value="<?php echo $rawImage ?>">
<input type=hidden name=imrawheight-1 value="<?php echo $imageHeight ?>">
<input type=hidden name=imrawwidth-1 value="<?php echo $imageWidth ?>">
<input type=hidden name=imthumb-1 value="<?php echo $thumbImage ?>">
<?php
/* Print the caption on back of photo. If no caption,
* then print the URL to this page. Shutterfly cuts
* the message off at 80 characters. */
$imbkprnt = $gallery->album->getCaption($index);
if (empty($imbkprnt)) {
$imbkprnt = makeAlbumUrl($gallery->session->albumName, $id);
}
?>
<input type=hidden name=imbkprnta-1 value="<?php echo strip_tags($imbkprnt) ?>">
</form>
<?php }