The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
![]()
Is it even possible to save images to a MySQL database?
Basically, if someone E-Mails some fan art to website-staffer_1, I'd like them to be able to upload the image to the website. Is this possible? If it is can someone let me know how Thanks |
#2
|
|||
|
|||
![]()
Yes - this is how the vBulletin image upload features work at the moment. I'm more tempted to upload them to a directory however.
You can setup a simple form with a 'browse' button which allows users to upload images to a specified folder fairly easily which will upload and transfer the images to the folder. You can specify a pointer in mysql like /images/imagename.jpg ![]() |
#3
|
||||
|
||||
![]()
how would I go about setting up a directory that I could load into? I thought about just making the MySQL point to a folder but I don'r quite know how to do it.. Any suggestion would be greatlt appreciated
|
#4
|
||||
|
||||
![]()
I've always wondered how people upload the files directly into the database though. I mean the attachments in vb aren't stored in a temporary directory are they?
I can create the form with a pointer to the file easily enough but uploading directly to the database is out of my league at the moment. Any tutorials or anything? - miSt |
#5
|
||||
|
||||
![]()
my question as well. any help here would be greatly appreciated
|
#6
|
|||
|
|||
![]()
Try this:
You'll have to change the "newpath" line to match your own server (usually /home/youraccountusername/public_html/anotherfolder/) anotherfolder is the folder that you want the imaged uploaded to, and it must be chmod'ed to 777 ![]() (only setup to upload jpg files atm though ![]() PHP Code:
|
#7
|
||||
|
||||
![]()
You see i know how to do that nice and easily but can't u upload to an actual mysql database like in vb's attachments?
- miSt |
#8
|
|||
|
|||
![]()
I prefer it this way since it puts less load on mysql and doesn't mess around.
I think the main reason vB have done it through mysql is for compatability reasons, but I'm not 100% on that. |
#9
|
|||
|
|||
![]()
IMO its better to put them in a directory because it keeps the DB smaller.
|
#10
|
||||
|
||||
![]()
wow holy smokes that's great. I might have a few questions about this a little later but that's great thanks a million
time for questions now.....I just can't deprioritize this ok so this I take it stores the info in a directory...Right? what is the directory name? what is the file named or saved as...and is it possible to name the file manually, say by adding more form fields if I wanted to allow the upload of more than one image at a time would it be possible with the use of a loop? if I wanted to make a script that would upload this in a thumbnail form and then have a clickable thumbnail fo an enlarged image would I do that as I call the image to be displayed on the actual web page? is there a way do view the directory say through the SmartFTP program I use and if so how do I do that how can I modify this to upload different types of files? do I just add a php/MySQL insert staement to insert the name into my database and then use it as a pointer? Sorry for the 20 questions thing but I'm a little new to this and what you have there is greatly beyond what I know how to do. Can I give you credit by your name here when I open my site? I hate plagerism and theft |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|