Image Gallery tie in with database? - php

I'm developing an image gallery for one of my customers, they want a very minimal, simple and easy user experience. The image gallery must contain a title and description of each image, we have created a app to upload the images and set titles and descriptions this is stored in a mySQL database. We're developing this site with php.
Before I go off and develop this, does anyone know of any opensource galleries that tie into a mySQL database with similar functionality? Or maybe this approach is naive? Maybe I should approach this from a different direction and not use a mySQL backend..
Any advice is very welcome.
Josh

This one looks decent: http://gallery.menalto.com/. It supports MySQL and a bunch of other DBs.
For something this simple, you could get by without a database (however I doubt you would be able to have a title and description for the images without using a flat-file database; not recommended). To do it without a database, try this: http://spgm.sourceforge.net/.
However, if you already have written the uploader which works with MySQL, I would go with the database option and tweak it if necessary to work with the first link I posted.

Related

Wanting to get hard coded data from php files

Forgive me for asking such a general question but I am kind of flooded with options and could really use some opinions on how you would proceede, maybe this can be a bit of a discussion with some points/counter points.
So I am currently working on a new website for a friend's art gallery.
The new website is a mysql backed cms (processwire), the old website is old school hard coded php.
The current items or artworks are hard coded into a function:
artinfo($field1,$field2,$field3,$field4,$field5,$field6,)
This is just a function that takes several string values and does some formatting to display them on a page.
artinfo('abeles-conundrum.jpg','Sigmund Abeles','Conundrum','Lithograph','34 x 24 inches','$1600','');
So where I am getting stuck is here. I will have access to their filemaker database that has many fields but no images, and their current admin has all of the images with the names that are on the website.
What I am thinking that I will try to do is use the data on their current website to relate the info in the db to the images.
The reason why I am also not reusing the old images is that they are currently fairly small (max 400px), and would like to use higher res images (around 1200px).
I do have a utility that I built in c# using the html agility pack to pull the relavant fields, but I do also have access to the raw php files as well.

Upload images to a text field with PHP and other HTML5 technologies

Imagine if I could drag and drop images to this text field I'm writing in. Well for my site, I'd like to give users that ability to do it and have it save to the database. Now when I save it to the database, I'd like the image locations of the text field to be replaced with probably the file name, and just have the file name be replaced by the image when it displays the "blog" post.
I don't know if anyone here has used deviantArt's Stash writer, but I'm going for something similar with a PHP solution (and hopefully little JS since my knowledge on that is narrow).
If there is already an easy class/script to do this, please tell me! I'm not looking for a CMS since I'm designing a service of my own to do this. I'm just think that this would bolster the user experience as well as solve the problem of allowing users to upload pictures (that's why I'm not looking for a gallery solution because I know how to do that).
Try this somewhat match your needs .
http://www.uploadify.com/about/

Image tagging on website (like Facebook) where tags are stored in database

Does anyone know of a image tagging solution for websites that reads and writes the tag data to a database instead of a locally stored file? I've looked at http://jquery-notes.rydygel.de/index.php but the current version doesn't have database support. I just need a solution that can be used on all the mainstream browsers. The reason I don't want to read and write from a local file is because there might be a lot of images, and I don't want to store everything locally. Thanks!
You will be need to store the notes to a database table with following rows
ID
IMAGE_ID
LEFT
TOP
WIDTH
HEIGHT
DATE
NOTE
AUTHOR
LINK
And i believe the plugin has a php class for retrieving the notes. The file is notes.class.php

PHP image upload and showing

First sorry I'm a big beginner.
Would like to ask a more experienced developers opinion.
I have small website a really small social network for sports, and I would like to allow the users to create image folders and upload multiple images there.
As I was reading through the internet, they say that it is bad to store the images in the database, only save the location of the image.
But this is the part what I don't understand, more precisely the logic what I don't really understand.
I go to the users profile select the folder, but what is the way to show the images?
Is it a good idea to select the folder and use scandir to get the images? And if I'm scanning the folder is it possible to limit it to, for example, limit it to only one image at first what points to the gallery?
And I was thinking to separate the location path table in the database tied to the user ID, won't that be a problem? Won't that make the database really large?
Sorry if these are stupid questions, I would just really like to know.
Now I don't want anybody to write this for me, just give an opinion about the logic.
Thank you.
I would recommend you to store all information about the folder and pictures in the database.
For example a schema like the one in the diagram below. The advantage of having the data in a database is that you can get as many pictures as you want. And later you can add additional information to the table (e.g., permission for other users, comments, etc.)

AJAX image upload possible jquery with preview

I am trying to find some sort of plug-in for Ajax upload with a file preview. The image will be saved into a MySQL dataBase. Is that even possible? I guess all things are possible with certain requirements. Have you guys ever come across anything like that?
Let me tackle your question one bit at a time:
I am trying to find some sort of plug-in for Ajax upload...
BAM!
...with a file preview.
Yep, from the page above, although I might wonder why this is necessary and if it isn't remove it (I believe minimalist design is usually better) and go with fancy upload which seems to be more popular (sorry, I don't have much experience with ajax uploaders)
The image will be saved into a MySQL dataBase. Is that even possible?
Unfortunately, it is; you will have to use the blob data type (alternate tutorial). Personally though I would just create a directory and save the images there, because then you don't have to query MySQL every f***ing time you want to display the image (I would feel bad for hat server). In which case I suggest you use class.upload.php (I have good experiences with it), in conjunction with whatever ajax uploader you chose to use.
I guess all things are possible with certain requirements. Have you guys ever come across anything like that?
...yes
I also store the uploaded images in a directory and their names in the database.
I have developed a jQuery plugin that performs a dynamic upload of an image when it is selected, and previews it.
You can find a demo of the UploaderPreviewer plugin here:
http://dondedeportes.es/uploader-previewer
Hope it is useful for you or for anyone with the same problem.

Categories