Share » Forums » Setup & design » Macromedia Flash + Ezpublish ::...

Macromedia Flash + Ezpublish :: expanding possibilities

Macromedia Flash + Ezpublish :: expanding possibilities

Tuesday 20 April 2004 2:24:01 am - 18 replies

Author Message

Björn Dieding@xrow.de

Tuesday 20 April 2004 3:26:49 am

Never tried...

but it is definitly possible

you could also supply a xml file which could be much nicer way of handling this.

Looking for a new job? http://www.xrow.com/xrow-GmbH/Jobs
Looking for hosting? http://hostingezpublish.com
-----------------------------------------------------------------------------
GMT +01:00 Hannover, Germany
Web: http://www.xrow.com/

Alex Jones

Tuesday 20 April 2004 6:55:05 am

As Björn mentioned, this is very possible. I've been pondering the same idea, though I haven't had a chance to experiment. But, if you are going down this road you might be able to try out the ideas I've been pondering. The easiest way to implement this would be to create a new object (I don't think the type of object matters, a folder would work well) and create an override template for it. I was thinking about XML, so I would actually override <i>pagelayout.tpl</i> which would provide total control over the output. Depending how you write the <i>pagelayout.tpl</i>, you may need to create some additional overrides, but that shouldn't be hard. Within your template(s) set up the fetch of the tree and save it in the proper format. Then, point your Flash app to pull the file from the server.

Anyway, that's the direction I've been thinking about. I'd love to hear other ways to do it.

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

Jorge estévez

Tuesday 20 April 2004 6:56:44 pm

Hello Alex,

I am willing to give it a try for the use of all the forum out there but some of your Ideas are not very clear (for me) (I am really very new with ez but I am a quick learner)

Ok, ordering your ideas (If I may):

1. Create a new object (I don't think the type of object matters, a folder would work well)

2. Create an override template for it.

3. I was thinking about XML, so I would actually override <i>pagelayout.tpl</i> which would provide total control over the output.

>>Didn't get that, override the template and make a new one ? Is that what you mean?

4. Depending how you write the <i>pagelayout.tpl</i>, you may need to create some additional overrides, but that shouldn't be hard. Within your
template(s)

Not understood at all... sorry can you be more specific...

5. Set up the fetch of the tree and save it in the proper format.

Ok, how can I save information on the server ?, I have not been trough that kind of stuff before (sorry)

6. Then, point your Flash app to pull the file from the server.

Of course...

If you could be more specific I will appreciate it and put my hand to work!

Thanks again!

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

Paul Forsyth

Wednesday 21 April 2004 4:18:44 am

Have a look at this project:

http://www.amfphp.org/

It seems to be a php interface to flash mx :)

paul

--
http://www.visionwt.com

Alex Jones

Wednesday 21 April 2004 6:40:48 am

Sorry about the confusion Joe! I'll try to provide more detail:

<i>3. I was thinking about XML, so I would actually override pagelayout.tpl which would provide total control over the output.

>>Didn't get that, override the template and make a new one ? Is that what you mean?</i>

Yes, that is what I mean. the file pagelayout.tpl is the core file for displaying a page on the site, it in turn calls all of the other template files. So, I would create a new pagelayout that uses XML instead of XHTML, I would then set up an entry in override.ini.php that would override just the node for the unique object created in step 1.

<i>4. Depending how you write the pagelayout.tpl, you may need to create some additional overrides, but that shouldn't be hard. Within your template(s)

Not understood at all... sorry can you be more specific...</i>

Yeah, I can see what I wrote was rather confusing. Sorry! Well, the way that eZ publish works, each type of output, whether it be from a specific class (folder, infopage etc.) or datatype (text field, link, image) can have its own template for display. If you will be setting up a pretty complex template, you may want to set up unique templates for each class that you will use. These templates are called with the <i>{attribute_view_gui...}</i> tags. These templates would use XML instead of XHTML to display the information. Alternatively, you could keep all of your code in your new XML pagelayout template, not calling any other templates.

