Question:
Generate an image gallery from a directory - without PHP?
Kelly
2011-09-29 11:08:23 UTC
I'm building a portfolio website for my boyfriend and I'm looking for an easy way for him to add/edit images in his gallery without having to touch any code. All of the gallery plugins I've found use PHP and our free web host doesn't support that (we're cheapos and I'm not happy with any of the free PHP-supporting webhosts I've found.)

Are there any javascript/jquery/whatever solutions that will automatically create an image gallery by grabbing images from a folder without PHP? I don't know PHP so I'm not sure it's even possible.
Six answers:
Emissary
2011-09-29 12:22:00 UTC
As pointed out you can't traverse a file system without software on the server but thinking outside the box a little - asuming the feature is switched on and there is no .htauth etc. apache (and others) will generate a list of all the files in a directory if there is no index file present. I would assume this to be default on most free hosts and as primitive as the solution is - you could probably read the list with an AJAX request. I've never had the need to try this though and I can't find any existing scripts.



I don't really have the time to play around with the idea at the moment either but it would be over engineering the problem anyway - there are many "javascript only galleries" available if you google it that read the image list from an xml file. XML is deliberately there to be easily read by humans and machines alike so you don't need to be able to "code" to update anything, if you can copy and paste your good to go.
anonymous
2011-10-02 11:21:10 UTC
There's no way to generate an image gallery from a directory without some kind of server side language (PHP, Ruby, etc.) involved. But the good news is what you're trying to build for him is already out there for free. These websites provide great portfolio builders that generate the thumbnails, re-size your images and put them in gallery display web pages just from uploading the images. Some are more customizable than others, but you can style them how you like. They also look a lot better than the PHP gallery plugins out there, and best of all, they're all free!



http://www.brushd.com

http://www.daportfolio.com

http://www.carbonmade.com



I know there is sentimental value in building it specifically for your boyfriend, but you could still customize the style and set these up for him.
Gitlez
2011-09-29 11:12:46 UTC
To grab the list of images from a folder, you will need to use a server-side script, such as PHP. There are lots of free web hosts that support PHP. http://www.000webhost.com is the best free one. As well as hosting your domain if you choose to.



Follow up questions can be messaged to me through my profile page.







Cheers,

Gitlez
anonymous
2016-05-15 07:23:16 UTC
You've asked this question (that's not really a question; there's only a question mark in the title) before, and the answer you selected as the best left open the possibility for a hacker to completely delete your database through a technique that's called SQL injection. Just another pointer.
anonymous
2011-09-29 15:59:46 UTC
Refer to:

http://www.threehosts.com/simplescripts/photo-galleries



Best Photo Gallery hosting service providing easy 1-click installation and management of Photo Gallery (reviews and discount coupon).



Hope this helps.
anonymous
2011-09-29 11:11:21 UTC
Why dont you check computer related forums for this? Check my site below if that solve your problem?


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...