my gallery script

i’m so tired of all the gallery scripts available. maybe i’m just not looking at the correct location. i really don’t care about all the functionalities such as comments, rating, hits etc. i don’t even know why the scripts need a database support. i just want a script that quickly loads the photos and give me A LOT OF control of the layout so it will work with all of my themes.

here’s my idea. designate a folder for ALL PHOTOS for the photo album. let’s call this folder the root folder. each directory created within the root folder would a specific category. all folders created within the category folder would be subcategories. within each folder are all the photo files nothing else. there will be on php file in the root folder that holds the description of all photos in one big array.

when the script loads, it simply reads the root folder and then figure everything out from here. the script is able to generate thumbnails.

this would mean, you can upload the photos in bulk with ftp along with a description file and boom, your gallery should be updated. NO UPLOAD, NO DATABASE UPDATE and all those crap.

after looking around and trying a few different free scripts, i did not find anything that totally satisfy my need. then inspired by leslie’s gallery script , i’ve decided to write my own. it’s pretty much done. i still need to add a few more descriptions. btw thank you leslie for all your help during my development!

current features include:

  • auto read dir and its subdir
  • auto create thumbnails
  • auto generate the next and previous photo link
  • display __ number of random photos
  • display __ number of newest photos
  • auto delete thumbnails if the orginal photos are deleted
  • an admin script that allows me to regenerate thumbnails if necessary
  • an admin script that would generate my big description array like this
  • most importantly it will be compatible with all my themes! this means it’s validated xhtml strict

blah that’s all i can think of. i don’t think it will be sharing this script any time soon. it involves too much. but then sometimes i feel bad not sharing. we will see. if you think you will use a script like this, let me know.


37 Comments Leave a Comment

Krissy [ Quote ]

I really like this - it looks great!! I hate all the extra bits and pieces that come with most gallery scripts too; I rarely use them.

January 25th, 2005 at 6:37 pm
Marie [ Quote ]

I am sorry for asking you this in your comments. I know people can get annoying. I was just wondering, I am looking for a b2 comments hack, and there was one on this site. I found it on the b2 forums. Do you still have it or know where I can get it? Thanks, Marie

January 25th, 2005 at 8:10 pm
dodo [ Quote ]

well you could have emailed me about this.
what specific hack are you looking for?
did you try the search function on this site?

January 25th, 2005 at 8:37 pm
Marie [ Quote ]

Sorry I should have emailed you. I am looking for the “b2 commenter plugger hack”. I searched and found the post but the link to it did not work. Thanks =)

January 25th, 2005 at 9:13 pm January 25th, 2005 at 9:37 pm
Bubs [ Quote ]

I think you read me mind :) I was looking for a script for my photo album not long ago. I’m very interested in your script :) Good luck!

January 25th, 2005 at 9:40 pm
Bubs [ Quote ]

I’m so sorry!! The link I posted messed up the sidebar on the main page of the arzel XT2 theme :(

January 25th, 2005 at 9:41 pm
Marie [ Quote ]

Thanks Bubs, I have seen that post and the link of there doesn’t work either.

January 25th, 2005 at 9:42 pm
Joanne [ Quote ]

This script looks great! Hope you can share it in the near future :)

January 25th, 2005 at 10:21 pm
dodo [ Quote ]

if you just click on that link, it won’t work. if you copy and paste the url to a blank browser and load it, it will work. it’s my strict no hot link .htaccess

January 25th, 2005 at 10:54 pm
dodo [ Quote ]

bubs is always here creating new challenges for me :) fortunately php is so sweet, wordwrap comes to the rescue!

January 25th, 2005 at 11:09 pm
Sarah [ Quote ]

Great script! I found a simple photo gallery (from squidfingers) but it didn’t have all the features of yours. You can offer it as a paid script. It’d definitely be something I would buy. Also the script could be improved with captions, but that’s all I can think of at the moment.

January 26th, 2005 at 1:40 am
dodo [ Quote ]

well the caption is supposed to be your file name. you can add a description obviously. you are expected to give your photo file a meaningful name. i do want to improve it here and there. maybe allow a few options here and there. i will think about it. thanks :)

January 26th, 2005 at 2:58 am
Connie [ Quote ]

I know that there are some scripts that do all of that (almost) for you. Ipap and so on. But they dont look as nice by far. :-D

January 26th, 2005 at 4:41 am
Connie [ Quote ]

And of course you cant upload gifs with any script that I tested.

January 26th, 2005 at 4:43 am
Brenda [ Quote ]

Hey Dodo, I would definitely use a script like this! I was hunting high and low for a gallery script which doesn’t require mySQL as well. :P

January 26th, 2005 at 9:32 am
Sarah [ Quote ]

Basically, your script looks like an updated version of Squidfingers Gallery. I use it for my gallery. The only thing I don’t like about it is that I can’t organize photos by folders or categories.

I use a different gallery script but I didn’t like the code so much. That one, I think, uses captions that you put in a text file.

January 26th, 2005 at 11:07 am
Erin [ Quote ]

Ooh, looks very simple and clean. I use Cine’s gallery script , but it does use mysql. It’s very customizable. I do like the massive upload option yours has tho… Cine’s can only upload one at a time.

January 26th, 2005 at 11:58 am
dodo [ Quote ]

i really don’t think an external caption file is necessary. since you already have the description file. just name your file give_a_very_good_name.jpg and the script will replace all _ with space and get rid of the extension and use that as the caption. should be perfect. no extra work.

