x
 
Create New Page
 View Previous Changes    ( Last updated by Lisa Wess )

ExpressionEngine Slideshow Pro and Flickr

This tutorial is the brain child of a 5pieces.com tutorial but slightly adapted to make it work with Flickr.

1 Creating the Slideshow Pro .swf
1.1 Create an SSP instance in Flash, call it “flickr”.
1.2 In the component inspector, leave XML file path empty and set XML file type to “Flickr RSS”.
1.3 Create a new layer above the layer containing the SSP instance, call it “actions”.
1.4 Bring up actions and add the following action script code: “flickr.xmlFilePath=xmlfile;” (without the brackets). The important bit here is that the name of the instance, in this case “flickr”, is the same as in the action script code.
1.5 Publish and upload the .swf file.

2 SWFobject
2.1 Obtain and upload the two SWFobject 2.0 components, i.e. “swfobject.js” and “expressInstall.swf”.
2.2 Include the following code in the template in which you intend to show the flickr feed.

This goes within the header tags

<script type="text/javascript" src="/flash/swfobject.js"></script>
<script type="text/javascript">
//<![CDATA[
var flashvars = { xmlfile: "{path="template_group/flickr.xml"}{entry_id}" };
var
params = {};
var
attributes = {};
swfobject.embedSWF("/flash/test.swf", "flickr", "230", "167", "9.0.0","/flash/expressInstall.swf", flashvars, params, attributes);
//]]>
</script>

Usage:

swfobject.embedSWF("path_to_swf", "some_unique_ID", "width", "height", "9.0.0","path_to_expressInstall.swf", flashvars, params, attributes);

This goes into the body section:

<div id="some_unique_id}"></div>

3 Create your dynamic XML feed
3.1 Create a new template, e.g. flickr.xml (I chose XML for template type)
3.2 Include the following code

{exp:weblog:entries weblog="some_weblog" entry_id="{segment_3}"}
<opml version="1.1">
<
head>
<
title>{title}</title>
</
head>
<
body>
<
outline xmlUrl="{flickr}" />
</
body>
</
opml>
{/exp:weblog:entries}

4 Create a custom field called “flickr”
4.1 Make sure that in the preferences of the weblog you choose, you don’t have “automatically turn URLs into links” activated. And choose “none” for formatting of the field.

Category:Templates Category:Tips

Categories: