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/
Related
Recently I've been working on a little side project, aimed at being a wallpaper site. It'll mainly consist of my own photos, but I may implement some kind of upload system for other users to submit their own.
Essentially, I can make a page that takes an ID from the URL, e.g., 284 from /wallpaper?id=284. I can easily pop a .jpg after it and make a different image load depending on the ID. The annoying thing is, I'd like to also have a title/description accompany the photos, and I don't want to also have a title attribute in the URL at it would be easy to tamper with, even if not doing any damage.
I'm guessing this is to do with PHP tables (judging by the name and the sudden realisation that not much would be possible without something like it), which I can use as I'm currently running on a local WAMP server. I should also be able to when and if I upload this to an online server.
I'm basically asking how I can create some kind of document or table containing information that can be retrieved using some kind of ID.
Thanks
Okay, I know questions like this exist in multiple forms across StackOverflow and other places on the web, but none of them is pointing me to what I actually need (maybe I missed a question that was more catered to my problem).
I need a Facebook-style image upload mechanism, using Codeigniter and javascript/jquery. Here's what it's supposed to do -
Using a single file upload control (or for that matter any clickable control), open up the "Choose Files" dialog window, and allow the user to select multiple images from it. (I know this cannot yet be done in IE, and I do not really care about the multiple file selection not working in IE).
Once the user has selected the files, the page should display a series of progress bars (like Facebook does). As each image gets uploaded, the corresponding progress bar reaches 100% (if it's simpler to implement, I am willing to forego the graphical progress bar for a text that displays the progress percentage), and the thumbnail of the image is displayed next to the completed progress bar (or text). At this point, the user should have the option to delete the uploaded image by clicking a cancel button (I think I can get this part working on my own).
The upload can be sequential (like Facebook does), or asynchronous (some upload libraries I found work this way).
What's most important (and the part that is stumping me) is the thumbnail generation. I know that there's some HTML5/CSS3 technique that allows you to display the thumbnail before the files have actually been uploaded, pulling them directly from the user's hard drive. But that won't work in IE8, and while I am not concerned about the multiple image selection not working in IE8, I need for the thumbnail generation to work cross-browser, and that includes IE8 (deciding on the browser compatibility is not something I can command, so please don't come up with a "screw IE!" solution).
I have tried using uploadify (I have no constraints against using Flash), but cannot seem to able to customize it to my needs. While uploadify does indeed display progress bars, I was unable to find a way to generate (and display) thumbnails on the fly, in accordance with the behavior I described above. I know how thumbnail generation works on PHP, just cannot figure out how to implement this together with the progress indicators. Am I looking for a suitable jQuery/ajax call?
Any help and/or pointers would be appreciated. I admit that I might have missed a StackOverflow question that would solve my issue, so please direct me to that page, or to any other page you believe will help me. Please feel free to suggest upload libraries other than uploadify, which you believe I might find useful.
Thanks in advance. And thanks for reading through all this - I tried my best to make the question properly descriptive!
I have used Jquery file upload with good results. It does need IE to be in compatibility mode, but worked well for chrome/firefox.
UPDATE. It now claims to support IE 6.0+.
I'll focus on point 4 here. It can be done, but you'll end up using iframes (yeah, I now).
They can be 1px small, but you'll need them if you want to create thumbnail previews.
A good starting point would be here: http://www.zurb.com/playground/ajax_upload
As for creating the actual preview images (smaller versions) you can use CI's image library.
Let me know how it works out.
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.)
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.
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.