Embedding Flash in Pier / Direct link to File

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Embedding Flash in Pier / Direct link to File

artifacts
I want to embed a flash movie, so I added a File containing the swf. Then I added an environment containing a content widget and the embed code:

- Pier
- Environments
- Flash (this contains the html code for embedding the flash)
swf (this is the contents widget)



This is the html code fpr flash:
<object classid="....." id="timeline" width="777" height="220" codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab"> <param name="movie" value="*swf*" /> <param name="quality" value="high" /> <param name="bgcolor" value="0xffffff" /> <param name="allowScriptAccess" value="sameDomain" /> <embed src="+swf+" quality="high" bgcolor="0xffffff" width="777" height="220" name="timeline" align="middle" play="true" loop="false" quality="high" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer"> </embed> </object>


The rendered output looks like this:

<param name="movie" value="<h1 class="heading">TimelineFlash</h1><a href="http://localhost/seaside/pier?_s=ZCjhBTwrFdESmfmG">TimelineFlash</a>" />
How can I get only the url without the <h1> and <a> tags?



Michael Markowski

Si forte in alienas manus oberraverit hec peregrina epistola incertis ventis dimissa, sed Deo commendata, precamur ut ei reddatur cui soli destinata, nec preripiat quisquam non sibi parata.

(Translation: If by chance this wandering epistle, sent forth to the uncertain winds but commended to God, wanders into alien hands, I beg that it be returned to her to whom alone it was sent, nor should anyone steal things not written for him.) From: The prologue to the Liber Confortatorius of Goscelin of St. Bertin (born between 1030 and 1040).



_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Embedding Flash in Pier / Direct link to File

Philippe Marschall
Hi

I think a better way than a special environment would be a special
structure (probably subclass of PRFile eg. PRFlashMovie) that has the
additional descriptions it needs (like width and height) and it's own
accept method. Then in PRViewRenderer you render the HTML as you need
it.

BTW there is a somewhat unfortunately named mailing list for Pier and Magritte:
http://www.iam.unibe.ch/mailman/listinfo/smallwiki

Cheers
Philippe

2008/5/20, Michael Markowski <[hidden email]>:

>
> I want to embed a flash movie, so I added a File containing the swf. Then I
> added an environment containing a content widget and the embed code:
>
> - Pier
>  - Environments
>  - Flash (this contains the html code for embedding the flash)
>  swf (this is the contents widget)
>
>
>
> This is the html code fpr flash:
>  <object classid="....." id="timeline" width="777" height="220"
> codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab">
> <param name="movie" value="*swf*" /> <param name="quality" value="high" />
> <param name="bgcolor" value="0xffffff" /> <param name="allowScriptAccess"
> value="sameDomain" /> <embed src="+swf+" quality="high" bgcolor="0xffffff"
> width="777" height="220" name="timeline" align="middle" play="true"
> loop="false" quality="high" allowScriptAccess="sameDomain"
> type="application/x-shockwave-flash"
> pluginspage="http://www.adobe.com/go/getflashplayer">
> </embed> </object>
>
>
> The rendered output looks like this:
>
> <param name="movie" value="<h1
> class="heading">TimelineFlash</h1><a
> href="http://localhost/seaside/pier?_s=ZCjhBTwrFdESmfmG">TimelineFlash</a>"
> />
> How can I get only the url without the <h1> and <a> tags?
>
>
>
>
> Michael Markowski
> [hidden email]
>
>
>
> Si forte in alienas manus oberraverit hec peregrina epistola incertis ventis
> dimissa, sed Deo commendata, precamur ut ei reddatur cui soli destinata, nec
> preripiat quisquam non sibi parata.
>
> (Translation: If by chance this wandering epistle, sent forth to the
> uncertain winds but commended to God, wanders into alien hands, I beg that
> it be returned to her to whom alone it was sent, nor should anyone steal
> things not written for him.) From: The prologue to the Liber Confortatorius
> of Goscelin of St. Bertin (born between 1030 and 1040).
>
> _______________________________________________
>  seaside mailing list
>  [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Embedding Flash in Pier / Direct link to File

Lukas Renggli
In reply to this post by artifacts
> The rendered output looks like this:
>
> <param name="movie" value="<h1
> class="heading">TimelineFlash</h1><a
> href="http://localhost/seaside/pier?_s=ZCjhBTwrFdESmfmG">TimelineFlash</a>"
> />
> How can I get only the url without the <h1> and <a> tags?

Just put the URL there: /environments/flash/swf

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Embedding Flash in Pier / Direct link to File

artifacts
Lukas,

sorry, I didn't get it yet.
Basically this is what I want: Add a File (e.g. an image or flash) and
get a persistent url for this file.
Right now, an image is rendered like this.
<img alt="Img" src="http://localhost/seaside/pier?_s=DMlOFQSiJzBSgkqh">
This causes problems, because the image has no real filename. If you
e.g. want to open the image into a new window, the file is downloaded.
Is there a way to do that with the File component?

Cheers, Michael



On Tue, May 20, 2008 at 8:49 AM, Lukas Renggli <[hidden email]> wrote:

>> The rendered output looks like this:
>>
>> <param name="movie" value="<h1
>> class="heading">TimelineFlash</h1><a
>> href="http://localhost/seaside/pier?_s=ZCjhBTwrFdESmfmG">TimelineFlash</a>"
>> />
>> How can I get only the url without the <h1> and <a> tags?
>
> Just put the URL there: /environments/flash/swf
>
> Lukas
>
> --
> Lukas Renggli
> http://www.lukas-renggli.ch
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Embedding Flash in Pier / Direct link to File

Lukas Renggli
>  Basically this is what I want: Add a File (e.g. an image or flash) and
>  get a persistent url for this file.

Every structure in Pier has a persistent URL. If add a new file it
gets an URL with the name you gave it. The following examples assume
that you have added a file (an image) named 'foo' to the root of your
Pier instance.

1. You can navigate to this structure using the URL
<http://localhost/seaside/pier/foo>.

2. You can link to this structure from within a document using */foo*.

3. You can embed the image from within a document using +/foo+.

Now, from what I understood in your mail you wanted to get the URL to
the file. With approaches 1 - 3 this is not possible, as they render a
full XHTML tag.

>  Right now, an image is rendered like this.
>  <img alt="Img" src="http://localhost/seaside/pier?_s=DMlOFQSiJzBSgkqh">

If you configure MAExternalFileModel properly, Seaside will not server
the files itself and you will get a static URL here. However I agree
that copying and pasting an URL into a document is not nice.

>  This causes problems, because the image has no real filename. If you
>  e.g. want to open the image into a new window, the file is downloaded.

Load the latest code from Pier-Model and Pier-Seaside and try the
syntax in the document.

   +foo|urlonly+

This will only render the URL of the referenced object and should
solve your problem nicely. Also when you move the file, the URL will
automatically update.

I know that the whole view-renderer of Pier is getting ugly. A
(backward compatible) rewrite of that part is long overdue. I just
need to find some time to do it.

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside