Page 1 of 1
Thumbnail Gallery with Comments?
Posted: Sun Sep 07, 2003 1:54 am
by Genix
I am trying to make a picture gallery on my site. Right now I have a php script that display the images with links to the bigger picture but I want it to get a little more advanced. I want it to have arrows that you can use to scroll through the pictures. I also want to be able to add comments to the pictures, sort of like PictureTrail. If you have any ideas, please let me know.
http://www.thegenix.com/pics/
http://www.thegenix.com/pics/index.php.txt (my current script that i got from a website)
Posted: Sun Sep 07, 2003 12:51 pm
by m3rajk
that auto loaded everything. only thing i can think of is using a db.
make a pic table.
CREATE TABLE pics(
pic_name varchar(20) NOT NULL,
comment text NOT NULL,
INDEX pic_name (pic_name)
)TYPE=MyISAM;
Posted: Sun Sep 07, 2003 2:34 pm
by Genix
I am really bad at PHP. Could you go into a little more detail?
Posted: Sun Sep 07, 2003 2:40 pm
by m3rajk
ok. i had you confused then... there's someone on here with a similar name...has helped me a number of times here.
the db is seperate from php. figure out what db you want to use. if it's mysql i can give you those commands, otherwise you need to find pear commands or the commands for your db.
basically: php reads the directory
php selects the pics that are to be displayed on the page
php connects to the db. if this fails it displays the pics with the note "unable to connect to db for comments"
otherwise it gets the comments and displays with comments