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.

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 11:23:08
Script start
Timing: Jan 18 2025 11:23:08
Module start 'layout'
Timing: Jan 18 2025 11:23:08
Module start 'content'
Timing: Jan 18 2025 11:23:09
Module end 'content'
Timing: Jan 18 2025 11:23:09
Script end

Main resources:

Total runtime1.1309 sec
Peak memory usage4,096.0000 KB
Database Queries86

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0054 587.9141152.6250
Module start 'layout' 0.00540.0029 740.539139.4609
Module start 'content' 0.00831.1207 780.0000783.3516
Module end 'content' 1.12900.0019 1,563.351624.1563
Script end 1.1309  1,587.5078 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00360.3178160.0002
Check MTime0.00140.1196160.0001
Mysql Total
Database connection0.00090.075310.0009
Mysqli_queries1.044892.3875860.0121
Looping result0.00090.0830840.0000
Template Total1.100797.320.5503
Template load0.00210.182320.0010
Template processing1.098697.143120.5493
Template load and register function0.00020.016510.0002
states
state_id_array0.00110.096010.0011
state_identifier_array0.00130.118320.0007
Override
Cache load0.00190.1689780.0000
Sytem overhead
Fetch class attribute can translate value0.00110.099660.0002
Fetch class attribute name0.00180.1560130.0001
XML
Image XML parsing0.00330.293860.0006
class_abstraction
Instantiating content class attribute0.00000.0025140.0000
General
dbfile0.00240.2159300.0001
String conversion0.00000.000840.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
10content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
20content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
4content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
10content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
4content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 50
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs