Jump to content
Salesforce and other SMB Solutions are coming soon. ×

Adding multiple pictures


hartland

Recommended Posts

Please bear with me, I'm still learning about databases and I do not code by hand. I use FP to keep track of our inventory and then I use Fourth World Webmerge to get it all online.

 

We have many inventory items that have mulitple photos that I would like to get into the web file. I currently only show one photo per item. The photos are numbered like this: First photo of item - H100.jpg, Second photo of item - H100-2.jpg and so on. Can someone please tell me how to get these additional photos into my webfile? Some items have only one photo while others have as many as 20, therefore I would like the additional photos to be thumbnails. Here are the resulting web pages for reference http://www.hartlandmachinery.com/inventory/C001.html.

 

Any help would be GREATLY appreciated!!!

Link to comment
Share on other sites

You want a related table of photos, whereby each existing record in InventoryItems has anywhere from 0 to essentially infinite number of related Photos records. The easiest way to get thumbnail-sized pix into such a db under FmPro 5.x is to import the entire FOLDER importing the image into one Container field and the FmPro-generated Thumbnail into another Container field; then deleting the orig Container field.

 

HMM: I think "import a folder" was present in 5.x?

 

Do you

 

a) Have a folder full of photos, a Photos database you want them to go into (or you're about to create one based on what I said above), and NO database records for those photos AS OF YET; or

 

b) a folder full of photos, a database you want them to go into, and one record per photo already in existence that you want to insert the appropriate photo into (i.e., you already know what I said above and are ahead of me) based on some field containing the photo's file name or from which the photo's file name could be abstracted?

 

Also, are you on a Mac or a Windows PC? (Or do you have access to either/both)?

Link to comment
Share on other sites

Uhm... Let's start with the easy stuff. Windows.

 

Then: Definitely b)

 

A folder full of photos, a database they already go into, and one record per photo already in existence that is in a container in the database. (I could send files but can't post them...)

 

But: I have no idea what you mean by importing the entire folder. Importing into where specifically? I don't actually care if the multiple photos show in the database but I NEED them to show online.

Link to comment
Share on other sites

Here is the basic form I use. I don't know if this will help or not.

 

Hartland_ID [WM-Field: Hartland_ID]

Category [WM-Field: Category]

Item [WM-Field: Item]

Photo [WM-ImagePath: picture_path]

Specifications [WM-Field: Notes]

Price $ [WM-Field: Cost]

Link to comment
Share on other sites

I was wrong, FileMaker 5 did NOT have the option to import a folder's worth of photos all in one shot. Added in FileMaker 6, apparently.

 

Anyway, if you want multiple photos per record that currently has one photo per record, the problem is that you want to move your photos to a different table that is RELATED to your current table.

 

And into THAT table is where you want to import your photos.

 

Now, having said that: Give me the field information in your current record that would indicate to me, the ignorant new temp, WHICH of the batch of photos on this here hard drive ought to go with WHICH record? Can I tell from the naming convention of the photo file? Or from the naming convention of the subfolder that the photo will be found in? Or from some field listing every photo by name?

Link to comment
Share on other sites

Yes, you can tell from the naming convention. ie: Item name- H100. First photo of item- H100.jpg, Second photo of item- H100-2.jpg and so on. All the html files for the inventory are in one folder on the hard drive and all the inventory photos are in another.

 

If you look at this (it's a screen shot of the FM layout) http://www.hartlandmachinery.com/Inv_Test/Clipboard01.jpg you'll see how I'm doing things now.

 

I sure appreciate the help!

Link to comment
Share on other sites

Let me think about it. I assume you want the actual image itself to be stored in FileMaker? Or are you storing a reference and leaving the image files on a file server?

 

Life will be nicer if you can snag an upgrade to FileMaker 6, even just one copy. (That won't be easy, both 5 and 6 are considered ancient history nowadays). FileMaker 6 will let you specify a folder and it will import ALL pictures, creating new records for each, even generating thumbnails in a second container field on-the-fly based on the main image.

 

Life will also be easier if you can gain access to a Mac. There are things you can do with AppleScript for which there are just no PC equivalents. And while I can think of Windows-compatible looping-script routines that would work nicely under FileMaker 8 or 9, no FileMaker 5ish Windows approaches are dawning on me, except for one rather convoluted approach that requires you to purchase QuickKeys for Windows and run the import script always from a computer with the monitor size set to a known & specific parameter.

Link to comment
Share on other sites

If only life could be easier. I'm working with FP 5 because my boss is cheeeeaaaap but put out the dough (how many years ago...) for this program so "we're using it". As far as the Mac goes... Two words. I WISH.

 

So, bearing that lovely news in mind...

 

I do use a reference in FP and for fun I stick a picture in the photo container so the boss can SEE the machine when he looks through the inventory. The files are just stored in a folder on the hard drive. When the whole mess is uploaded to the web the html files get their own folder and so do all the image files.

 

The further this goes the more hopeless the idea of being able to show more than one photo per machine on our website becomes.

Link to comment
Share on other sites

Well you don't need the photos themselves to be in FileMaker in order for the web page ——which I assume consists of HTML code that references images that remain on some web server's HD——to display them.

 

All you need is to be able to calculate the various photo file NAMES.

 

If I handed you a huge list of photo file NAMES, return-delimited, would you manually be able to know which existing record each photo filename GOES WITH? This is the inverse of the question I asked previously, so I figure you probably could.

 

Given a way to snag all the file names in a given folder and stick them on the clipboard (or write them to a text file), we should be able to parse the list and stick the appropriate values in the appropriate records.

 

Then it's just a matter of passing those photo file names on to the webby environment as paths, yes?

Link to comment
Share on other sites

I was with you until "...we should be able to parse the list..."

 

I get the jist and yes, I could easily sort out what records go with what item. I just have no idea how to get them into the html code since I use Web Merge to convert the database files into html. However, it just occurred to me that if I don't have to have the files in FM then perhaps I should be asking the good people at Web Merge how to proceed?

Link to comment
Share on other sites

Hahahah! I am so right there with you on the html!

 

Web Merge is one of a few programs that takes the database codes and converts it into html for web publishing.

Link to comment
Share on other sites

This thread is quite old. Please start a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

Terms of Use