embed vs. iFrame vs. ?

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
thebagman
Regular
Posts: 8
Joined: Mon Jun 26, 2006 7:10 pm

embed vs. iFrame vs. ?

Post by thebagman »

For several years, I've used simpleviewer to create a nice little flash web photo gallery... of course, I could just post a link in a blog entry and have the gallery pop up in a new window, but it seems kind of like a nice idea if I could convince the gallery to show up, itself inside the post.

First, a bit of information: the galleries are each contained in their own folders with their own index pages, so including them into a post (I think) will only require including the index page for the gallery in question. I could be wrong...

so, I tried a couple of things: first, because the Embed tag seems not as recommended as iFrame (which works with youTube content), I tried iFrames. I did manage to include content into the post, but noticed that I simply included the whole blog - I think because serendipity redirects to the main page (I read this in another post). Am I wrong? Maybe...

I also tried < embed > and can get the index page but it doesn't display properly unfortunately.

It seems to me that the type of content shouldn't really matter when one is simply including it as *media* into a post, but perhaps the best answer is to insert the first image of the gallery with a link to the gallery itself rather than the whole thing. Of course, this requires turning off apache_mod_rewrite (if there's another way I'd be interested...)

Any suggestions?

Anyone interested can get the simpleviewer gallery at:
http://www.airtightinteractive.com/simpleviewer/
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: embed vs. iFrame vs. ?

Post by garvinhicking »

Hi!

Could you give us the URL with what you tried? What was the URL you used for your iframe/embed tag?

It definitely sounds like some mod_rewrite problem. Did you try to put a .htaccess into your simpleviewer directory with "RewritEngine Off"?

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
thebagman
Regular
Posts: 8
Joined: Mon Jun 26, 2006 7:10 pm

Post by thebagman »

Hi Garvin,

The flash gallery works with all files in a subfolder - I pointed the URL to the index page in that folder (like http://www.bagonestatus.com/Galleries/K ... index.html) inside "embed" tags - also tried it as an iframe, and also tried variations with a number of other properties.

At first, the entry displayed a box with the main blog page in it - so I turned off mod_rewrite. It didn't work with "embed" so I tried an iFrame - it displayed the background color of the index page, but didn't show the flash content from the folder containing the index.html file. Not sure if it was simply displaying the bacground property specified in the iFrame - I think that it's pretty likely, but I'm not sure.

What I'm after, if it's possible, is:

Header: Sidebar:

Body Area:
__________________
| Entry
| ________________
| | Body of blog entry
| | _______________________
| | | Flash slideshow |
| | | pointing to the index |
| | | page of the folder |
| | |______________________|
| |_________________
| date posted etc... blog entry footer
|___________________________

_________________
| NEXT ENTRY...........




For now, I just put in a link and the slideshow pops up in a separate window...I used a photo from the slideshow as part of the post instead.

I didn't use .htaccess (well, mostly because I'm unfamiliar and dangerous if working outside my areas of limited knowledge) -- but willing to try if I could see what the content of such a file would look like...

Dave
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Ah! Basically, just create an entry and inside your entry, paste this code:

Code: Select all

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabsflash/swflash.cab#version=5,0,0,0" id="Flashanim" width="100%" height="400" align="bottom">
 <param name="movie" value="http://www.bagonestatus.com/Galleries/Kauai2005/viewer.swf">
 <param name="quality" value="best">
 <param name="bgcolor" value="#181818">
 <embed src="http://www.bagonestatus.com/Galleries/Kauai2005/viewer.swf" quality="best" bgcolor="#181818" scale="noborder" align="top" swLiveConnect="FALSE" width="100%" height="400" name="Flashanim" align="top" scale="noborder" wmode="transparent" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">
 </embed>
</object>
This will output the HTML that is needed to embed SWF on a page. Just make sure that if you are using the WYSIWYG editor you must switch into source code view (<>) before you paste this code. But it's easier to do without WYSIWYG editor.

Does that help you further?

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

And if you have multiple entries and don't want to type in all that every time, look at the regexp plugin, as recently explained in this thread.
Judebert
---
Website | Wishlist | PayPal
thebagman
Regular
Posts: 8
Joined: Mon Jun 26, 2006 7:10 pm

Post by thebagman »

Just getting back here now...
I'll try this and repost the results
thanx
alpay
Regular
Posts: 28
Joined: Thu Sep 18, 2008 1:48 am
Location: New York
Contact:

Post by alpay »

This old post was a great modern day help. Thanks Garvin for the solution - it helped me too. I spent alot of time tonight trying to get Simpleviewer to work, then I found this post here and it got me going...

http://blog.litstudios.com/index.php?/a ... Rosie.html

one little irksome thing... There is quite a bit of empty space between the text body and the embed. I can't figure it out. any suggestions? I'd love to know for future posts. it's not a big deal though, I'm just happy to have it working.

Alpay
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

If you've got the nl2br plugin installed, it could be adding <br /> tags for each line of your embed. You can tell if this is the problem by mashing your embed onto a single line; if the blanks go away, the nl2br plugin is the culprit. Often you can simply disable nl2br on this single entry to fix it.

If that isn't the problem, you probably have a big margin on the object. I recommend using Firefox and the FireBug extension to look at the objects and modify their style. When you find the culprit, you can just change your template's style.css.
Judebert
---
Website | Wishlist | PayPal
alpay
Regular
Posts: 28
Joined: Thu Sep 18, 2008 1:48 am
Location: New York
Contact:

Post by alpay »

Thanks Judebert! I mashed all the embed code onto one line like you said and that fixed it.... really, I should've known, i do know better, i've come across this before and fixed it the same way. I'm not old enough to be losing my memory :)

Thank you for the help.
Post Reply