<i>5. Set up the fetch of the tree and save it in the proper format.

Ok, how can I save information on the server ?, I have not been trough that kind of stuff before (sorry)</i>

Well, you shouldn't need to overtly save anything as eZ publish deals with that portion of the process. Once you can view the page in the browser, you should be able to pull it from within Flash right? This will ensure that your data is kept up to date without running any additional scripts or cron jobs.

I hope this helps. I have a feeling I could be a bit clearer, but I'll have to think about it some more to find a better way to say it. :)

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

Alex Jones

Wednesday 21 April 2004 6:42:00 am

That's a cool project Paul! Thanks for pointing it out.

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

Jorge estévez

Thursday 29 April 2004 9:12:58 pm

sorry for the delay, been out of city!

Hello Alex, and other members too...

A more clearer message, thanks

But...

There's a moment in the process that I kind of get lost, I have understood everything, on one hand I have the new_pagelayout.tpl that fetches all the info I need and for example, saves it on a variable called FLASHINFO and on the other hand I have on the same page a call to a FLASH animation that should get the information fetched and display some nice things....

Just don&#8217;t understand how to put my hands together.

FLAHSINFO (a variable in the proper ez template format)
FLASH animation that will have to acknowledge the information before displaying it)

How can I communicate between them? How can I give the information to the flash (I have done it before, but now it's in a ez template format, this is where I get lost)

Thank you
Joe

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

Paul K Egell-Johnsen

Thursday 29 April 2004 11:38:05 pm

I tested AmfPhp and was less than impressed. The flash applet used as an example did not use standard GUI elements from my OS. And it was heavily influenced in look and feel by all the bad VisualBasic applications floating around.

*Shudder*

--
http://www.vogol.com/user/spdyvkng/blog/

Alex Jones

Friday 30 April 2004 6:33:19 am

Joe, I'm not sure if I understand your question, so please forgive me if I provide an answer to a question you aren't asking. ;) The way I have been thinking about this setup is to not have the Flash animation served by eZ publish. Rather it would be separate, merely using the eZ publish site as its data source. So, I would structure my eZ templates to serve the information in a Flash friendly format - let's say XML from a site titled www.mysite.com/index.php. I would then set up the Flash file to pull the information served by www.mysite.com/index.php via Flash remoting. Please note, I haven't ever done this as I plan to use this as a learning experiment, so that is why I am unable to provide a lot of information. I don't have any experience with AMFPHP which is probably where I would start, though Paul's comments above may cause me to look at other alternatives as well.

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

Paul Forsyth

Friday 30 April 2004 7:24:41 am

Oops, my mistake. I thought amfphp was just a api for connecting to flash from php.

paul

--
http://www.visionwt.com

Björn Dieding@xrow.de

Friday 30 April 2004 7:34:54 am

Why not use a print layout rather then doing anything wiht the pagelayout and overrides

I always try to not use the override if possible.

sample urls

normal view
content/view/full/123

print view
layout/set/print/content/view/full/123

xml view
layout/set/xml/content/view/xml/123

;-)

Looking for a new job? http://www.xrow.com/xrow-GmbH/Jobs
Looking for hosting? http://hostingezpublish.com
-----------------------------------------------------------------------------
GMT +01:00 Hannover, Germany
Web: http://www.xrow.com/

laurent le cadet

Thursday 23 September 2004 10:04:50 am

Hi all,

Flash MX 2004 pro use now XML connector which can connect textarea to an XML source via URL very simply.
So I think it can be godd way to perform what we are talking about.
What I don't know is how and what to extract (node, attribute...) and which URL can be use to grab the result.

Hope that contribute to go on the way.

Laurent

Ekkehard Dörre

Friday 24 September 2004 2:57:30 am

@laurent:

do you have some links and maore information about this?

Thanks, and greetings, ekke

http://www.coolscreen.de - Over 40 years of certified eZ Publish know-how: http://www.cjw-network.com
CJW Newsletter: http://projects.ez.no/cjw_newsletter - http://cjw-network.com/en/ez-publ...w-newsletter-multi-channel-marketing