January 26th, 2005 at 12:36 pm
ecila [ Quote ]

awesome planning :)
i personally never use the ‘hits’ a picture get, or the ratings xP

But I do love SimpleViewer (http://www.airtightinteractive.com/simpleviewer/ - and my demo http://quiix.net/purr/grr/) It was so simple to set up and upload my pictures. The downside to this for your needs would be that it’s a flash viewer xD and obviously not very customizable with your layouts. But i’m just saying how that’s really simple too (i love it that it auto-generates thumbnails! which you plan to include, which is a nessessity! :D)

Good luck with your gallery dodo! :) And oh don’t be silly, and feel bad about not sharing. It’s YOUR HARD work, you should do what you please with it :)

January 26th, 2005 at 6:45 pm
dodo [ Quote ]

wow that’s a really cool script. thanks for sharing.

January 26th, 2005 at 8:07 pm
dodo [ Quote ]

leslie said it must use a lot of bandwidth since it loads the images even if you don’t view them. tho very good quallity images but haha it will be a killer for a site like mine that already has very severe bandwidth problem.

January 26th, 2005 at 8:12 pm
ecila [ Quote ]

lol, ahh that leslie, always the party pooper! heeh, but i admit, it probably does use up a lot of bandwidth (good thing my gallery is small, and i doubt will grow too much xD) But yea, must conserve bandwidth :x

January 26th, 2005 at 8:16 pm
dianna [ Quote ]

Very cool! How are you defining how the thumbnails will be created? How does it know where to crop (or are you doing that manually)?

Example: in /More_Andy_and_Dodo/Our_Old_Photos

I found the Coppermine gallery script to be pretty easy to use and it has a lot of things you can do in there… I used it for my sisters album.

January 27th, 2005 at 1:15 am
dodo [ Quote ]

no the thumbnails are generated automatically like i mentioned in the feature list. it’s just a php function that uses GD.
i don’t like coppermine coz i can not incoporate its design into my layout very easily. just like 4images, i will have to have a separate design for it. i don’t want that. also it has more features than i need. and also i don’t want to use a database.
i’m still trying to improve the script so i can add description more easily.

January 27th, 2005 at 9:56 am
dianna [ Quote ]

yah i dont like that about coppermine, but it was a quick solution.

about the thumbnails - i noticed that they are actually cropped - does GD have functionality to know where to crop or something?

January 27th, 2005 at 3:37 pm
Daynah [ Quote ]

Hey sis, you can also use this class to create thumbnails for your gallery script! It’s awesome. You just pass the width you want and it’ll generate it dynamically. You wouldn’t need MORE space to hold the thumbnails AND the original photos!

http://phpthumb.sourceforge.net/

January 27th, 2005 at 4:15 pm
cLin [ Quote ]

Have you ever tried http://www.photostack.org? It seems to have what you are looking for plus it’s already validated in xhtml.

January 27th, 2005 at 4:18 pm
dodo [ Quote ]

hehe i’m not as smart as daynah.. i wrote my own function but since she posted this, you can just use that :)

January 27th, 2005 at 4:21 pm
dodo [ Quote ]

aww thanks for sharing. great script but again i probably would have a lot more flexibility with layout with my own. plus i don’t see description.. and newest photos feature in the demo?

January 27th, 2005 at 4:24 pm
cLin [ Quote ]

Too be honest, I have no clue. I had that recommended to me and I noted some of the key features so I can recommend it if people ask for some gallery scripts to use.

Is yours going to be made available for the public? Or is it a private thing?

January 27th, 2005 at 4:27 pm
cLin [ Quote ]

Crap, I just read the last line. Nevermind.

January 27th, 2005 at 4:28 pm
dodo [ Quote ]

i might sell it. or trade it with graphics, like gorgeous xhtml validated layout for pe hehe.. but it’s not ready for release yet. lots work to do before that.

January 27th, 2005 at 4:30 pm
Sarah [ Quote ]

That would be very hard for me, LOL. I love to write long captions with my pics.

January 28th, 2005 at 12:55 am
dodo [ Quote ]

sarah.. are you talking about “caption” or “description” - i’d think caption is just a title for a photo. description can be lengthy. my script does support that. i.e. this photo. and i just improved my script last night so you can edit description thru cp. no longer have to do it manually.

January 28th, 2005 at 9:45 am
Heather [ Quote ]

I would love it if you could send me an email when you feel the need to share — this is EXACTLY what I have been looking for and I can’t find anything without frills. Everything else takes a while to modify and frankly I’m tired of learning someone elses completely different coding style just to make a decent photo gallery.

August 26th, 2005 at 9:41 pm
Greet [ Quote ]

Hey!
Looks great, so if you ever feel like sharing it, I’ll be glad to use it! I’m currently looking for a gallery too and I agree about all the useless functions. Yours looks just perfect. :)
xXx

December 23rd, 2005 at 3:08 am

Leave a Comment Name, email and comment are required.
Email will never be displayed.

Leave a Comment
  1. :biggrin: :blank: :blush: :bored: :confused: :cool: :down: :evil: :frown: :grin: :grr: :laidback: :left: :mad: :right: :sad: :secret: :shock: :smile: :stress: :tongue: :up: :wink: :yawn: :cute: :dead: :film: :floppy: :glasses: :grumpy: :headphones: :heart: :lightbulb: :ouch: :tv: :upsidedown: :vodka: :yell: :yuck: :yummy: