Jump to content
xisto Community
Sign in to follow this  
sxyloverboy

How Would I Make A Picture Gallery? Make a picture gallery in php

Recommended Posts

Ok everyone i am very new to php and ive been reading some tutorials on php but somehow they dont really teach me anything usefull. just how to echo hello world and all that. I know HTML and CSS.

 

What i want to do is make a photography website. In this site i want to have Galleries and show the pictures in there. Now your probably thinking why dont you just do that in html.

 

I would want to have pictures and have that picture assigned to a category or two and then i have the list of catgory and and when i goto them php just looks for the pics which fit to that category.

 

Now as i said i dont really know a lot of php so if this isnt really possible please just tell me.

 

What would be best for me would be some example code that explains a bit how it works that i can just copy and paste and then form to my needs.

 

Thanks in advance, Lucas

 

Notice from cmatcmextra:
Topic titles are important and should be as descriptive as possible. Even more descriptive than the description field. Renamed title from How would I do this? to suit the topic better.
Edited by cmatcmextra (see edit history)

Share this post


Link to post
Share on other sites

I have a PHP gallery on my website (here). I wrote it my self using different bits of tutorials, PHP.net and other codes I'd written in the past. It works by having a separate folder for each category and you just navigate to the relavent folder for those images. For example, I have two galleries, one at /gallery/ which has fractals and one at /tg_gallery/ for Terragen. It could easily be adapted to get folder names for galleries and create an index of all the galleries. If you like the look of it I would be happy to give you the code and help you adapt it to your needs.

You could also try a pre-made gallery such as Copper Mine (link). They always have mods and themes you can download and customise.

Share this post


Link to post
Share on other sites

My site, (when I get it hosted) is also a gallery, mine is of fantasy images such as dragon and wizards etc. I wrote the scripts for it and instead of using categories I gave each image a description and added a search function. It is a bit tedious writing the descriptions, but that was the way I wanted to go so I could teach myself PHP and make something useful at the same time.As rvalkass said, if you're new to PHP you could always use a pre-made script such as Coppermine. I have used this script, it is very good and has many options. If you want to learn PHP then write your own script, yes it can be frustrating, but it is also very rewarding when you learn how to do it yourself.

Share this post


Link to post
Share on other sites

I have a PHP gallery on my website (here).


Hm i dont really know what you coded in this site and im not trying to be harsh or anything but its a bit plain for me. i dont really know how php works but maybe i could have a php file for each image with the information on it. like where the image file is, where the thumb file is, what the title is, what the keywords are, what gallerie it belongs in ect. and then have something that scans all the files and checks where which ones belong to and creates the galleries from there. and then has a page for each image that shows the title, description and maybe even exif information.

So for a pre-made gallery cms ive tried two of the ones in fantastico. (Coppermine and 4images) and i have to say they are more oriented towards a community than a page that reflexts the works of one person.

rcalkass: i really appreciate your help and everything and if you get what i wrote above and know something like that id really be happy if you could help me.

Share this post


Link to post
Share on other sites

There are many Gallery scripts available, it shouldn't be too hard to find one that suits your needs. If you don't find one you like, look at an existing gallery script and make the changes you want, check first that the original author permits this. Just by looking on one site planet-source-code.com I found 21 gallery scripts. Try them out and see which one you like. I hope that helped. ;)

Share this post


Link to post
Share on other sites

You could try scripts ready for download and installation like the ones in your cpanel (e.g. coppermine, gallery). There's another cool php script that's easy to install and easy to personalize (tons of cool skins) one referred it to me a few days back and right now I just installed the current version and it works fine. ;)

minigal website

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.