<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Rotating images using jQuery Ajax</title>
	<atom:link href="http://kevindubois.com/blog/2009/03/03/rotating-images-jquery-ajax/feed/" rel="self" type="application/rss+xml" />
	<link>http://kevindubois.com/blog/2009/03/03/rotating-images-jquery-ajax/</link>
	<description>A LAMP consultant in the greater Salt Lake City Area</description>
	<lastBuildDate>Thu, 22 Apr 2010 20:58:00 -0600</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Ron</title>
		<link>http://kevindubois.com/blog/2009/03/03/rotating-images-jquery-ajax/comment-page-1/#comment-476</link>
		<dc:creator>Ron</dc:creator>
		<pubDate>Thu, 22 Apr 2010 20:58:00 +0000</pubDate>
		<guid isPermaLink="false">http://kevindubois.com/blog/?p=13#comment-476</guid>
		<description>1 steps more :
if dont have a img to show:

	if(plan.length == 0){
		self.empty().css({
			overflow: &#039;hidden&#039;,
			padding: 0
		});
		return ; 
	}</description>
		<content:encoded><![CDATA[<p>1 steps more :<br />
if dont have a img to show:</p>
<p>	if(plan.length == 0){<br />
		self.empty().css({<br />
			overflow: &#039;hidden&#039;,<br />
			padding: 0<br />
		});<br />
		return ;<br />
	}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin Dubois</title>
		<link>http://kevindubois.com/blog/2009/03/03/rotating-images-jquery-ajax/comment-page-1/#comment-475</link>
		<dc:creator>Kevin Dubois</dc:creator>
		<pubDate>Sat, 03 Apr 2010 21:54:10 +0000</pubDate>
		<guid isPermaLink="false">http://kevindubois.com/blog/?p=13#comment-475</guid>
		<description>Yeah that would be a nice feature.  I&#039;ll look into it and will let you know.</description>
		<content:encoded><![CDATA[<p>Yeah that would be a nice feature.  I&#039;ll look into it and will let you know.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: toro</title>
		<link>http://kevindubois.com/blog/2009/03/03/rotating-images-jquery-ajax/comment-page-1/#comment-474</link>
		<dc:creator>toro</dc:creator>
		<pubDate>Sat, 03 Apr 2010 15:09:41 +0000</pubDate>
		<guid isPermaLink="false">http://kevindubois.com/blog/?p=13#comment-474</guid>
		<description>Cool, thanks! got it working right away. One Problem i have:
It seems, it starts to rotate only after all images are loaded.
Since I load a lot BIG images, it would be cool if the rotation would start as soon as a 2nd pic is there, and then gradually adds more pic&#039;s to the show, as they are downloaded.</description>
		<content:encoded><![CDATA[<p>Cool, thanks! got it working right away. One Problem i have:<br />
It seems, it starts to rotate only after all images are loaded.<br />
Since I load a lot BIG images, it would be cool if the rotation would start as soon as a 2nd pic is there, and then gradually adds more pic&#039;s to the show, as they are downloaded.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sarah</title>
		<link>http://kevindubois.com/blog/2009/03/03/rotating-images-jquery-ajax/comment-page-1/#comment-462</link>
		<dc:creator>Sarah</dc:creator>
		<pubDate>Tue, 16 Mar 2010 21:32:22 +0000</pubDate>
		<guid isPermaLink="false">http://kevindubois.com/blog/?p=13#comment-462</guid>
		<description>Awesome - that worked perfectly! I was trying to hack together something similar basing my code on a part of the basic lightbox plugin, which also shows an image counter, and it was just getting messy. And it didn&#039;t work. 

If you&#039;re interested, you can check out our flood cam here: http://www.sciencebuzz.org/postcards/uploads/phenology/webcam/

It&#039;s a little prettier on our kiosk in the river gallery, so stop by sometime if you&#039;re ever in St. Paul!

Thanks again!</description>
		<content:encoded><![CDATA[<p>Awesome &#8211; that worked perfectly! I was trying to hack together something similar basing my code on a part of the basic lightbox plugin, which also shows an image counter, and it was just getting messy. And it didn&#039;t work. </p>
<p>If you&#039;re interested, you can check out our flood cam here: <a href="http://www.sciencebuzz.org/postcards/uploads/phenology/webcam/" rel="nofollow">http://www.sciencebuzz.org/postcards/uploads/phenology/webcam/</a></p>
<p>It&#039;s a little prettier on our kiosk in the river gallery, so stop by sometime if you&#039;re ever in St. Paul!</p>
<p>Thanks again!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin Dubois</title>
		<link>http://kevindubois.com/blog/2009/03/03/rotating-images-jquery-ajax/comment-page-1/#comment-461</link>
		<dc:creator>Kevin Dubois</dc:creator>
		<pubDate>Tue, 16 Mar 2010 16:34:06 +0000</pubDate>
		<guid isPermaLink="false">http://kevindubois.com/blog/?p=13#comment-461</guid>
		<description>Hi Sarah, thanks for the nice comment!

I played around with the code and I think your best option is to hack into the cross-slide.js file a little bit:  go to around line 210 where you should find the following:



&lt;code&gt;			if (p.href)
				elm = jQuery(format(&#039;&lt;a href=&quot;{0}&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;{1}&quot;/&gt;&lt;/a&gt;&#039;, p.href, p.src));
			else
				elm = jQuery(format(&#039;&lt;img src=&quot;{0}&quot;/&gt;&#039;, p.src));&lt;/code&gt;



Below is the replacement code. The last line is what you&#039;re going to need to change.  Basically, I added a div wrapper (since the code subsequently looks for the children of the image container, we need to keep the number of elements the same).  This wrapper contains the original img code and a new div.  This new div will contain your page number.  variable i is the loop number starting at 0 so we need to increment that by 1.  plan.length is the total number of images in your folder.  You&#039;re probably going to need to play around with the css of the div a bit more but I think this should get you started: 



&lt;code&gt;			if (p.href){
                elm = jQuery(format(&#039;&lt;a href=&quot;{0}&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;{1}&quot;/&gt;&lt;/a&gt;&#039;, p.href, p.src));
            }				
			else{
                q = i+1;
                elm = jQuery(format(&#039;&lt;div&gt;&lt;img src=&quot;{0}&quot;/&gt;&lt;div style=&quot;position:relative; background:white; top:-35px;width:500px&quot;&gt;image {1} of {2} &lt;/div&gt;&lt;/div&gt;&#039;, p.src, q, plan.length));
            }&lt;/code&gt;

</description>
		<content:encoded><![CDATA[<p>Hi Sarah, thanks for the nice comment!</p>
<p>I played around with the code and I think your best option is to hack into the cross-slide.js file a little bit:  go to around line 210 where you should find the following:</p>
<p><code>			if (p.href)<br />
				elm = jQuery(format(&#039;&lt;a href=&quot;{0}&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;{1}&quot;/&gt;&lt;/a&gt;&#039;, p.href, p.src));<br />
			else<br />
				elm = jQuery(format(&#039;&lt;img src=&quot;{0}&quot;/&gt;&#039;, p.src));</code></p>
<p>Below is the replacement code. The last line is what you&#039;re going to need to change.  Basically, I added a div wrapper (since the code subsequently looks for the children of the image container, we need to keep the number of elements the same).  This wrapper contains the original img code and a new div.  This new div will contain your page number.  variable i is the loop number starting at 0 so we need to increment that by 1.  plan.length is the total number of images in your folder.  You&#039;re probably going to need to play around with the css of the div a bit more but I think this should get you started: </p>
<p><code>			if (p.href){<br />
                elm = jQuery(format(&#039;&lt;a href=&quot;{0}&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;{1}&quot;/&gt;&lt;/a&gt;&#039;, p.href, p.src));<br />
            }<br />
			else{<br />
                q = i+1;<br />
                elm = jQuery(format(&#039;&lt;div&gt;&lt;img src=&quot;{0}&quot;/&gt;&lt;div style=&quot;position:relative; background:white; top:-35px;width:500px&quot;&gt;image {1} of {2} &lt;/div&gt;&lt;/div&gt;&#039;, p.src, q, plan.length));<br />
            }</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sarah</title>
		<link>http://kevindubois.com/blog/2009/03/03/rotating-images-jquery-ajax/comment-page-1/#comment-460</link>
		<dc:creator>Sarah</dc:creator>
		<pubDate>Mon, 15 Mar 2010 22:38:04 +0000</pubDate>
		<guid isPermaLink="false">http://kevindubois.com/blog/?p=13#comment-460</guid>
		<description>Awesome post, this helped me out A LOT! We&#039;ve got a webcam here at the museum I work at that&#039;s capturing images of the Mississippi River every 15 minutes, and then it FTPs the JPGs onto our webserver. I used a slightly-modified version of this script to put together a page that illustrates the rising water as the river floods - the crossfade plugin is really, really nice!

Now I&#039;m trying to think of a way to show how the photos relate to each other sequentially so that if you catch part of the slideshow (it&#039;s playing on a kiosk here), you&#039;ll know where you&#039;re at in the series. 

Can you think of a good way to implement something that would count the total number of images in the directory, then output where you&#039;re at as it rotates? Like an &quot;Image 3 of 32&quot; line of text that&#039;d dynamically appear with the images? Could I use jQuery for that, or would it be PHP, or some combination of the two? It seems like it&#039;d be simple enough, but I&#039;m having a tough time coming up with a good approach! Any ideas?

Thanks again for the helpful article!</description>
		<content:encoded><![CDATA[<p>Awesome post, this helped me out A LOT! We&#039;ve got a webcam here at the museum I work at that&#039;s capturing images of the Mississippi River every 15 minutes, and then it FTPs the JPGs onto our webserver. I used a slightly-modified version of this script to put together a page that illustrates the rising water as the river floods &#8211; the crossfade plugin is really, really nice!</p>
<p>Now I&#039;m trying to think of a way to show how the photos relate to each other sequentially so that if you catch part of the slideshow (it&#039;s playing on a kiosk here), you&#039;ll know where you&#039;re at in the series. </p>
<p>Can you think of a good way to implement something that would count the total number of images in the directory, then output where you&#039;re at as it rotates? Like an &#034;Image 3 of 32&#034; line of text that&#039;d dynamically appear with the images? Could I use jQuery for that, or would it be PHP, or some combination of the two? It seems like it&#039;d be simple enough, but I&#039;m having a tough time coming up with a good approach! Any ideas?</p>
<p>Thanks again for the helpful article!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin Dubois</title>
		<link>http://kevindubois.com/blog/2009/03/03/rotating-images-jquery-ajax/comment-page-1/#comment-441</link>
		<dc:creator>Kevin Dubois</dc:creator>
		<pubDate>Mon, 23 Nov 2009 21:56:11 +0000</pubDate>
		<guid isPermaLink="false">http://kevindubois.com/blog/?p=13#comment-441</guid>
		<description>You may need to give me more information but it sounds like you may need to set your variables in the php and/or the smarty template file.  Does that help?</description>
		<content:encoded><![CDATA[<p>You may need to give me more information but it sounds like you may need to set your variables in the php and/or the smarty template file.  Does that help?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: julia</title>
		<link>http://kevindubois.com/blog/2009/03/03/rotating-images-jquery-ajax/comment-page-1/#comment-440</link>
		<dc:creator>julia</dc:creator>
		<pubDate>Sat, 21 Nov 2009 19:56:03 +0000</pubDate>
		<guid isPermaLink="false">http://kevindubois.com/blog/?p=13#comment-440</guid>
		<description>Hi Kevin and thank you for this great script :)

i have some hard time with it. 
i&#039;m trying to use it in a CMS MS website. 

i did everything well (i thought), i think all my url are good.. 
but i have all those errors :

string(122) &quot;Smarty error: [in tpl_head:24 line 18]: syntax error: unrecognized tag: loadImage(); (Smarty_Compiler.class.php, line 446)&quot; string(111) &quot;Smarty error: [in tpl_head:24 line 18]: syntax error: unrecognized tag &#039;&#039; (Smarty_Compiler.class.php, line 590)&quot; string(436) &quot;Smarty error: [in tpl_head:24 line 20]: syntax error: unrecognized tag: // getimage.php is the php file that gets my images from the images folder $.post(&quot;getimage.php&quot;, function(data){ if(data.length &gt;0) { // evaluate the string to a group of objects myObject = eval(data); // create a slideshow with the image objects and drop them in the placeholder $(&#039;#imgcontainer&#039;).crossSlide({sleep:5,fade:2 (Smarty_Compiler.class.php, line 446)&quot; string(111) &quot;Smarty error: [in tpl_head:24 line 20]: syntax error: unrecognized tag &#039;&#039; (Smarty_Compiler.class.php, line 590)&quot;

a LOT right? if you have any idea where i can search to fix it. 
Thank you</description>
		<content:encoded><![CDATA[<p>Hi Kevin and thank you for this great script <img src='http://kevindubois.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>i have some hard time with it.<br />
i&#039;m trying to use it in a CMS MS website. </p>
<p>i did everything well (i thought), i think all my url are good..<br />
but i have all those errors :</p>
<p>string(122) &#034;Smarty error: [in tpl_head:24 line 18]: syntax error: unrecognized tag: loadImage(); (Smarty_Compiler.class.php, line 446)&#034; string(111) &#034;Smarty error: [in tpl_head:24 line 18]: syntax error: unrecognized tag &#034; (Smarty_Compiler.class.php, line 590)&#034; string(436) &#034;Smarty error: [in tpl_head:24 line 20]: syntax error: unrecognized tag: // getimage.php is the php file that gets my images from the images folder $.post(&#034;getimage.php&#034;, function(data){ if(data.length &gt;0) { // evaluate the string to a group of objects myObject = eval(data); // create a slideshow with the image objects and drop them in the placeholder $(&#039;#imgcontainer&#039;).crossSlide({sleep:5,fade:2 (Smarty_Compiler.class.php, line 446)&#034; string(111) &#034;Smarty error: [in tpl_head:24 line 20]: syntax error: unrecognized tag &#034; (Smarty_Compiler.class.php, line 590)&#034;</p>
<p>a LOT right? if you have any idea where i can search to fix it.<br />
Thank you</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin Dubois</title>
		<link>http://kevindubois.com/blog/2009/03/03/rotating-images-jquery-ajax/comment-page-1/#comment-436</link>
		<dc:creator>Kevin Dubois</dc:creator>
		<pubDate>Thu, 05 Nov 2009 17:49:13 +0000</pubDate>
		<guid isPermaLink="false">http://kevindubois.com/blog/?p=13#comment-436</guid>
		<description>Austin, resizing the images is kind of out of the scope of this article - you&#039;ll want to resize the images before you upload them to the folder.  As for filtering only image files out of the folder, you can modify the following line to look for only jpg, gif, png etc in the last 3 characters of the string: 
                if (!preg_match(&#039;/^\.+$/&#039;, $file) and preg_match(&#039;/\.(&#039;.$extensions.&#039;)$/&#039;, $file)){</description>
		<content:encoded><![CDATA[<p>Austin, resizing the images is kind of out of the scope of this article &#8211; you&#039;ll want to resize the images before you upload them to the folder.  As for filtering only image files out of the folder, you can modify the following line to look for only jpg, gif, png etc in the last 3 characters of the string:<br />
                if (!preg_match(&#039;/^\.+$/&#039;, $file) and preg_match(&#039;/\.(&#039;.$extensions.&#039;)$/&#039;, $file)){</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin Dubois</title>
		<link>http://kevindubois.com/blog/2009/03/03/rotating-images-jquery-ajax/comment-page-1/#comment-435</link>
		<dc:creator>Kevin Dubois</dc:creator>
		<pubDate>Thu, 05 Nov 2009 17:42:44 +0000</pubDate>
		<guid isPermaLink="false">http://kevindubois.com/blog/?p=13#comment-435</guid>
		<description>@Pingitzer: since we&#039;re returning a string of all image paths to ajax it would be hard to parse this.  Take a look at the other more advanced slideshow tutorial in my blog (link is at the top of this article), that will probably be more suited.</description>
		<content:encoded><![CDATA[<p>@Pingitzer: since we&#039;re returning a string of all image paths to ajax it would be hard to parse this.  Take a look at the other more advanced slideshow tutorial in my blog (link is at the top of this article), that will probably be more suited.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
