I want to use CoolIris (www.cooliris.com) in my asp.net website and it should take images from my website (images folder), not from external sources like facebook, flickr, youtube or external rss feeds.
Cooliris to use my website images?
1.2k views Asked by hotcoder AtThere are 2 answers
After doing a little more research and seeing as how Cooliris sold out, I found an article that shows you how to host them yourself and get away from everything relying on outside sources... This method is completely self sufficient!
Sources:
- https://github.com/cooliris/embed-wall
- http://web.archive.org/web/20141017154208/http://www.cooliris.com/developer/reference/media-rss/
- http://web.archive.org/web/20141017082804/http://www.cooliris.com/developer/documentation/?p=embed
- http://feedvalidator.org/
This assumes you have a directory structure such as the following...
Step 1: Create Your RSS Feed
You want to start out by creating a file like "media.xml" and add the following to it. Be sure to change the paths of the images (your website address etc).
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Default</title>
<description>Feed Description</description>
<link>http://mywebsite.com/photogallery.php</link>
<item>
<title>First Image</title>
<media:description>This would be the first image.</media:description>
<link>http://mywebsite.com/graphics/portfolio/pl_images/image1.jpg</link>
<media:thumbnail url="http://mywebsite.com/graphics/portfolio/pl_thumbs/image1_thumb.jpg"/>
<media:content url="http://mywebsite.com/graphics/portfolio/pl_images/image1.jpg"/>
</item>
<item>
<title>Second Image</title>
<media:description>This would be the second image.</media:description>
<link>http://mywebsite.com/graphics/portfolio/pl_images/image2.jpg</link>
<media:thumbnail url="http://mywebsite.com/graphics/portfolio/pl_thumbs/image2_thumb.jpg"/>
<media:content url="http://mywebsite.com/graphics/portfolio/pl_images/image2.jpg"/>
</item>
</channel>
</rss>
Step 2: Edit Your Display Page
Open up index.php and make sure it looks similar to the following code. Take a close look at the following changes...
- The cooliris.swf file is now hosted at your website rather than at "apps.cooliris.com".
- The allowScriptAccess variables (ALL OF THEM) are now "never" rather than what they used to be "always".
index.php
<div id="cooliris" class="cooliris">
<object id="o" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%">
<param name="movie" value="http://mywebsite.com/cooliris.swf" />
<param name="flashvars" value="feed=http://mywebsite.com/media.xml&showSearch=false" />
<param name="allowFullScreen" value="false" />
<param name="allowScriptAccess" value="never" />
<embed type="application/x-shockwave-flash"
src="http://mywebsite.com/cooliris.swf"
width="100%"
height="100%"
flashvars="feed=http://mywebsite.com/media.xml&showSearch=false"
allowFullScreen="false"
allowScriptAccess="never">
</embed>
</object>
</div>
Step 3: Re-configure Cross-Domain If Needed
Before, when the app was hosted at cooliris.com you had to configure the following file and have it in the root of your site inorder for flash to load and run the apps from another domain. Well we are hosting the file on our local server now so we need to DELETE IT (crossdomain.xml) as it is no longer needed. This is what is used to look like...
crossdomain.xml
<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<allow-access-from domain="*.cooliris.com" secure="false" />
</cross-domain-policy>
Step 4: Go Grab A Copy Of The cooliris.swf File
Now we need the main component... We need a copy of the cooliris.swf file. You can grab a copy from this link hosted at github.com.
If you publish a Media RSS feed, Cooliris (the browser plug-in) will work with your site. See: http://www.cooliris.com/developer/reference/media-rss/
To embed the Flash wall, follow these instructions: http://www.cooliris.com/developer/documentation/?p=embed