Hi all,
I 'll like to have a paypal link from the image.php opening to a new page.
I use the custom data off the image in order to control different price so i put this code
in image.php
`$prices = getImageCustomData();
if ($prices == "")
echo "";
else {
">Buy a picture}`
My problem is that i want to replace the getFullImageURL fonction by a new php file (buy.php for example). In this file i would display the picture and some text. All this file shoud be theming by the CSS files.
Hope you understand me.
Regards
Laurent
Comments
`$prices = getImageCustomData();
if (!empty($prices))
echo 'name.'&image='.$_zp_current_image->filename>">Buy a picture';
}`
will get you to your custom buy.php page where you can display the image, etc.
Not sure i really understand the meaning of :"Sounds like a plan" even with google translate.
All i want is some help to paste the picture in a another php file. You gave me the full solution, I really appreciate.
I open a paypal account (i have to validate my credit card). I'll will give you some donation. You make a good work and for me is the unique way to thank you.
I 'll write another post when the wired transfet will be effective.
Regards
Laurent
I just made a donation.
thank a lot
Laurent
I upgrade my site to 1.2 version and paypal doesn't work anymore !
So I rool-back to 1.18 and it's work again.
Did you change something in the paypal system ?
I think that the problems come from
`<?php printBuySizedImage(getImageTitle()); ?>` i put in my buy php file.
Regards
Laurent
How i can you explain that it's work when i put the old script back ?
It's maybe a typo mistake in the function, but i don't find where the function is at this time.
Laurent
In the 1.2 [2213] there are no more printBuySizedImage function in the template-function.php.
So i paste the from the 1.18 version and it's now.
Is there a reason that this function as gone or it is just a mistake ?
Regards
Laurent
I just report some factual thing, but you are right, i made a mistake the previous was this one : version 1.1.7 [1842], sorry.
2nd : I'm not a php coder, you gave me the code of one function (look at your second answer) so when i saw this function :
`
function printBuySizedImage($alt, $class=NULL, $id=NULL) {
global $_zp_flash_player;
//Print videos
if(getImageVideo()) {
$ext = strtolower(strrchr(getUnprotectedImageURL(), "."));
if (($ext == ".flv") || ($ext == ".mp3") || ($ext == ".mp4")) {
//Player Embed...
if (is_null($_zp_flash_player)) {
echo "";
} else {
$_zp_flash_player->playerConfig($imagepath,$image['title']);
}
}
elseif ($ext == ".3gp") {
echo '
';
}
elseif ($ext == ".mov") {
echo '
';
}
}
`
I wonder how i can write it !!! for me it's impossible!
But i most important is that the script works fine
Regards
Laurent
The important thing is that it works.
Best regards
Laurent