laurent le cadet

Friday 24 September 2004 3:22:10 am

Hi Ekkehard,

Flash MX2004 pro provide a set of components like textArea, mediaDisplayers, label, datGrid...and much more (UI components).
You can bound this components to a db with a http process for example via an XMLConnector (Data Components).

To feed your Flash appi that way, you have to build your XML connector (send/recieve) importing an XML structure (simple clic on an arrow), and give it a URL where to find the data.

My idea/need, is to find which XML structure and variables can be send by an eZp db to print attributes of a specific node (folder for example) in a flash template.

It can be very useful to print short infos in a small area instead of reloading a whole page for each clic in a simple flash object (it can be also a good way to have more fun with design because you can use the components as movie clips).

<b>BUT...</b> I don't know how ;)

Laurent.

You can find more here : http://livedocs.macromedia.com/flash/mx2004/main_7_2/wwhelp/wwhimpl/js/html/wwhelp.htm?href=Part_Components.html

Ekkehard Dörre

Saturday 25 September 2004 3:58:50 pm

Ok let's start.

In database there is a lot of xml und pure textlines. Here some examples:

xmltextfield:


<?xml version="1.0" encoding="UTF-8"?>
<section xmlns:image="http://ez.no/namespaces/ezpublish3/image/"
        xmlns:xhtml="http://ez.no/namespaces/ezpublish3/xhtml/"
        xmlns:custom="http://ez.no/namespaces/ezpublish3/custom/">
 <section>
   <header>Templates</header>
   <paragraph>
     <line>eZ publish uses templates as the fundamental unit of site design. A template is basically an extended HTML file that describes how some particular type of content should be visualized. The templates for this site are located within the following directories:</line>
     <ul>
       <li>&quot;design/base/templates&quot;</li>
       <li>&quot;design/base/override/templates&quot;</li>
     </ul>
   </paragraph>
   <paragraph>Please do not change/edit the contents of the default design directories, which are:</paragraph>
   <paragraph>
     <ul>
       <li>&quot;design/standard&quot;</li>
       <li>&quot;design/admin&quot;</li>
     </ul>
   </paragraph>
 </section>
 <section>
   <header>Style sheets</header>
   <paragraph>eZ publish makes use of CSS files (Cascading Style Sheets). These files contain information about colors, text styles, font sizes, spacing and so on; and thereby dictate the overall look/appearance of the site. The CSS files for this site are located within the &quot;design/base/stylesheets&quot; directory.</paragraph>
 </section>
 <section>
   <header>Configuration</header>
   <paragraph>All configuration settings are stored within .ini files. The default ini files are located inside the &quot;settings&quot; directory. These files must not be altered. The actual configuration files for this site are contained in override files that are located within the &quot;settings/siteaccess/base&quot; directory. The settings in these files override the default configuration settings. There is a GUI frontend for editing the various configuration settings. This frontend can be found in the administration interface: Setup -&gt; Advanced -&gt; Ini settings.</paragraph>
 </section>
 <section>
   <header>Documentation and guidance</header>
   <paragraph>The
     <link id="1">eZ publish documentation</link> covers common topics related to the setup and daily use of the eZ publish content management system/framework. In addition, it also covers some advanced topics. People who are unfamiliar with eZ publish should at least read the
     <link id="2">&quot;eZ publish basics&quot;</link> and the
     <link id="3">&quot;Day to day use&quot;</link> chapters.</paragraph>
   <paragraph>If you&apos;re unable to find an answer/solution to a specific question/problem within the documentation pages, you should make use of the official
     <link id="4">eZ publish forum</link>. People who need professional help should purchase
     <link id="5">support</link> or
     <link id="6">consulting</link> services. It is also possible to sign up for different
     <link id="7">training sessions</link>.</paragraph>
   <paragraph>For more information about eZ publish and other products/services from eZ systems, please visit
     <link id="8">ez.no</link>.</paragraph>
 </section>
</section>

