Welcome to WebmasterWorld Guest from 23.20.12.34

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

idea for adding descriptions to gallery images

idea for adding descriptions to gallery images

     
2:20 pm on Aug 11, 2012 (gmt 0)

Preferred Member

10+ Year Member

joined:June 19, 2006
posts: 476
votes: 0


Ok, so I wanted to see if anyone had any ideas on what would be the most simple and effective way to do this.

Right now I have a simple gallery which runs from a php script. The script does not use a mysql database (hence the simple idea). Instead it just looks through a directory and makes categories from the folders and galleries from the images in those folders. As of now I simply use the title of the jpg image to form the caption (a little regex cleanup).

A request to add an additional description has posed an issue. I'm trying to think of a simply way to implement this w/o using a database. So the question is, where do I store the description data? xml? json? txt files?

thanks for your help :)
9:05 pm on Aug 11, 2012 (gmt 0)

Senior Member

WebmasterWorld Senior Member swa66 is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Aug 7, 2003
posts:4783
votes: 0


Having a description, title, size, author, date etc. in a database would make a lot of sense and isn't all that hard to create. What's scaring you away ?
10:21 pm on Aug 11, 2012 (gmt 0)

Preferred Member

10+ Year Member

joined:June 19, 2006
posts: 476
votes: 0


What's scaring you away ?


just that this is the 1 missing feature of my simple gallery. Looks like mysql may be my best route
12:11 am on Aug 12, 2012 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month

joined:Apr 9, 2011
posts:13210
votes: 347


How big is the gallery? You can shovel all kinds of information into javascript-- but only if it's a very very small file, or your users will be twiddling their thumbs for several minutes while the information loads up.

Disclaimer: There's a limit to how many languages I can learn at once, so I'm doing things with js that God never intended js to do. But if it can be done in javascript it can be done in php. The brackets will just be a different shape, and there will be more of them ;)