PDA

View Full Version : Guide - pictures show in Iframe


supa
04-12-2008, 12:54 AM
With thanks to patti who without her this forum wouldn't be the same ;)

What is an Iframe -
IFrame is an HTML element which makes it possible to embed another HTML document (or picture) inside the main document
look here for a sample of an Iframe :
http://allwebco-templates.com/support/S_script_IFrame.htm

How to do it-


draw a simple box into your page.
press on your box and click on the custom script field located in the inspector properties (press ctrl+k to show) on the right.
when you open the custom script window you can see several options on top. it should be checked on the Objects events, if you choose different option it will be put inside the page itself without connection to nothing and will be set at the first place of the page which is the top left and you don't really want that to happen...
put this code inside: <iframe name="body1" src="pics\example1.jpg" width="250" height="300" style="border:2px inset #000000" >
</iframe>

What is this code all about ?
there are 5 elements within which tells the Iframe what to show and how.
Name= call the iframe a name, it can be Richard, Ron, Anna, or any other name you feel like calling it, in our case: body1 (note- this name will be used later on for linking)
SRC= this is the source of the Iframe, the first page or image that will be shown upon previewing the page. you should write an address of an HTML file or a picture file like above, but you must apply the address right.
writing "pics\example1.jpg" will let the iframe to search for the example1.jpg file inside a "pics" folder. as there is no D:/ and no other full address it will search the folder in its "Root" folder of the previewing html page.
for example:
When you preview your page the WE software will first produce the files to preview (HTML files and your date and images) into your TEMP folder of WE.
so if you want to see something inside you BOX (iframe) you need to create a folder inside TEMP folder and call it: "pics" and then put a picture named :
example1.jpg
----------------
But you must understand the concept of how to address the file and where to put the file. so when you finish and export your site to the hosting space you will need to manually create that folder and put these right files in the right place on net.

Width= simply set the width of the iframe (changing the box's width won't control its size for now it is under the control of the script)
Height=simply set the Height of the iframe (changing the box's Height won't control its size for now it is under the control of the script)
Style= set styling like border of the iframe.
2px : thickness (0px will omit the border)
inset : kind of border, it can be chosen from this list :
dotted
dashed
solid
double
groove
ridge
inset
outset
and #000000": set border color by number. look here: http://www.gotomy.com/color.html for colors code numbers.
Now put a thumbnail picture in your page (Tip- hold the ctrl key while dragging a picture into WE to make it a thumbnail)
press on the small thumbnail picture inside WE, go to its link value (inspector: Ctrl+k) and choose to link it by custom script type.
insert this code: href="pics/example2.jpg" target="body1"
I assume by here that you already have a pics folder in the root folder of your previewing page and that you have 2 picture files inside: example1.jpg and example2.jpg.
by inserting this code as a link we simply make the page to open the example2.jpg image inside our box friend "body1" instead of just opening in a new window...
(note- if you want to open an html within the iframe, simply change the Href= to address an already made html file).


Thats it, preview your page.
if you followed and still it doesn't work... check your addressing of the files and make sure they're there.

Feel free to correct me here on any goof ups... :cool:
or just to wish me a "happy 300 messages day"...
Supa

WebMonkey08
04-12-2008, 01:21 AM
Very Cool, Avanquest owes u a free download

JohnWM
04-12-2008, 02:44 AM
Handy, handy, handy, handy... Thanks!

ksp1139
04-14-2008, 12:22 PM
Supa
Thank you for the detailed instructions. Also thanks to all who are patient enough to put up with this newbe.

pikeboy's mum
04-15-2008, 01:02 PM
Your instructions are pretty clear, Supa, but just in case I've misunderstood, could I ask you a specific question re what I need.

I'm using the iframe to show a number of different 'Porta' galleries. These files are currently located in C:\Documents and Settings\user\my documents\my albums etc etc, which is the default location when Porta makes the document. This seems to work fine in WE preview.

However I do realise that I may need to move the 'albums' as a whole html document to elsewhere in WE. Do I do as you suggest and make a folder to contain these ('albums' or galleries) in the Temp folder, OR do I go straight ahead and put them in the HTML folder in same place? Or indeed will WE do all this automatically when I come to build to a web page? I'm not sure either whether I need to have the photos in the Porta galleries filed individually somewhere in WE as well!

