Portfolio Gallery Help?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Shultzy
Forum Newbie
Posts: 4
Joined: Sun Jul 24, 2011 8:24 pm

Portfolio Gallery Help?

Post by Shultzy »

Hi everyone, first post here. I am in the process of designing my photography/design portfolio page, and have hit a problem. I know it CAN be resolved, but I'm just struggling to know HOW to resolve it. I am new to coding in PHP, although I can fairly easily find my way around existing code. I am fluent in HTML/CSS, and becoming confident in JavaScript (if that will help?).

First of all, here is the link to my test page: http://www.jacobshultz.com.au/test/photography.php

I have it set up so that using PHP it reads image files in the directory /test/photos/[categoryname], and then it finds thumbnails for those images from the directory /test/thumbs. The script then displays the thumbs and links them to the full sized image.

What I would like to do is this:
- Upon clicking the image thumbnail, a new page is loaded (using some sort of a query? I'm really not sure), with the full sized image displayed in the page (in the same position where the image slider is placed on the photography.php page linked above).

- Under the image will be the image name, and possibly some EXIF data? (date taken, location, description, etc.)

- Finally I want PayPal buttons set up on this page as well. Obviously they need to be customised for the image (This will require simply using the same variable as the image name, I'm guessing)

I think that's it. I know it's a lot to request help for, but at the moment I'm at a loss as to how to do what I need to do. I know it can be done in some way/shape/form, as I've seen it on other sites, however I simply don't have the knowledge in PHP to get me started. Can anyone help?

Thanks so much in advance,
Jacob :)
User avatar
Jonah Bron
DevNet Master
Posts: 2764
Joined: Thu Mar 15, 2007 6:28 pm
Location: Redding, California

Re: Portfolio Gallery Help?

Post by Jonah Bron »

Shultzy wrote:- Upon clicking the image thumbnail, a new page is loaded (using some sort of a query? I'm really not sure), with the full sized image displayed in the page (in the same position where the image slider is placed on the photography.php page linked above).
Instead of linking to the image, link to another page and pass the file name in the url (like ?image=sunset.jpg). On that page, take the file name, and place it into the src attribute of an <img> tag.
Shultzy wrote:- Under the image will be the image name, and possibly some EXIF data? (date taken, location, description, etc.)
PHP has a built-in library for handling EXIF data: http://php.net/exif
Shultzy wrote:- Finally I want PayPal buttons set up on this page as well. Obviously they need to be customized for the image (This will require simply using the same variable as the image name, I'm guessing)
That would require Buy buttons in the Paypal Web Payments Standard service. But, you have to either manually make a button for each image, or use the Paypal Button Manager SOAP API.

Just ask for clarification on these points as you need it :)
Shultzy
Forum Newbie
Posts: 4
Joined: Sun Jul 24, 2011 8:24 pm

Re: Portfolio Gallery Help?

Post by Shultzy »

Thanks for the reply Jonah! That certainly clears things up.

My next problem is the fact that my image thumbnails are generated automatically, therefore it is difficult to implement individual 'custom' links, based on individual images (i.e. ?sunset.jpg, ?sunrise.jpg). Is there someway to do that automatically through a variable?
User avatar
Jonah Bron
DevNet Master
Posts: 2764
Joined: Thu Mar 15, 2007 6:28 pm
Location: Redding, California

Re: Portfolio Gallery Help?

Post by Jonah Bron »

Do you mean a PHP script shows the thumbnails? If yes, then you just have to change the code a bit. Post it here.
Shultzy
Forum Newbie
Posts: 4
Joined: Sun Jul 24, 2011 8:24 pm

Re: Portfolio Gallery Help?

Post by Shultzy »

Yes. However I spent some time on it yesterday, and tthrough using the $_GET function and the EXIF function, managed to get it to work well. Just some formatting and the PayPal to set up now. Thanks for your help :)
User avatar
Jonah Bron
DevNet Master
Posts: 2764
Joined: Thu Mar 15, 2007 6:28 pm
Location: Redding, California

Re: Portfolio Gallery Help?

Post by Jonah Bron »

Great. Side note, are those your pictures? They're very good. All in Australia?
Shultzy
Forum Newbie
Posts: 4
Joined: Sun Jul 24, 2011 8:24 pm

Re: Portfolio Gallery Help?

Post by Shultzy »

Yeah, they are all mine :) All in Australia, mostly around my state. I'm actually only 15, so trying to get my name out there at the moment, hopefully with a sale here or there.
Post Reply