image:


<?xml version="1.0" encoding="UTF-8"?>
<ezimage serial_number="1"
        is_valid="1"
        filename="foggy_trees.jpg"
        suffix="jpg"
        basename="foggy_trees"
        dirpath="var/news/storage/images/galleries/landscape/foggy_trees/256-1-eng-GB"
        url="var/news/storage/images/galleries/landscape/foggy_trees/256-1-eng-GB/foggy_trees.jpg"
        original_filename="packages/addons/gallery/simplefiles/6582ee1d.jpg"
        mime_type="image/jpeg"
        width="400"
        height="300"
        alternative_text="Foggy trees."
        alias_key="1293033771"
        timestamp="1087635481">
 <original attribute_id=""
           attribute_version=""
           attribute_language="" />
 <alias name="reference"
        filename="foggy_trees_reference.jpg"
        suffix="jpg"
        dirpath="var/news/storage/images/galleries/landscape/foggy_trees/256-1-eng-GB"
        url="var/news/storage/images/galleries/landscape/foggy_trees/256-1-eng-GB/foggy_trees_reference.jpg"
        mime_type="image/jpeg"
        width="400"
        height="300"
        alias_key="-1689502181"
        timestamp="1088026612"
        is_valid="1" />
 <alias name="large"
        filename="foggy_trees_large.jpg"
        suffix="jpg"
        dirpath="var/news/storage/images/galleries/landscape/foggy_trees/256-1-eng-GB"
        url="var/news/storage/images/galleries/landscape/foggy_trees/256-1-eng-GB/foggy_trees_large.jpg"
        mime_type="image/jpeg"
        width="300"
        height="225"
        alias_key="-1095359119"
        timestamp="1088026612"
        is_valid="1" />
 <alias name="gallerythumbnail"
        filename="foggy_trees_gallerythumbnail.jpg"
        suffix="jpg"
        dirpath="var/news/storage/images/galleries/landscape/foggy_trees/256-1-eng-GB"
        url="var/news/storage/images/galleries/landscape/foggy_trees/256-1-eng-GB/foggy_trees_gallerythumbnail.jpg"
        mime_type="image/jpeg"
        width="70"
        height="53"
        alias_key="-981219025"
        timestamp="1091467338"
        is_valid="1" />
 <alias name="imagelarge"
        filename="foggy_trees_imagelarge.jpg"
        suffix="jpg"
        dirpath="var/news/storage/images/galleries/landscape/foggy_trees/256-1-eng-GB"
        url="var/news/storage/images/galleries/landscape/foggy_trees/256-1-eng-GB/foggy_trees_imagelarge.jpg"
        mime_type="image/jpeg"
        width="360"
        height="270"
        alias_key="-1729515638"
        timestamp="1091467343"
        is_valid="1" />
</ezimage>

author:


<?xml version="1.0" encoding="UTF-8"?>
<ezauthor>
 <authors>
   <author id="0"
           name="Administrator User"
           email="nospam@ez.no" />
 </authors>
</ezauthor>

ezmatrix:


<?xml version="1.0" encoding="UTF-8"?>
<ezmatrix>
 <name></name>
 <columns number="2">
   <column num="0"
           id="contact_type">Contact type</column>
   <column num="1"
           id="contact_value">Contact value</column>
 </columns>
 <rows number="1" />
 <c>Phone</c>
 <c>555 12356</c>
</ezmatrix>

or:

<?xml version="1.0" encoding="UTF-8"?>
<ezmatrix>
 <name></name>
 <columns number="2">
   <column num="0"
           id="contact_type">Contact type</column>
   <column num="1"
           id="contact_value">Contact value</column>
 </columns>
 <rows number="2" />
 <c>Phone</c>
 <c>555 1231236</c>
 <c>Fax</c>
 <c>555 2342347</c>
</ezmatrix>

ezoption:


