see live demo!

Not signed in (Sign In)

Categories

 

buy Monoslideshow

via PayPal / credit card

Vanilla 1.1.10 is a product of Lussumo. More Information: Documentation, Community Support.

Welcome Guest!
Want to take part in these discussions? If you have an account, sign in now.
If you don't have an account, apply for one now.
    • CommentAuthorwwwAndries
    • CommentTimeJan 19th 2010 edited
     permalink

    Hello,

    Is there a way to pass the xml data through the 'xml' property of the flashvars and use static publishing?
    I've tried this:

    example xml: $xml = '<contents><image source="201001191017120987.jpg"/><image source="201001191017130143.jpg"/></contents></album>'; $xml = preg_replace("/r?n/", "\n", addslashes($xml)); $this->content = '<div id="flash_content">'; $this->content .= '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="745" height="360" id="monoslideshow" name="monoslideshow">'; $this->content .= ' <param name="movie" value="'.$this->app->getWebRoot().'media/flash/monoslideshow.swf" />'; $this->content .= ' <param name="wmode" value="opaque" />'; $this->content .= ' <param name="allowfullscreen" value="false" />'; $this->content .= ' <param name="allowscriptaccess" value="always" />'; $this->content .= ' <param name="flashvars" value="showLogo=false&showRegistration=false&xml=escape('.$xml.')" />'; $this->content .= ' <!--[if !IE]>-->'; $this->content .= ' <object type="application/x-shockwave-flash" data="'.$this->app->getWebRoot().'media/flash/monoslideshow.swf" width="745" height="360">'; $this->content .= ' <param name="wmode" value="opaque" />'; $this->content .= ' <param name="allowfullscreen" value="false" />'; $this->content .= ' <param name="allowscriptaccess" value="always" />'; $this->content .= ' <param name="flashvars" value="showLogo=false&showRegistration=false&xml=escape('.$xml.')" />'; $this->content .= ' <!--<![endif]-->'; $this->content .= ' <a href="http://www.adobe.com/go/getflashplayer">'; $this->content .= ' <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />'; $this->content .= ' </a>'; $this->content .= ' <!--[if !IE]>-->'; $this->content .= ' </object>'; $this->content .= ' <!--<![endif]-->'; $this->content .= '</object></div>';

    I've got it working with dynamic publishing like this:

    example xml: $xml = '<contents><image source="201001191017120987.jpg"/><image source="201001191017130143.jpg"/></contents></album>'; $xml = preg_replace("/r?n/", "\n", addslashes($xml)); $this->content = '<div id="flash_content"></div>'; $this->content .= ' <script type="text/javascript">'; // $this->content .= ' // <![CDATA[ ' ; $this->content .= ' var flashvars = {showLogo: "false", showRegistration: "false", xml: escape("'. $xml.'")};' . "n"; $this->content .= ' var params = {allowscriptaccess: "always", allowfullscreen: "false", wmode: "opaque"};' . "n"; $this->content .= ' var attributes = {id: "monoslideshow", name: "monoslideshow"};' . "n"; $this->content .= ' swfobject.embedSWF("'.$this->app->getWebRoot().'media/flash/monoslideshow.swf", "flash_content", "745", "360", "9", false, flashvars, params, attributes );'; // $this->content .= ' // ]]> ' ; $this->content .= ' </script>';

    First it didn't work in IE but after commenting '<![CDATA[' and the use of 'escape($xml)' I've got it working.

    Best Regards,

    Andries

monokai logo © 2009 Monokai, all rights reserved. Buy Monoslideshow.