<?xml version="1.0" encoding="UTF-8"?>
<Module>
<ModulePrefs title="Slideshow from Picasa Media RSS Feed"
title_url="http://sites.google.com/site/annuairevin/" 
width="380"
height="300"
scrolling="false"
directory_title="Media RSS Feed Slideshow from Picasa Album."
description="Media RSS Feed Slideshow from Picasa. We can define Display and Transition Time"
screenshot="http://www.liens-du-vin.ch/_pic06/gadget-flash_slideshow-screenshot.png"
thumbnail="http://www.liens-du-vin.ch/_pic06/gadget-flash_slideshow-thumb.png"
author="Philippe Chappuis"
author_email="info+gadgetCSE@liens-du-vin.ch"
author_affiliation="Google"
author_location="Rolle Switzerland"
author_link="http://www.liens-du-vin.ch"
author_photo="http://www.liens-du-vin.ch/_pic02/gadget-author-photo.png"
author_aboutme="An Engineer who likes to develop for the Net and tastes wines"
author_quote="A chief is a man who assumes responsibility. He says &quot;I was beaten&quot; he does not say &quot;My men were beaten&quot; - Antoine de Saint-Exupery">

<Require feature="analytics" />

</ModulePrefs>

<UserPref name="File" display_name="File (RSS feed)"
required="true" default_value="http://picasaweb.google.com/data/feed/base/user/gourmandeetcitadine/albumid/5387564110505978145?alt=rss&amp;kind=photo&amp;hl=fr" />

<UserPref name="DTime" display_name="Display Time (ms)" required="true" default_value="4000" />
<UserPref name="TTime" display_name="Transition Time (ms)" required="true" default_value="1500" />

<UserPref name="Bordercol" display_name="Color of Border" required="true" default_value="#330000" />
<UserPref name="SlideBcol" display_name="Background for Slide" required="true" default_value="#c4bd97" />
<UserPref name="BoxBcol" display_name="Background for Main Box" required="true" default_value="#c4bd97" />

<UserPref name="PWidth" display_name="Width for pictures" required="true" default_value="350" />
<UserPref name="PHeight" display_name="Height for pictures" required="true" default_value="263" />

<Content type="html"><![CDATA[
<script src="http://www.google.com/jsapi" type="text/javascript"></script>
<script src="http://www.google.com/uds/solutions/slideshow/gfslideshow.js" type="text/javascript"></script>

<style text="text/css">

.gss
{
width: __UP_PWidth__px;
height: __UP_PHeight__px;
margin: 0 auto 0 auto;
color: #000;
background-color: __UP_SlideBcol__;
border: 2px solid __UP_Bordercol__;
padding: 4px;
}

#feed_title
{
display: none;
}

#main_box
{
background-color: __UP_BoxBcol__; 
}

</style>

<script type="text/javascript">

// Global variables

var prefs = new _IG_Prefs(__MODULE_ID__);

var s_fil=_trim(prefs.getString("File"));

var s_dti =_trim(prefs.getString("DTime"));
if ((s_dti < "1000") | (s_dti > "60000")) s_dti="1000";

var s_tti =_trim(prefs.getString("TTime"));
if ((s_tti < "500") | (s_tti > "60000")) s_tti="1000";

  
  
function load_feed()
{
var feed_input = s_fil;

var options = {
fullControlPanel: true,
fullControlPanelSmallIcons: true,
thumbnailSize : GFslideShow.THUMBNAILS_LARGE,
pauseOnHover: true,
scaleImages : true,
  fullControlPanelFadeOutTime: 800,
displayTime: s_dti,
transitionTime: s_tti,


//no action when click linkTarget : google.feeds.LINK_TARGET_BLANK,
feedLoadCallback: FeedTitle,
  
// to get the full size
thumbnailUrlResolver: UrlResolver, 

transitionCallback: TransitionHandler
};

new GFslideShow(feed_input, "slide_box", options);
}

// Find the title of the Feed

function FeedTitle(result)
{ if ( result.error ) { alert("Error : Feed load failed"); }
else
{
var html=result.feed.title;
// html="<a href='" + s_lnk + "' target='_blank' title='" + s_tit + "'>" + html + "</a>";
_gel("feed_title").innerHTML=html; // keep under ie8 display small thumb without ??

}
}

// Find title of pic

function TransitionHandler(entry, transitionTime)
{
// _gel("image_title").innerHTML=entry.title + "<br/>&nbsp;<br/>";
}

// Get the full size (picasa send thumb from s288 (288 x 216) 

function UrlResolver (entry)
{

var c=entry.content;
var s1 = c.indexOf("src=")+5;

var i = c.indexOf(".jpg",s1); 
if (i==-1) {i=c.indexOf(".JPG",s1);}  

var s2 = i + 4;  
var thumburl= c.substring(s1,s2); 


// take the picture from s800
  
thumburl=thumburl.replace("/s288/","/s800/");

return(thumburl);    
}        
  
  
google.load("feeds", "1");
google.setOnLoadCallback(load_feed);
  
_IG_Analytics("UA-442758-35", "/g_slide");  

</script>


</head>

<div id="main_box">&nbsp;<div id="feed_title"></div><center><div id="slide_box" class="gss">Loading pictures...</div></center><br/><br/><br/></div>
]]></Content>
</Module>