<?xml version="1.0" encoding="UTF-8"?>
<ezoption>
 <name>What do you think about Pi?</name>
 <options>
   <option id="0"
           additional_price="">I&apos;ts way to low</option>
   <option id="1"
           additional_price="">To high</option>
   <option id="2"
           additional_price="">Pi?</option>
   <option id="3"
           additional_price="">42</option>
 </options>
</ezoption>

How to get them?

We take a look at /design/news/override/templates/full/article.tpl
Class article:
<i>
1. Title (textline) (id:1)

Identifizierer

title

2. Short title (Textline) (id:152)

Identifizierer

short_title

3. Author (Author) (id:153)

Identifizierer

author

4. Intro (XML Textfield) (id:120)

intro

5. Body (XML Textfield) (id:121)

Identifizierer

body

6. Enable comments (Checkbox) (id:123)

enable_comments

7. Image (Objekt Relation) (id:154)

Identifizierer

image
</i>

Let's have a xml view on it:

textline is one line. We can just add a xmltag. HTML comments are for the source look later.


<!-- title start -->
<myarticletitle>{$node.object.data_map.title.content|wash()}</myarticletitle>
<!-- title end-->

The author:

        <!-- author start --> 
<myarticleauthor>{$node.object.data_map.author.content.author_list.0.name|wash()}</myarticleauthor>
<myarticleauthoremail>{$node.object.data_map.author.content.author_list.0.email|wash()}</myarticleauthoremail>
<!-- author end-->

Here we need more informations:
Header, strong, list, ...
The intro in xml:


      <!-- xml intro text start-->
                 {$node.object.data_map.intro.data_text}
                     <!-- xml intro text end-->

for body

 <!-- xml body text start-->
                 {$node.object.data_map.body.data_text}
                     <!-- xml body text end-->

<b>The whole template and have al look at the source for full xml feeling :-)</b>


{* Article - Full view for flash step 1.0*}

<div class="content-view-full">
    <div class="class-article">

        <h1>{$node.object.data_map.title.content|wash()}</h1>
<!-- title start -->
<myarticletitle>{$node.object.data_map.title.content|wash()}</myarticletitle>
<!-- title end-->
        {section show=$node.object.data_map.author.content.is_empty|not()}
        <div class="attribute-byline">
        <p class="author">
             {attribute_view_gui attribute=$node.object.data_map.author}
             {*$node.object.data_map.author.content|attribute(show,4)*}
             <!-- author start --> 
<myarticleauthor>{$node.object.data_map.author.content.author_list.0.name|wash()}</myarticleauthor>
<myarticleauthoremail>{$node.object.data_map.author.content.author_list.0.email|wash()}</myarticleauthoremail>
<!-- author end-->
        </p>
        <p class="date">
             {$node.object.published|l10n(date)}
        </p>
        </div>
        {/section}

        {section show=$node.object.data_map.image.content}
            <div class="attribute-image">
                {attribute_view_gui attribute=$node.object.data_map.image align=right}
                {*$node.object.data_map.image|attribute(show,2)*}
            </div>
        {/section}

        {section show=$node.object.data_map.intro.content.is_empty|not}
            <div class="attribute-short">
                {attribute_view_gui attribute=$node.object.data_map.intro}
                 {*$node.object.data_map.intro|attribute(show,1)*}
     
                 
                     <!-- xml intro text start-->
                 {$node.object.data_map.intro.data_text}
                     <!-- xml intro text end-->
                   
            </div>
        {/section}

        {section show=$node.object.data_map.body.content.is_empty|not}
            <div class="attribute-long">
                {attribute_view_gui attribute=$node.object.data_map.body}
                     {*$node.object.data_map.body|attribute(show,1)*}
              <!-- xml body text start-->
                 {$node.object.data_map.body.data_text}
                     <!-- xml body text end-->
            </div>
        {/section}

     <div class="attribute-pdf">
          <p>
             <a href={concat("layout/set/print/content/view/full/",$node.node_id)|ezroot}>{'application/document'|mimetype_icon( small, "Printable version"|i18n( "design/standard/layout" ) )} {"Printable version"|i18n( "design/standard/layout" )}</a> |
              <a href={concat('/content/pdf/',$node.node_id)|ezroot}>{'application/pdf'|mimetype_icon( small, "Download PDF"|i18n( "design/base" ) )} {"Download PDF"|i18n( "design/base" )}</a>

          </p>
        </div>



        {* Should we allow comments? *}
        {section show=is_unset( $versionview_mode )}
        {section show=$node.object.data_map.enable_comments.content}
            <h2>{"Comments"|i18n("design/base")}</h2>
                <div class="content-view-children">
                    {section name=Child loop=fetch_alias( comments, hash( parent_node_id, $node.node_id ) )}
                        {node_view_gui view='line' content_node=$:item}
                    {/section}
                </div>

                {* Are we allowed to create new object under this node? *}
                {section show=fetch( content, access,
                                     hash( access, 'can_create',
                                           contentobject, $node,
                                           contentclass_id, 'comment' ) )}
                    <form method="post" action={"content/action"|ezroot}>
                    <input type="hidden" name="ClassIdentifier" value="comment" />
                    <input type="hidden" name="NodeID" value="{$node.node_id}" />
                    <input class="button new_comment" type="submit" name="NewButton" value="{'New Comment'|i18n( 'design/base' )}" />
                    </form>
                {section-else}
                    <h3>{"You are not allowed to create comments."|i18n("design/base")}</h3>
                {/section}
        {/section}
        {/section}

    </div>
