Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

PHP/MySQL Image Gallery
Hiya,

Can anyone kindly help me to get started in creating a PHP/MySQL image
gallery, it doesn't have to be anything fancy, just something that
automatically reads the images in the folder and displays it.

Cheers


DaRemedy



Report this thread to moderator Post Follow-up to this message
Old Post
DaRemedy
10-19-04 01:55 AM


Re: PHP/MySQL Image Gallery
DaRemedy wrote:

> Hiya,
>
> Can anyone kindly help me to get started in creating a PHP/MySQL image
> gallery, it doesn't have to be anything fancy, just something that
> automatically reads the images in the folder and displays it.
>
> Cheers
>
> DaRemedy

Try http://gallery.sourceforge.net/
--
The facts, although interesting, are irrelevant.

Report this thread to moderator Post Follow-up to this message
Old Post
Andrew DeFaria
10-19-04 01:55 AM


Re: PHP/MySQL Image Gallery
Why do you need the images in a database if you are already reading
them from a folder? It is kind of redundant... Unless I am missing
something.


Report this thread to moderator Post Follow-up to this message
Old Post
john.postlethwait@gmail.com
10-19-04 08:57 AM


Re: PHP/MySQL Image Gallery
no not necessary, with the dir() method you can find images (and open
them/display them/delete them), but mostly I keep the filenames in a
database because I often like to have some administration with my
images; like the owner, the gallery it should be displayed in, a
discription of the image, location of the thumbnail, a one to many
relation with a users comments table. In that case it is just easier to
keep the filenames in the database. As long as you add the images when
uploaded, and unlink() them when removed from the database, there
shouldn't be any problem.

john.postlethwait@gmail.com wrote:
> Why do you need the images in a database if you are already reading
> them from a folder? It is kind of redundant... Unless I am missing
> something.
>

Report this thread to moderator Post Follow-up to this message
Old Post
Harrie Verveer
10-19-04 01:58 PM


Re: PHP/MySQL Image Gallery
DaRemedy wrote:

> Hiya,
>
> Can anyone kindly help me to get started in creating a PHP/MySQL image
> gallery, it doesn't have to be anything fancy, just something that
> automatically reads the images in the folder and displays it.
>
> Cheers
>
>
> DaRemedy

Nothing to do with your request admittedly, but you should check out
http://www.flickr.com if you havent already.

It's SERIOUSLY good - and the online community aspect has to be seen to be
believed.

Report this thread to moderator Post Follow-up to this message
Old Post
Steaming Balturd
10-19-04 08:55 PM


Re: PHP/MySQL Image Gallery
"Harrie Verveer" <newsgroup{remove-this}@harrieverveer.com> wrote in message
news:GsCdndZQI9rKbuncRVnyuA@zeelandnet.nl...
> no not necessary, with the dir() method you can find images (and open
> them/display them/delete them), but mostly I keep the filenames in a
> database because I often like to have some administration with my
> images; like the owner, the gallery it should be displayed in, a
> discription of the image, location of the thumbnail, a one to many
> relation with a users comments table. In that case it is just easier to
> keep the filenames in the database. As long as you add the images when
> uploaded, and unlink() them when removed from the database, there
> shouldn't be any problem.
>
What I originally wanted to do is to have the image path stored in a
database and the php page retrieving them. Only problem is that I have about
200 images so inputting them all into a database is going to be one long
task. How would you suggest I approach this?

Thanks.



Report this thread to moderator Post Follow-up to this message
Old Post
DaRemedy
10-20-04 08:56 PM


Re: PHP/MySQL Image Gallery
"DaRemedy" <demonnet@btinternet.com.nospam> wrote in
news:cl658t$gpp$1@hercules.btinternet.com:

> What I originally wanted to do is to have the image path stored in a
> database and the php page retrieving them. Only problem is that I have
> about 200 images so inputting them all into a database is going to be
> one long task. How would you suggest I approach this?
>
> Thanks.


throw all the files in any directory.

write a php script that reads the names of the image files in the directory,
then appends the 'real' path to the front of them (ie: the script changes th
e
variable from "butter.jpg" to "http://www.yoursite.com/path/to/butter.jpg")

the same script then takes the new name and puts it where you want in your
database.... loop it 200 times (or once for each file in your directory) and
voila!

good luck!





Report this thread to moderator Post Follow-up to this message
Old Post
Good Man
10-20-04 08:56 PM


Re: PHP/MySQL Image Gallery
Yeah, that is what I would do, you may even want to make it modular so
you can reuse it later, for instance have it ask you what the absolute
URL to the image folder is before it appends the URL (as opposed to
hard-coding the URL)

Just use foreach() to make it loop through every file in the directory
for the number of files in the directory.


Report this thread to moderator Post Follow-up to this message
Old Post
John Postlethwait
10-20-04 08:56 PM


Re: PHP/MySQL Image Gallery
DaRemedy wrote:
> Hiya,
>
> Can anyone kindly help me to get started in creating a PHP/MySQL
image
> gallery, it doesn't have to be anything fancy, just something that
> automatically reads....

do more with less, Robopages:
http://www.phpclasses.org/browse/package/743.html


Report this thread to moderator Post Follow-up to this message
Old Post
castnblast
10-21-04 08:55 AM


Re: PHP/MySQL Image Gallery
DaRemedy wrote:
> Hiya,
>
> Can anyone kindly help me to get started in creating a PHP/MySQL
image
> gallery, it doesn't have to be anything fancy, just something that
> automatically reads....

do more with less, Robopages:
http://www.phpclasses.org/browse/package/743.html


Report this thread to moderator Post Follow-up to this message
Old Post
castnblast
10-21-04 08:55 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PHP Language archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 05:59 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.