Member
Member
Laurent   2008-07-03, 21:38
#1

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

Member
Member
sbillard   2008-07-03, 23:34
#2

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.

Member
Member
Laurent   2008-07-04, 21:19
#3

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

Member
Member
Laurent   2008-08-31, 16:56
#4

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

Laurent

Administrator
Administrator
acrylian   2008-08-31, 16:58
#5

Thanks a lot!

Member
Member
Laurent   2008-09-15, 18:27
#6

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

Member
Member
sbillard   2008-09-15, 18:57
#7

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

Member
Member
Laurent   2008-09-15, 19:47
#8

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

Member
Member
Laurent   2008-09-15, 20:00
#9

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

Member
Member
sbillard   2008-09-15, 23:07
#10

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 ()

Member
Member
Laurent   2008-09-16, 18:26
#11

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

Administrator
Administrator
acrylian   2008-09-16, 19:32
#12

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.

Member
Member
Laurent   2008-09-16, 20:59
#13

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

Best regards
Laurent

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.