If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > PhotoGallery

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-24-06, 14:33
dimis2500 dimis2500 is offline
Registered User
 
Join Date: Jan 2005
Posts: 362
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
Reply With Quote
  #2 (permalink)  
Old 02-24-06, 17:13
buzzter66 buzzter66 is offline
Registered User
 
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!
Reply With Quote
  #3 (permalink)  
Old 02-26-06, 04:27
kropes2001 kropes2001 is offline
Registered User
 
Join Date: Nov 2005
Location: Honolulu HI
Posts: 118
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.GetMySiteOnline.com - Can you help me Get My Site Online ? (Yes. That is EXACTLY what we do.)

http://www.GetMySiteOnline.com/FightingSpam/
__________________________
caeli enarrant gloriam Dei !
Reply With Quote
  #4 (permalink)  
Old 02-26-06, 09:12
dimis2500 dimis2500 is offline
Registered User
 
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
Reply With Quote
  #5 (permalink)  
Old 02-26-06, 11:14
kropes2001 kropes2001 is offline
Registered User
 
Join Date: Nov 2005
Location: Honolulu HI
Posts: 118
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.GetMySiteOnline.com - Can you help me Get My Site Online ? (Yes. That is EXACTLY what we do.)

http://www.GetMySiteOnline.com/FightingSpam/
__________________________
caeli enarrant gloriam Dei !
Reply With Quote
  #6 (permalink)  
Old 02-26-06, 16:18
dimis2500 dimis2500 is offline
Registered User
 
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
Reply With Quote
  #7 (permalink)  
Old 02-26-06, 19:38
kropes2001 kropes2001 is offline
Registered User
 
Join Date: Nov 2005
Location: Honolulu HI
Posts: 118
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.GetMySiteOnline.com - Can you help me Get My Site Online ? (Yes. That is EXACTLY what we do.)

http://www.GetMySiteOnline.com/FightingSpam/
__________________________
caeli enarrant gloriam Dei !
Reply With Quote
  #8 (permalink)  
Old 02-27-06, 03:13
dimis2500 dimis2500 is offline
Registered User
 
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
Reply With Quote
  #9 (permalink)  
Old 02-28-06, 17:56
gflken gflken is offline
Registered User
 
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)

Quote:
(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!
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

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