This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit ezplatform.com

eZ Community » Forums » Setup & design » Flash within an article, no way!
expandshrink

Flash within an article, no way!

Flash within an article, no way!

Wednesday 27 October 2004 6:03:31 am - 9 replies

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

Sunday 31 October 2004 1:02:00 pm

any ideas?

Sunday 31 October 2004 2:17:10 pm

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

Tuesday 02 November 2004 4:17:07 am

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...

Thursday 04 November 2004 10: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/docum...ents/datatypes/ezxmltext/custom_tags

Modified on Thursday 04 November 2004 10:45:28 am by Ɓukasz Serwatka

Friday 05 November 2004 4:23:18 am

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...

Friday 05 November 2004 8:25:15 am

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

Friday 05 November 2004 11: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

Friday 14 September 2007 7:42:26 pm

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

Monday 17 September 2007 4:20:42 pm

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.

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from