<?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: How to Auto Caption Images Using MooTools</title>
	<atom:link href="http://sixrevisions.com/tutorials/mootools-tutorials/how-to-auto-caption-images-using-mootools/feed/" rel="self" type="application/rss+xml" />
	<link>http://sixrevisions.com/tutorials/mootools-tutorials/how-to-auto-caption-images-using-mootools/</link>
	<description></description>
	<lastBuildDate>Sun, 20 May 2012 16:23:24 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
	<item>
		<title>By: Daniel North</title>
		<link>http://sixrevisions.com/tutorials/mootools-tutorials/how-to-auto-caption-images-using-mootools/#comment-69175</link>
		<dc:creator>Daniel North</dc:creator>
		<pubDate>Wed, 16 Jun 2010 13:27:06 +0000</pubDate>
		<guid isPermaLink="false">http://sixrevisions.com/?p=362#comment-69175</guid>
		<description>Hi, this is Daniel North.This post is really very appreciable.
your post is very advantageous for me and very good.If you need to add another class, you can double-declare the classes.If these were given classes and set to display:block through css then the generated code would stay valid.I’ve posted the code here. Great tutorial, Jacob, you inspired me to take it one step further!
================================== 
Daniel North</description>
		<content:encoded><![CDATA[<p>Hi, this is Daniel North.This post is really very appreciable.<br />
your post is very advantageous for me and very good.If you need to add another class, you can double-declare the classes.If these were given classes and set to display:block through css then the generated code would stay valid.I’ve posted the code here. Great tutorial, Jacob, you inspired me to take it one step further!<br />
==================================<br />
Daniel North</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel</title>
		<link>http://sixrevisions.com/tutorials/mootools-tutorials/how-to-auto-caption-images-using-mootools/#comment-29383</link>
		<dc:creator>Daniel</dc:creator>
		<pubDate>Mon, 02 Mar 2009 19:06:32 +0000</pubDate>
		<guid isPermaLink="false">http://sixrevisions.com/?p=362#comment-29383</guid>
		<description>Thanks! This was very helpful.</description>
		<content:encoded><![CDATA[<p>Thanks! This was very helpful.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jacob Gube</title>
		<link>http://sixrevisions.com/tutorials/mootools-tutorials/how-to-auto-caption-images-using-mootools/#comment-28286</link>
		<dc:creator>Jacob Gube</dc:creator>
		<pubDate>Sun, 08 Feb 2009 16:22:59 +0000</pubDate>
		<guid isPermaLink="false">http://sixrevisions.com/?p=362#comment-28286</guid>
		<description>&lt;strong&gt;@Dean Marshall: &lt;/strong&gt;I debated for a long time how to write this to keep it as semantic as possible; it still works even if the image is inside a &lt;code&gt;p&lt;/code&gt; tag, but it&#039;s not good markup because in the situation you mentioned, the &lt;code&gt;caption-text&lt;/code&gt; paragraph will sit inside another &lt;code&gt;p&lt;/code&gt; tag. I know because I also put images inside paragraphs when I write HTML.

One way to solve it, as you&#039;ve noted, is to replace &lt;code&gt;p&lt;/code&gt; with a span tag.

For people interested in substituting the markup used to generate the auto-captioning, it&#039;s easy enough - just tweak the &lt;code&gt;figure&lt;/code&gt; and &lt;code&gt;caption&lt;/code&gt; objects (change &#039;div&#039; and &#039;p&#039; to whatever element you&#039;d like to use):

&lt;pre&gt;
var figure = new Element(&#039;div&#039;, {
  &#039;class&#039; : &#039;figure&#039;,
  &#039;styles&#039; : {
    &#039;width&#039; : el.get(&#039;width&#039;).toInt() + 10
  }
});

var caption = new Element(&#039;p&#039;, {
  &#039;class&#039; : &#039;caption&#039;,
  &#039;html&#039; : captionText
});
&lt;/pre&gt;

Note that if you do that, you will also need to tweak the CSS style rules to reflect the changes you&#039;ve made. Hope that helps.</description>
		<content:encoded><![CDATA[<p><strong>@Dean Marshall: </strong>I debated for a long time how to write this to keep it as semantic as possible; it still works even if the image is inside a <code>p</code> tag, but it&#8217;s not good markup because in the situation you mentioned, the <code>caption-text</code> paragraph will sit inside another <code>p</code> tag. I know because I also put images inside paragraphs when I write HTML.</p>
<p>One way to solve it, as you&#8217;ve noted, is to replace <code>p</code> with a span tag.</p>
<p>For people interested in substituting the markup used to generate the auto-captioning, it&#8217;s easy enough &#8211; just tweak the <code>figure</code> and <code>caption</code> objects (change &#8216;div&#8217; and &#8216;p&#8217; to whatever element you&#8217;d like to use):</p>
<pre>
var figure = new Element('div', {
  'class' : 'figure',
  'styles' : {
    'width' : el.get('width').toInt() + 10
  }
});

var caption = new Element('p', {
  'class' : 'caption',
  'html' : captionText
});
</pre>
<p>Note that if you do that, you will also need to tweak the CSS style rules to reflect the changes you&#8217;ve made. Hope that helps.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dean Marshall</title>
		<link>http://sixrevisions.com/tutorials/mootools-tutorials/how-to-auto-caption-images-using-mootools/#comment-28233</link>
		<dc:creator>Dean Marshall</dc:creator>
		<pubDate>Sat, 07 Feb 2009 10:48:11 +0000</pubDate>
		<guid isPermaLink="false">http://sixrevisions.com/?p=362#comment-28233</guid>
		<description>What can be done about images that are already inside paragraphs. Auto wrapping these images inside divs that also contain paragraphs seems to add up to a heap of invalid html - p &gt; div &gt; p

Perhaps the DIV and P could/should be substituted with spans or some other inline element. If these were given classes and set to display:block through css then the generated code would stay valid.

Just my tuppence.</description>
		<content:encoded><![CDATA[<p>What can be done about images that are already inside paragraphs. Auto wrapping these images inside divs that also contain paragraphs seems to add up to a heap of invalid html &#8211; p &gt; div &gt; p</p>
<p>Perhaps the DIV and P could/should be substituted with spans or some other inline element. If these were given classes and set to display:block through css then the generated code would stay valid.</p>
<p>Just my tuppence.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jacob Gube</title>
		<link>http://sixrevisions.com/tutorials/mootools-tutorials/how-to-auto-caption-images-using-mootools/#comment-27691</link>
		<dc:creator>Jacob Gube</dc:creator>
		<pubDate>Tue, 27 Jan 2009 00:16:19 +0000</pubDate>
		<guid isPermaLink="false">http://sixrevisions.com/?p=362#comment-27691</guid>
		<description>&lt;strong&gt;@Tonamel: &lt;/strong&gt;AS2 and AS3 is similar to JS, especially with &lt;code&gt;this&lt;/code&gt;. Thanks for the feedback, I appreciate it. I&#039;m glad I cleared that up.

&lt;strong&gt;@Eddie: &lt;/strong&gt;Good question actually. If you need to add another class, you can double-declare the classes.

For example, say your class for floating left is &lt;code&gt;alignLeft&lt;/code&gt;. Your markup would then be
&lt;pre&gt;
  &lt;img class=&quot;captioned alignLeft&quot; /&gt;
&lt;/pre&gt;

Just separate the classes with spaces, this way you can assign multiple classes to a particular page object.

Let me know if this works or not. I&#039;m assuming your image would align to the left of the container div (&lt;code&gt;&lt;div class=&quot;figure&quot;&gt;&lt;/code&gt;) though.</description>
		<content:encoded><![CDATA[<p><strong>@Tonamel: </strong>AS2 and AS3 is similar to JS, especially with <code>this</code>. Thanks for the feedback, I appreciate it. I&#8217;m glad I cleared that up.</p>
<p><strong>@Eddie: </strong>Good question actually. If you need to add another class, you can double-declare the classes.</p>
<p>For example, say your class for floating left is <code>alignLeft</code>. Your markup would then be</p>
<pre>
  &lt;img class="captioned alignLeft" /&gt;
</pre>
<p>Just separate the classes with spaces, this way you can assign multiple classes to a particular page object.</p>
<p>Let me know if this works or not. I&#8217;m assuming your image would align to the left of the container div (<code>&lt;div class="figure"&gt;</code>) though.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eddie</title>
		<link>http://sixrevisions.com/tutorials/mootools-tutorials/how-to-auto-caption-images-using-mootools/#comment-27673</link>
		<dc:creator>Eddie</dc:creator>
		<pubDate>Mon, 26 Jan 2009 17:10:18 +0000</pubDate>
		<guid isPermaLink="false">http://sixrevisions.com/?p=362#comment-27673</guid>
		<description>Thanks for this great tutorial.

This might be a very stupid question: what if I need the img class for positioning the image?</description>
		<content:encoded><![CDATA[<p>Thanks for this great tutorial.</p>
<p>This might be a very stupid question: what if I need the img class for positioning the image?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tonamel</title>
		<link>http://sixrevisions.com/tutorials/mootools-tutorials/how-to-auto-caption-images-using-mootools/#comment-27543</link>
		<dc:creator>Tonamel</dc:creator>
		<pubDate>Sun, 25 Jan 2009 05:41:24 +0000</pubDate>
		<guid isPermaLink="false">http://sixrevisions.com/?p=362#comment-27543</guid>
		<description>Thanks, that totally cleared it up :)

It isn&#039;t necessarily that you phrased anything poorly, it&#039;s just that in my noviceness (in both js and mootools) I&#039;d never seen a function that had &quot;current element&quot; as an argument.

Just another hurdle to get over whilst learning the conventions of languages and frameworks. I had similar issues figuring out how event handling works in actionscript 3.</description>
		<content:encoded><![CDATA[<p>Thanks, that totally cleared it up :)</p>
<p>It isn&#8217;t necessarily that you phrased anything poorly, it&#8217;s just that in my noviceness (in both js and mootools) I&#8217;d never seen a function that had &#8220;current element&#8221; as an argument.</p>
<p>Just another hurdle to get over whilst learning the conventions of languages and frameworks. I had similar issues figuring out how event handling works in actionscript 3.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Wallace</title>
		<link>http://sixrevisions.com/tutorials/mootools-tutorials/how-to-auto-caption-images-using-mootools/#comment-27511</link>
		<dc:creator>Chris Wallace</dc:creator>
		<pubDate>Sat, 24 Jan 2009 16:00:15 +0000</pubDate>
		<guid isPermaLink="false">http://sixrevisions.com/?p=362#comment-27511</guid>
		<description>Yes, I AM a geek and it was only PART of what I did on a Friday night. My wife forced me to watch Apollo 13, so while she was crying about the astronaut&#039;s wives, I did more interesting things :)</description>
		<content:encoded><![CDATA[<p>Yes, I AM a geek and it was only PART of what I did on a Friday night. My wife forced me to watch Apollo 13, so while she was crying about the astronaut&#8217;s wives, I did more interesting things :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jacob Gube</title>
		<link>http://sixrevisions.com/tutorials/mootools-tutorials/how-to-auto-caption-images-using-mootools/#comment-27502</link>
		<dc:creator>Jacob Gube</dc:creator>
		<pubDate>Sat, 24 Jan 2009 13:37:06 +0000</pubDate>
		<guid isPermaLink="false">http://sixrevisions.com/?p=362#comment-27502</guid>
		<description>&lt;strong&gt;@Chris Wallace: &lt;/strong&gt;Chris, you geek - this is what you did on a Friday night? :) Thanks for this, and you tweaked the script to look cleaner too ( &lt;code&gt;if ( captionText )&lt;/code&gt;.

Suggestion (I should really post this on &lt;strong&gt;&lt;a href=&quot;http://www.chris-wallace.com/2009/01/23/expanding-on-how-to-auto-caption-images-using-mootools/&quot; rel=&quot;nofollow&quot;&gt;your blog&lt;/a&gt;&lt;/strong&gt;, but another option can be the margins. I didn&#039;t like how I set the div margins to be static at 5 pixels on each side.

I wasn&#039;t planning on releasing this as a plugin, but if enough people find use for this, Chris and I can work together to release a more robust auto-captioning plugin.</description>
		<content:encoded><![CDATA[<p><strong>@Chris Wallace: </strong>Chris, you geek &#8211; this is what you did on a Friday night? :) Thanks for this, and you tweaked the script to look cleaner too ( <code>if ( captionText )</code>.</p>
<p>Suggestion (I should really post this on <strong><a href="http://www.chris-wallace.com/2009/01/23/expanding-on-how-to-auto-caption-images-using-mootools/" rel="nofollow">your blog</a></strong>, but another option can be the margins. I didn&#8217;t like how I set the div margins to be static at 5 pixels on each side.</p>
<p>I wasn&#8217;t planning on releasing this as a plugin, but if enough people find use for this, Chris and I can work together to release a more robust auto-captioning plugin.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Wallace</title>
		<link>http://sixrevisions.com/tutorials/mootools-tutorials/how-to-auto-caption-images-using-mootools/#comment-27490</link>
		<dc:creator>Chris Wallace</dc:creator>
		<pubDate>Sat, 24 Jan 2009 04:36:32 +0000</pubDate>
		<guid isPermaLink="false">http://sixrevisions.com/?p=362#comment-27490</guid>
		<description>If anyone is interested in seeing this inside a class, I&#039;ve posted the code &lt;a href=&quot;http://www.chris-wallace.com/2009/01/23/expanding-on-how-to-auto-caption-images-using-mootools/&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;. Great tutorial, Jacob, you inspired me to take it one step further!</description>
		<content:encoded><![CDATA[<p>If anyone is interested in seeing this inside a class, I&#8217;ve posted the code <a href="http://www.chris-wallace.com/2009/01/23/expanding-on-how-to-auto-caption-images-using-mootools/" rel="nofollow">here</a>. Great tutorial, Jacob, you inspired me to take it one step further!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

