The ProgrammersTalk Community
Forum Register Search Today's Posts Mark Forums Read
Register

Go Back   The ProgrammersTalk Community > Real Life > Open Source Development


Welcome to the The ProgrammersTalk Community forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.
Tags: , ,

Reply
 
LinkBack (1) Thread Tools    Display Modes   
  1 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 08-01-2007, 08:17 AM
HelloWorld's Avatar
HelloWorld HelloWorld is offline
PT Admin
Awards Showcase
Quality Tutorial 
Total Awards: 1
Join Date: Jun 2007
Location: In front of computer...
Posts: 1,119
iTrader: (0)
HelloWorld is a jewel in the roughHelloWorld is a jewel in the roughHelloWorld is a jewel in the rough
Icon11 Image Organizer and CMS Project

Anybody want to help me to build this project up?
Here's the rough description to what it's basically doing:
- The image organizer will allow the admin to input the name of the image, upload the image, and add description into it. It will create a table with the image to it in the home page. The home page will have different sections including random image rotator as the picture of the day.
- The CMS will be integrated later once I'm done with the image organizer

This project hasn't been started yet, but I will surely start this project once I'm done with summer school, and hopefully can finish this in 2 weeks frame. Feel free to contribute! I'd like to have some suggestions, database design, etc...

I'll post the code up later
License: GNU/GPL
Time Frame: 2 Weeks
Name: Not yet assigned

Target Audience: Photographer

__________________
PHP Code:
System.out.println("Hello World!"); 

Digg this Post! Del.Icio.Us this Post! Technorati this Post! Furl this Post! Mister Wong this Post! Newsvine this Post! Spurl this Post! Reddit this Post! Netscape this Post!
Reply With Quote
  #2 (permalink)  
Old 08-01-2007, 10:39 AM
molotov molotov is offline
Novice
Join Date: Jul 2007
Posts: 37
iTrader: (0)
molotov is on a distinguished road
I just finished doing something similar to this for a client:

Someone that wants to upload images submits the file via a php form. PHP then determines if the image is larger than a specified size, if it is, it is scaled and resampled. The client wants to have all the images IN the database, but I also have to keep a copy in the filesystem to make Flash happy. I store the image id, image title, description, human-readable-file-size, safe filename, image data, and mime-type in the database, and then use the safe filename to call the image from the filesystem for flash. I've also got a script that when passed an ID, regenerates the image from the database. Pulling images from the database is a little confusing at first, so I can help with that. Displaying random images is a cinch, and having an image of the day is also easy.


Before anyone asks, calling an image in flash like this doesn't work for me:
Code:
<img src="image.php?id=9">

__________________

Digg this Post! Del.Icio.Us this Post! Technorati this Post! Furl this Post! Mister Wong this Post! Newsvine this Post! Spurl this Post! Reddit this Post! Netscape this Post!
Reply With Quote
The Following User Says Thank You to molotov For This Useful Post:
HelloWorld (08-01-2007)
  #3 (permalink)  
Old 08-01-2007, 12:27 PM
HelloWorld's Avatar
HelloWorld HelloWorld is offline
PT Admin
Awards Showcase
Quality Tutorial 
Total Awards: 1
Join Date: Jun 2007
Location: In front of computer...
Posts: 1,119
iTrader: (0)
HelloWorld is a jewel in the roughHelloWorld is a jewel in the roughHelloWorld is a jewel in the rough
Thank you monolov,
hopefully you can be my mentor when I'm working on this project after my summer school. I'm planning to complete this project 2 weeks at most.

BTW, how do you store image in the database? Can I use MySQL to do this? You just store the image "data" in the database right? Or you're literally store the "image" in the database?

__________________
PHP Code:
System.out.println("Hello World!"); 

Digg this Post! Del.Icio.Us this Post! Technorati this Post! Furl this Post! Mister Wong this Post! Newsvine this Post! Spurl this Post! Reddit this Post! Netscape this Post!
Reply With Quote
  #4 (permalink)  
Old 08-01-2007, 02:13 PM
Lee's Avatar
Lee Lee is offline
PT Staff*
Awards Showcase
Quality Tutorial 
Total Awards: 1
Join Date: Jun 2007
Location: Blackpool, UK
Posts: 616
iTrader: (0)
Lee is just really niceLee is just really niceLee is just really niceLee is just really nice
Best way IMO to store the image is store it in a folder and put path to it in the database, path being "imagefolder/imagename.ext" if you get what i mean? its so much easier and it can be much quicker i believe. (this is how avatars are given to users on forums if you look at the user database, normally in a column called "Avatar" or something on those lines.

Hope it helps.
Reply With Quote
The Following User Says Thank You to Lee For This Useful Post:
HelloWorld (08-01-2007)
  #5 (permalink)  
Old 08-01-2007, 05:30 PM
molotov molotov is offline
Novice
Join Date: Jul 2007
Posts: 37
iTrader: (0)
molotov is on a distinguished road
Quote:
Originally Posted by Lee View Post
Best way IMO to store the image is store it in a folder and put path to it in the database, path being "imagefolder/imagename.ext" if you get what i mean? its so much easier and it can be much quicker i believe. (this is how avatars are given to users on forums if you look at the user database, normally in a column called "Avatar" or something on those lines.

Hope it helps.

Lee is probably correct for your scenario. It depends on how many images you want to store, whether or not they will be on the same server, what file system you're using, etc. If you're on shared hosting, just use the file system, but don't put all the images in the same directory, otherwise after a while, things will get ugly.

HelloWorld, the way people store an image is by opening the image file, reading the file contents, and storing that as a BLOB in the database (see file_get_contents(). You need to know what kind of image though the information came from so that you can recreate the image when you need to pull it out of the database, so you'll also probably need to store the mime-type, unless you're restricting it to a single file-type somewhere else in the script (before it's in the database).

__________________

Digg this Post! Del.Icio.Us this Post! Technorati this Post! Furl this Post! Mister Wong this Post! Newsvine this Post! Spurl this Post! Reddit this Post! Netscape this Post!
Reply With Quote
The Following User Says Thank You to molotov For This Useful Post:
HelloWorld (08-01-2007)
  #6 (permalink)  
Old 12-19-2007, 10:09 PM
ccoonen ccoonen is offline
PT Staff
Awards Showcase
Quality Tutorial Quality Tutorial Quality Tutorial Quality Tutorial 
Total Awards: 4
Join Date: Jun 2007
Location: Wisconsin
Posts: 317
iTrader: (0)
ccoonen is on a distinguished roadccoonen is on a distinguished roadccoonen is on a distinguished roadccoonen is on a distinguished road
Any news on this guys? I'm excited to see progress
Reply With Quote
Reply


Thread Tools
Display Modes

   Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

LinkBacks (?)
LinkBack to this Thread: http://www.programmerstalk.net/thread1001.html
Posted By For Type Date
CSULA ACM :: View topic - When should I apply for internships? This thread Refback 08-03-2007 02:46 PM


All times are GMT -7. The time now is 07:06 PM. Powered by vBulletin
Copyright © 2000 - 2007, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO © 2007 ProgrammersTalk Sedo - Buy and Sell Domain Names and Websites project info: programmerstalk.net Statistics for project programmerstalk.net etracker® web controlling instead of log file analysis


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50