|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||||
|
|||||
|
PHP Picture Gallery
Well, i've been trying to add more new things to my website, and this came up as something people would like (i know, i can't believe i overlooked this either).
Any suggestions on how to do this? My current idea was to read a directory, do some sort of sort to them, and print them out 16 at a time (4x4). i can also pass a variale $skip through the url to say where i want to start. I'm not sure if this is the most efficient way, or if it will even work (i've already done a little directory reading). I also don't want to do mysql for this, although it could be an option if it is really simple. So, any other ideas on how to accomplish this? |
|
#2
|
|||||
|
|||||
|
I could distribute the code that I use for chiefdelphi's gallery.
![]() I have a non-vBulletin version that I used for a project in a User Interface class a year or so ago. It even has more features, like a discussion thread build into the 'display image' page, and other neato things. Let me see if I have it still, and it works. I'll get back to you. It would require PHP & mySQL. -Brandon |
|
#3
|
||||
|
||||
|
Write yer own! That is what I did atleast, and it has been going good so far. I wrote a combonation of scripts last year that allows you to add new galleries, new images, comments, descriptions, and edit every thing. It didn't take too long, but I don't know what your abilites are. You should be able to find a good free one, try hotscripts.com
I have included a picture of what my gallery looks like, as my site is currently offline. |
|
#4
|
|||||
|
|||||
|
well, my intent was go get ideas, not code. I have done all of our current website (http://www.lightningrobotics.com) which include members, many different news sections, events, polls, file uploads and managment, comments, ect. all by hand, (well, except for the calendar displaying thing 'cause i didn't feel like making another one when i had one that worked perfectly the way i wanted it). So i guess the answer to your question is that my abillaties are adaquite to do the job
So, any suggestions on how to solve/approach the task (not where i can find code), or how you did it in your website Also, i was thinking no mysql so you could add about 200+ pictures straight to a dirrectory, and you wouldn't have to do each one through a form that would query to the database. If i just searched the dirrectory everytime, it would lower on the grunt work, but would eliminate the ability to have descriptions or searches. Give and Take. hopefully i'll get people to read that this time ![]() |
|
#5
|
|||
|
|||
|
Chances are, if you want to do it, the geniuses behind PHP have predicted it.
http://www.php.net/manual/en/ref.dir.php Use those commands to read all the files in the picture directory. Although if you want to sort them you would have to have some sort of file naming convention that contains the date so your script can tell how to organize it. One suggestion would be to mix mysql and this directory reading method. Have an admin script that you run everytime you dump a bunch of files in the folder. The script compares the new directory to the current list in the mysql db and adds the new files into the mysql db using the current date and time. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How do I change my gallery picture? | MarkF | CD Forum Support | 2 | 26-03-2003 10:26 |
| picture gallery | Mike Schroeder | CD Forum Support | 5 | 23-09-2002 00:20 |
| Anyway to subscribe to the picture gallery??? | Elgin Clock | CD Forum Support | 2 | 16-05-2002 16:42 |
| Picture gallery counts | Tom Fairchild | CD Forum Support | 2 | 12-02-2002 07:58 |
| new picture gallery | Brandon Martus | General Forum | 9 | 17-07-2001 15:52 |