57
User beware! I am no programmer and the only PHP I know is reading the Welling & Thomson PHP & MySQL book (that too not halfway through to book!). I believed I have 'fixed' the print to shutterfly that doesn't print when you click on it. It only seems to bring you back to the top of the page.
After looking through pages and pages of Gallery forums and XOOPS I found zip so looking into the code, I found that in view_photo.php the form to submit the 'order' so to speak is not there and a couple of things. I don't know if this is going to create problems elsewhere but this is what I did.
Open
xoopsgallery/view_photo.php around line 219 look for this
and change it to this:
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 .="
";
}
$printService = $gallery->album->fields["print_photos"];
if (!strncmp($printService, "shutterfly", 10)) {
$adminCommands .= "document.sflyc4p.returl.value=document.location; document.sflyc4p.submit();return false">[print this photo on Shutterfly]";
$printShutterflyForm = 1;}}
In the very same file scroll down to about line 291 add this
if (isset($printShutterflyForm)) { ?>
}
. Be aware there are a few things closing tags that you might need to delete or add in. It works for me (
http://www.search-www.com - I'm moving servers and transfering domains so give this link about 2-3 days for it to work) good luck!