</div>



Greetings, ekke

http://www.coolscreen.de - Over 40 years of certified eZ Publish know-how: http://www.cjw-network.com
CJW Newsletter: http://projects.ez.no/cjw_newsletter - http://cjw-network.com/en/ez-publ...w-newsletter-multi-channel-marketing

Matt Gifford

Thursday 14 August 2008 8:45:18 am

Hi guys

I've started using amfphp and have create a sample FLEX application, which is working well to query the database and pull out data relevant to specific contect ids.

What I'd really like, as the ezPublish database is a nightmare to try and query to actually get the exact content for the page, is to somehow connect to ezPub to draw out the data or use the same functions (module_result, fetch etc) to get the data that way.

Is this possible? Has anyone got any further with this?

Many thanks,

Matt

Heath

Wednesday 26 November 2008 9:24:07 am

Hello,

Have you tried using the eZ Publish Kernel API to more simply fetch information from the database and return it through a web service?

<i>
http://pubsvn.ez.no/doxygen/4.0/html/
http://amfphp.org/
http://projects.ez.no/remoting
http://ezpedia.org/wiki/ez/remoting
http://svn.projects.ez.no/remoting/trunk/extension/remoting/</i>

The above remoting extension essentially provides for a simple way to provide amfphp functionality (web services) using eZ Publish library / kernel api code and connection to the database all through eZ publish itself.

The api to fetch information out of the database in 'eZ' php is really simple to use.
<i>http://svn.projects.ez.no/remoting/trunk/extension/remoting/examples/HelloWorld.php
http://svn.projects.ez.no/bcsoapsearch/trunk/extension/bcsoapsearch/nusoap/bcsoapsearch.methods.php</i>

There are also a number of ways to fetch information from eZ already available. You mentioned amfphp and I thought I might point these resources out to you.

Also look into the following alternatives
<i>
http://projects.ez.no/bcsoapsearch
http://projects.ez.no/nusoap
http://svn.projects.ez.no/ezcore/trunk/ezcore/doc/ajax.txt
http://projects.ez.no/ezcore</i>

Cheers,
Heath

Brookins Consulting | http://brookinsconsulting.com/
Certified | http://auth.ez.no/certification/verify/380350
Solutions | http://projects.ez.no/users/community/brookins_consulting
eZpedia community documentation project | http://ezpedia.org

Jérôme Vieilledent

Sunday 25 April 2010 10:03:35 am

Hi

Adding my reply on this quite old topic : You can use jvAMF extension to expose Flash Remoting services. It uses Zend_AMF library.

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

36 542 Users on board!

Forums menu