Results 1 to 9 of 9

Thread: PhotoGallery

  1. #1
    Join Date
    Jan 2005
    Posts
    362

    Unanswered: PhotoGallery

    I want to make something as photogallery.
    A page with some text first and then some photos dynamically from an access, is there some code or a tutorial?
    Thank you
    dimis

  2. #2
    Join Date
    Nov 2002
    Location
    Houston, Texas
    Posts
    85
    If you happen to be using Dreamweaver MX or 8, there is an extension that will do it for you very easily. It's called MX Looper and you can get a fully functional 30-day version here:

    http://www.interaktonline.com/Produc...oper/Overview/

    Once you generate the code you can read it and see how they do it (plus, the code shuold still keep working even after the 30 days is up!

  3. #3
    Join Date
    Nov 2005
    Location
    Honolulu HI
    Posts
    119
    what type of photo gallery ?

    if you just want to list all of the photos that are stored on the drive and it doesn't need to be very pretty. check this out.

    http://www.curtswebpage.com/photoalbum/

    if you like it i can give you the code.
    .
    .
    http://www.HawaiianHope.org
    Providing Technology services to non profit orgs, Homeless Shelters, Food Pantries, Clean And Sober Houses and more.
    To date we have given away over 900 free computers !
    __________________________
    caeli enarrant gloriam Dei !

  4. #4
    Join Date
    Jan 2005
    Posts
    362
    Quote Originally Posted by kropes2001
    what type of photo gallery ?

    if you just want to list all of the photos that are stored on the drive and it doesn't need to be very pretty. check this out.

    http://www.curtswebpage.com/photoalbum/

    if you like it i can give you the code.
    I have got a html page with a text dynamically stored in access and some photos at the bottom of the text as a html page of a "product", both text and photos must dynamically stored.
    As I understand I have to store the text in the database and the photos just upload or delete with a "file manager" with no need of a database?
    Dimis

  5. #5
    Join Date
    Nov 2005
    Location
    Honolulu HI
    Posts
    119
    ok, i think i understand what you want to do.....

    just to repeat so i understand properly.
    you have a database.
    you have products in the database.
    you have the text describing the products in the database.
    the database is Microsoft Access

    so now you want to show the photos of the products too.

    1) yes, you can store the photos in the access database. but i would highly recommend against it. storing photos in an access database will make the database massive. it will slow it down, and it will make it more likely to corrupt.


    2) you can store the photos in directory on your web server in someplace like "ProductPhotos" and all of the photos can be in the same directory. you would need to store a NAME of the photo in the database so you have some way to link them.... then when you display the product number and description, you can just dynamically build the path reference to the photo and display it. if you name your photos the same as the product number, then it would be somewaht easy... you could simply use the product number from the database instead of adding a new field into the database for all of the photo names.

    this method also easily allows you to do something where you can simply show a list of photos only, like a "Catalog." when someone clicks on a photo, you can then retrieve its information from the database... since the photo name is the product number.

    if you have multiple photos of the same product, then you can name them something like "productID#_1", "productID#_2", "productID#_3", Etc...
    and you would not need to store all the names in the database... just the main number. have the page code look for multiple versions of the files and display them if they are found

    to get a list of files on the server, you use the "FileSystemObject" object and it will give you a list of files and directories


    let us know if this is something like what you want to do,
    .
    .
    http://www.HawaiianHope.org
    Providing Technology services to non profit orgs, Homeless Shelters, Food Pantries, Clean And Sober Houses and more.
    To date we have given away over 900 free computers !
    __________________________
    caeli enarrant gloriam Dei !

  6. #6
    Join Date
    Jan 2005
    Posts
    362
    Quote Originally Posted by kropes2001


    2) you can store the photos in directory on your web server in someplace like "ProductPhotos" and all of the photos can be in the same directory. you would need to store a NAME of the photo in the database so you have some way to link them.... then when you display the product number and description, you can just dynamically build the path reference to the photo and display it. if you name your photos the same as the product number, then it would be somewaht easy... you could simply use the product number from the database instead of adding a new field into the database for all of the photo names.

    this method also easily allows you to do something where you can simply show a list of photos only, like a "Catalog." when someone clicks on a photo, you can then retrieve its information from the database... since the photo name is the product number.

    if you have multiple photos of the same product, then you can name them something like "productID#_1", "productID#_2", "productID#_3", Etc...
    and you would not need to store all the names in the database... just the main number. have the page code look for multiple versions of the files and display them if they are found

    to get a list of files on the server, you use the "FileSystemObject" object and it will give you a list of files and directories


    let us know if this is something like what you want to do,
    I want just something like that but I found complicate all the story with storing at the database the links with the photos (Problems with the update method of a product-you have to implement the case the photos are already in the server, the case the user have to upload others and also there are already some photos related with the products-some will be again related some other no.)
    Dimis

  7. #7
    Join Date
    Nov 2005
    Location
    Honolulu HI
    Posts
    119
    so one photo may be used for more than one product ?
    and users can upload photos ?

    sorry, maybe it would be better if you explained completely what you are trying to accomplish. this is far from your original question of a photo gallery.
    .
    .
    http://www.HawaiianHope.org
    Providing Technology services to non profit orgs, Homeless Shelters, Food Pantries, Clean And Sober Houses and more.
    To date we have given away over 900 free computers !
    __________________________
    caeli enarrant gloriam Dei !

  8. #8
    Join Date
    Jan 2005
    Posts
    362

    Gallery

    Quote Originally Posted by kropes2001
    so one photo may be used for more than one product ?
    and users can upload photos ?

    sorry, maybe it would be better if you explained completely what you are trying to accomplish. this is far from your original question of a photo gallery.
    The company that we make the site organize parties makes decoration and so on, these are the "products", photos are related with these products.
    Photos are related with only one "product" and the html page that gave me have one or many photos for a product as I explain earlier.
    I think something simiral , to create a subfolder for all the "products" and put there the photos for each product and so the html-asp to read the photos related for each products.
    Dimis

  9. #9
    Join Date
    Feb 2006
    Location
    Seattle / Eastside
    Posts
    10
    I agree with kropes2001 -

    Since you control the web site, you should be able to allow how photos are uploaded - I presume that you are setting the site up to be managed by your client (so they can upload their own photos to be displayed with new or existing products). I also assume that the client will be uploading the images via a web page (not just ftping the files to a folder). Use the form controls to require and validate data before storing in the db (and saving image to img folder)

    (Problems with the update method of a product-you have to implement the case the photos are already in the server, the case the user have to upload others and also there are already some photos related with the products-some will be again related some other no.)

    If this is the case, simply store the name of the image ("prod24.gif") in a table with the product id (or page id). You don't need to change any of the actual text (content) of the product (page's content). Just add an asp script to handle images (reusable script to paste or Server Side Include on required pages)...I don't think this is coming out clear.

    Try this explantion:
    product.asp

    some text here formatted with html, etc...

    then use asp to connect to db, return everything from images table that has matching prod id...

    select * from tblImages where product_id=[<%=currentProductId%>
    ...then put your loop code / logic to display images however you choose to format...

    The above is just to illustrate the concept, not real code of course

    I do something similar with product images on my site. here's a product with mulitple images. www.games-for-less.com/settlers-of-catan.asp

    How many pages are we talking about? This may seem like a lot of work if it's just 25-50 products...but if it's more, then it's not much work at all.

    Best of luck dimis!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •