ZenphotoCMS Forum
New Paypal Page - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: General support (https://forum.zenphoto.org/forum-4.html)
+--- Thread: New Paypal Page (/thread-3222.html)



New Paypal Page - Laurent - 2008-07-03

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




New Paypal Page - sbillard - 2008-07-03

Sounds like a plan. Did you expect us to write the code for you?

`$prices = getImageCustomData();

if (!empty($prices))

echo 'Buy a picture';

}`

will get you to your custom buy.php page where you can display the image, etc.




New Paypal Page - Laurent - 2008-07-04

Hi,
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




New Paypal Page - Laurent - 2008-08-31

I"m late, come back from holiday...
I just made a donation.
thank a lot

Laurent




New Paypal Page - acrylian - 2008-08-31

Thanks a lot!




New Paypal Page - Laurent - 2008-09-15

Ouch !!,
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
`` i put in my buy php file.

Regards
Laurent




New Paypal Page - sbillard - 2008-09-15

There are no siginificant changes in the paypal plugin between 1.1.7 and 1.2. (Not sure what 1.18 is.)




New Paypal Page - Laurent - 2008-09-15

Oh,
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




New Paypal Page - Laurent - 2008-09-15

I found :

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




New Paypal Page - sbillard - 2008-09-15

What are you trying to pull on us? First there is no such thing as zenphoto 1.18. second, the zenPaypal plugin which was introduced in zenphoto 1.1.6 has never had a function named printBuySizedImage ()




New Paypal Page - Laurent - 2008-09-16

Wow, relax.
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 "[img]' . getUnprotectedImageURL() . '[/img]
';
}
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




New Paypal Page - acrylian - 2008-09-16

The code you posted is actually a function called ' getDefaultSizedImage()`. Not sure what that should do in the paypal plugin at all... Maybe something got mangled on update.




New Paypal Page - Laurent - 2008-09-16

Do not worry about that.
The important thing is that it works.

Best regards
Laurent