I must say I think that the variation in file types, locations and directories are perhaps the most confusing thing of all when it comes to web design. I'd be grateful if you could also expand a bit on "so when you finish and export your site to the hosting space you will need to manually create that folder and put these right files in the right place on net." What do you mean by 'The right place on the net' and where is it?! I haven't got to that stage yet but would like to prepare the ground if it would speed things up.

Just a little more clarification please for those of us who are slow on the uptake! ;)

supa
04-15-2008, 02:16 PM
I see all of your questions are path related...
well..
Here is a very good and clear article about it...
I couldn't make it more clear then that:

Absolute vs. Relative Paths (http://www.communitymx.com/content/article.cfm?cid=230ad)

Supa

pikeboy's mum
04-15-2008, 02:22 PM
Absolutely brilliant - just what I needed! And in fact had never heard of 'absolute and relative' paths before...

I also came across the following info on the Porta support forum. Seems I'm overcomplicating things anyway! Might be useful if anyone else is using this program.

http://www.stegmann.dk/mikkel/porta/forum/viewtopic.php?t=1758

Thanks once again, Supa. What would we do without you?!

* Now understanding what the term 'Root Folder' means is a huge step forward for me!

frittsco
04-15-2008, 03:57 PM
Supa - thanks so much for this guide. I have been using WE since 2002 and have learned so much on this forum

I used your directions in this guide and all worked great. But I want to have a line of text for each image explaining what the image is. I was thinking of using simpleviewer (which I found from an earlier thread) and was wondering on the code for inserting the simpleviewer slideshow into the iframe box.

Any help would be greatly appreciated.

supa
04-15-2008, 04:09 PM
you are very welcome.

I haven't used Simple Viewer yet, but it looks like you don't need an I frame if you use that program and it have captions as well.

When using the i frame you can only put a picture or an html page inside
so for a caption to be inside you need to edit the picture or have an html with the picture inside and the caption, then show the html inside the i frame.
i would still prefer the Simple Viewer as it looks more professional.

Supa

wbdesigner
04-15-2008, 06:10 PM
you can also put pdfs and text files in the iframes

frittsco
04-15-2008, 06:50 PM
Thanks Supa.

So I could create my images in photoshop with a caption on the bottom and then have separate images as thumbnails (so there is no caption on the thumbnail) and just have the image come up in the iframe with the caption attached. Got it.

If I went with simpleviewer, which I have played with a little, how do I put the simpleviewer on my page? I would want to keep the same page format as my other pages but with the simpleviewer sitting in the middle. I thought I could just put it in an iframe to anchor it.....
Simpleviewer does create a file called index.html - still won't work?

Right now, I have a large photo gallery and just have each image on a separate page and you scroll, page by page. I would like to have the option to choose the image to view instead of going page by page. Either one of these options would accomplish that for me.

Thanks again!
LEANNE

frittsco
04-15-2008, 09:50 PM
Okay. I answered my own question by trying it out.

I inserted my simpleviewer photo gallery into the iframe by changing the code you provided above to :
src="simpleviewer/index.html"


Works great!

Now I just have to decide which way to go - I like the look of Supa's iframe box but in some cases I will need to have captions.....

pikeboy's mum
04-15-2008, 11:48 PM
You can also use Porta with simpleviewer and I gather this includes minor captions (the main program has both minor and major). Ever so easy - one click does it all more or less in about 20 secs. I even managed to alter the css appearance codes and made my own templates, so if I can do it, so can anyone! Instructions are good on the Porta website and there is also a v good forum. Others on this one have used it too, which is where I first found the link:

http://www.stegmann.dk/mikkel/porta/

Just one thing - make sure that you download the Beta version,. There were one or two bugs in the 99 version and I spent nearly the whole of today trying to work out why it was suddenly crashing... Problem solved when I installed the newer version, thank heavens, although the old one worked perfectly on my folders in most cases.

I plan tomorrow to see if I can script an iframe with a picture file and also use the same frame as a target for porta html index files via links from that very(composite) picture.... Hm, maybe I'm biting off more than I can chew now!

clsx2
05-15-2008, 01:14 PM
I stayed up late last night trying to get this to work and now I am up early...I did finally get the pic to load in the iframe although I do still need to resize it.

What I can't figure out is how to get the pics on the left to load in the iframe. I add the script as directed, but I get nothing.

Also if you look at this page...How do I change the labels that pop up on mouse over and how to I edit the submit button.

Please help!

Here is the page: http://www.crystallynnphotography.com/photography_002.htm

supa
05-15-2008, 01:24 PM
I would suggest you to use one of these :

http://www.smashingmagazine.com/2007/05/18/30-best-solutions-for-image-galleries-slideshows-lightboxes/

will look much more professional.


Supa

clsx2
05-15-2008, 01:50 PM
I guess I will give the smooth gallery a try, but why am I having to? I thought the point of Web Easy Professional was to have a easy professional web site!

Uggh, I am just frustrated, thanks for the link hopefully I can get that to work for me.

supa
05-15-2008, 01:57 PM
Well... WE does give you the base but, i guess this is what you got for a low price software aren't you ;)

they do have some smooth scripts there...

Supa

clsx2
05-15-2008, 02:02 PM
Took a closer look at the link you sent and well they are speaking a different language so I don't see how I will get any of those to work.

For in stance the smooth gallery he says "put this in header", "then add the css", sure if only I knew how...

supa
05-15-2008, 02:11 PM
Well.. still haven't tried that one..
but...
after downloading the files .
put step one codes in the Head element (inspector properties)

Second step : just draw a box on WE, go to custom script and put it in.

third step : draw another box and put that also in its custom script.

*** if you cannot put the code in the head because of limit (BUG) then try to put the code under Body element.***

*** change the second step code according to your images file names***

Supa

clsx2
05-15-2008, 03:04 PM
Oh that will help, I tried guessing an that didn't work. lol No surprise there right? I am off to work but I will update later with sucess or questions.

clsx2
05-15-2008, 07:53 PM
I was unable to put the code in the header elements so I tried the body elements. All I am getting is 4 little x's and Image 1 title and Image 2 Title.

supa
05-16-2008, 06:44 AM
Yeaa... its too complex...

Ok i have tried this one and it looks great and easy to make.
but you must also download and install Picasa2 form Google.
picasa2 is a GREAT tool for Viewing, arranging and editing pictures

first look what is the result:
http://www.airtightinteractive.com/simpleviewer/auto_desktop_instruct.html

then, look here for instructions: http://www.airtightinteractive.com/simpleviewer/auto_desktop_instruct.html

after you export you site, you only need the :
1. Thumbnails folder - put in your WE temp folder
2. images folder - put in your WE temp folder
3. gallery.xml - put in your WE temp folder
4. viewer.swf - drag to your page inside WE.

you can custom your picture show by changing codes in 2 places.

1. open the gallery file by any text editor.
you can change all these parameters :
maxImageWidth="1024" maxImageHeight="1024" textColor="0x000000" frameColor="0x000000" frameWidth="20"....

2. when you drag the Flash file to WE, it will generate a custom script to it.
go to its custom script and change the parameters in this raw :
[~700~], [~550~],"[~true~]","[~true~]","[~high~]","[~showall~]","[~true~]","[~#ffffff~]"

What interest you is the numbers at the beginning (flash size on page) and the #ffffff which is the background color.

After you check it out and you like it... don't forget to take the folders and files and upload them manually to the right place on your hosting space.

Supa

Boriqua
01-23-2009, 08:31 PM
Oh man I have been trying to make the information supa offered and I just dont get it. After 4 hours my Mouse fingers hurt.

I have 5 images. I make box with the shape tool, I go to custom script assistant and I enter this code

<iframe name="body1" src="pics\example1.jpg" width="250" height="300" style="border:2px inset #000000" >
</iframe>

but where it says "pics\example1.jpg" I enter the address of one of the 5 images I am going to use.

Cool .. I then Drag that image onto the page holding control and it makes a nifty thumbnail. So far I am there.

I then click this thumbnail and go back to the Custom script assistant and enter

href="pics/example2.jpg" target="body1"

Where it says "pics/example2.jpg" I enter the same location as the image location I entered for the frame?
So if if the frame location was c\pix\puppy.jpg I enter the same thing in the href line?
So the frame is scripted to read
<iframe name="body1" src="c\pix\puppy.jpg" width="250" height="300" style="border:2px inset #000000" >
</iframe>

and my thumbnail is href=c/pix\puppy.jpg ... Right?

Then what do I do with the second image. I am sorry people ...I just cant get it.

Second .. when I use this or put a porta slide show in the frame ... figured that one out .. when I preview it gets the Active X warning and when I open some of your fine examples .. I dont.

This one for example doesnt give me the security alert

http://www.wbprints.com/ben/

Help PLEASE!

here is my fledgling web site and it needs help bad
www.cerebralacrobatics.com