Forums / Setup & design / Flash within an article, no way!

Flash within an article, no way!

Author Message

Jorge estévez

Tuesday 26 October 2004 9:03:31 pm

Cant manage to view a flash in an article, I have tryed rewrite rules, inserted the object into the article but nothing appears.

I manage to put it on a pagelayout.tpl and works fine, but no luck when inserting it in an article... no way!

any ideas? has someone manage to do it?

thanks

Diseño Web Cuba
Web Design Cuba
www.elfosdesign.com

Jorge estévez

Sunday 31 October 2004 4:02:00 am

any ideas?

Diseño Web Cuba
Web Design Cuba
www.elfosdesign.com

Arash Molavi

Sunday 31 October 2004 5:17:10 am

Try putting it in to the mediafolder. When you have done that check if you can see it there.

Jorge estévez

Monday 01 November 2004 7:17:07 pm

NO, I cannot see the flash? What must I do?

By the way, If I make an article and want to add an object relation (the flash file) ez will not let me go to the media section, so I cannot insert nothing that is not in the Content section? How can I make a relation to the flash at the media section?

Thanks...

Diseño Web Cuba
Web Design Cuba
www.elfosdesign.com

Łukasz Serwatka

Thursday 04 November 2004 1:44:31 am

Hi,

You can add your custom tag for templates like myembeddedflash

<custom name='myembeddedflash'>
path/move.swf
</custom>

<object type="application/x-shockwave-flash"
data="{$content}">
<param name="movie" 
value="{$content}" />
</object>

I hope this help
http://www.ez.no/ez_publish/documentation/customization/components/datatypes/ezxmltext/custom_tags

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Jorge estévez

Thursday 04 November 2004 7:23:18 pm

done with the custom tag, but when it comes to

path/move.swf

How to add the path, are you talking about the path where the file is saved or located in the content section?

How do I add the path inside the custom tag, can you write down an example?

thanks...

Diseño Web Cuba
Web Design Cuba
www.elfosdesign.com

Łukasz Serwatka

Thursday 04 November 2004 11:25:15 pm

Example:
<div style="color: red">{$content}</div>

<custom name='mynewline'>
This should be red
</custom>

The {$content} is replaced with "This should be red", so i think that u can use "This should be red" to add your path so
in this expamle

<custom name='myembeddedflash'>
path/move.swf
</custom>

<object type="application/x-shockwave-flash"
data="{$content}">
<param name="movie"
value="{$content}" />
</object>

{$content} should be replaced with your path to flash file. IMO this sholud work too

The result in browser (i hope that it works)

<object type="application/x-shockwave-flash"
data="path/move.swf">
<param name="movie"
value="path/move.swf" />
</object>

Try, i didn`t test it

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Wenyue Yu

Friday 05 November 2004 2:09:50 am

Hi,

Steps I used to embed flash within an article:

1. Create a flash object ( using ez publish standard class flash or make a flash class yourself ) and put it under media folder or anywhere.

2. When edit an article, make this flash object as related object and then insert it into the article.

3. Adding the following code into settings/siteaccess/your_site/override.ini.append to override template.

[embed_flash]
Source=content/view/embed.tpl
MatchFile=embed_flash.tpl
Subdir=templates
Match[class_identifier]=flash

4. Create file embed_flash.tpl and put it under design/your_site/override/templates/. Example of embed_flash.tpl:

<div class="view-embed">
    <div class="content-media">

    {let attribute=$object.data_map.file}
        <object codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"
                width="{$attribute.content.width}" height="{$attribute.content.height}" id="objectid{$object.id}">

        <param name="movie" value={concat("content/download/",$attribute.contentobject_id,"/",$attribute.content.contentobject_attribute_id,"/",$attribute.content.original_filename)|ezurl} />
        <param name="quality" value="{$attribute.content.quality}" />
        <param name="play" value="{section show=$attribute.content.is_autoplay}true{/section}" />
        <param name="loop" value="{section show=$attribute.content.is_loop}true{/section}" />
        <embed src={concat("content/download/",$attribute.contentobject_id,"/",$attribute.content.contentobject_attribute_id,"/",$attribute.content.original_filename)|ezurl}
               quality="{$attribute.content.quality}" pluginspage="{$attribute.content.pluginspage}"
               width="{$attribute.content.width}" height="{$attribute.content.height}" play="{section show=$attribute.content.is_autoplay}true{/section}"
               loop="{section show=$attribute.content.is_loop}true{/section}" name="objectid{$object.id}">
        </embed>
        </object>
    {/let}
    </div>
</div>

Regards,
wenyue

Jordi Ortega

Friday 14 September 2007 10:42:26 am

I'm very happy!!
Thank's a lot Wenyue Yu, using your information I've been able to put a flash movie within an article.
You are the best!!
Thank you!!

Jordi

Olivier Ouin

Monday 17 September 2007 7:20:42 am

That's exactly the code of the "base" design of the embed view of flash class, and this one is provided by default with eZ (I think it have been integrated from a while).

You shouldn't have to write a specific template for flash on a "recent" version of eZ, it's working at once, if you don't have broke your override.ini.append.php.