<?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"
	>
<channel>
	<title>Comments for Return True</title>
	<atom:link href="http://returntrue.natural-tys.com/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://returntrue.natural-tys.com</link>
	<description>Arrrgh! Code?!#@</description>
	<pubDate>Fri, 04 Jul 2008 05:55:01 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>Comment on PHP: How To Build A Tag Cloud by Veneficus Unus</title>
		<link>http://returntrue.natural-tys.com/2008/03/18/how-to-build-a-tag-cloud-using-php/#comment-1048</link>
		<dc:creator>Veneficus Unus</dc:creator>
		<pubDate>Thu, 03 Jul 2008 13:12:10 +0000</pubDate>
		<guid isPermaLink="false">http://returntrue.natural-tys.com/?p=21#comment-1048</guid>
		<description>This might work, first you need to add id to the query:
&lt;pre lang="php"&gt;
$query = $db-&gt;query("SELECT id, tag, COUNT( imagesrc.id ) AS quant FROM tags
                              LEFT JOIN taglink ON ( tags.id = taglink.tid )
                              LEFT JOIN imagesrc ON ( taglink.iid = imagesrc.id )
                              GROUP BY tag") or $db-&gt;raise_error();
&lt;/pre&gt;
Then we need to change the while loop to this:
&lt;pre lang="php"&gt;
while($row = $db-&gt;fetch_array($query)) :
  $tags[$row['tag']] = array('id' =&gt; $row['id'], 'quant' =&gt; $row['quant']);
endif;
&lt;/pre&gt;
Then we need to change the foreach loop to this:
&lt;pre lang="php"&gt;
 
foreach($tags as $key =&gt; $value) :
$size = $min_size + (($value['quant'] - $min_qty) * $step);
$red = $min_r + (($value['quant'] - $min_qty) * $step_r);
$green = $min_g + (($value['quant'] - $min_qty) * $step_g);
$blue = $min_b + (($value['quant'] - $min_qty) * $step_b);
 
$size = ceil($size);
$red = ceil($red);
$green = ceil($green);
$blue = ceil($blue);
 
echo '&lt;a href="#" style="font-size: '.$size.'; color: rgb('.$red.', '.$green.', '.$blue.');" title="'.strtolower($key).'" rel="nofollow"&gt;'.strtolower($key).'&lt;/a&gt; ';
// The space must be there to seperate tags. You could surround each one with a div and float them.
endforeach;
&lt;/pre&gt;

To echo out the id use &lt;code&gt;$value['id']&lt;/code&gt; at any point during the foreach loop.

Good luck. Just ask if you need any more help. ;)</description>
		<content:encoded><![CDATA[<p>This might work, first you need to add id to the query:</p>

<div class="wp_syntax"><div class="code"><pre class="php"><span style="color: #ff0000">$query</span> <span style="color: #66cc66;">=</span> <span style="color: #ff0000">$db</span><span style="color: #66cc66;">-&gt;</span><span style="color: #006600;">query</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;SELECT id, tag, COUNT( imagesrc.id ) AS quant FROM tags
                              LEFT JOIN taglink ON ( tags.id = taglink.tid )
                              LEFT JOIN imagesrc ON ( taglink.iid = imagesrc.id )
                              GROUP BY tag&quot;</span><span style="color: #66cc66;">&#41;</span> or <span style="color: #ff0000">$db</span><span style="color: #66cc66;">-&gt;</span><span style="color: #006600;">raise_error</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span></pre></div></div>

<p>Then we need to change the while loop to this:</p>

<div class="wp_syntax"><div class="code"><pre class="php"><span style="color: #b1b100;">while</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000">$row</span> <span style="color: #66cc66;">=</span> <span style="color: #ff0000">$db</span><span style="color: #66cc66;">-&gt;</span><span style="color: #006600;">fetch_array</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000">$query</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">:</span>
  <span style="color: #ff0000">$tags</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000">$row</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'tag'</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#93;</span> <span style="color: #66cc66;">=</span> <span style="color: #000066;">array</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'id'</span> <span style="color: #66cc66;">=&gt;</span> <span style="color: #ff0000">$row</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'id'</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'quant'</span> <span style="color: #66cc66;">=&gt;</span> <span style="color: #ff0000">$row</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'quant'</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span>
<span style="color: #b1b100;">endif</span><span style="color: #66cc66;">;</span></pre></div></div>

<p>Then we need to change the foreach loop to this:</p>

<div class="wp_syntax"><div class="code"><pre class="php">&nbsp;
<span style="color: #b1b100;">foreach</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000">$tags</span> <span style="color: #b1b100;">as</span> <span style="color: #ff0000">$key</span> <span style="color: #66cc66;">=&gt;</span> <span style="color: #ff0000">$value</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">:</span>
<span style="color: #ff0000">$size</span> <span style="color: #66cc66;">=</span> <span style="color: #ff0000">$min_size</span> <span style="color: #66cc66;">+</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000">$value</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'quant'</span><span style="color: #66cc66;">&#93;</span> <span style="color: #66cc66;">-</span> <span style="color: #ff0000">$min_qty</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">*</span> <span style="color: #ff0000">$step</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span>
<span style="color: #ff0000">$red</span> <span style="color: #66cc66;">=</span> <span style="color: #ff0000">$min_r</span> <span style="color: #66cc66;">+</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000">$value</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'quant'</span><span style="color: #66cc66;">&#93;</span> <span style="color: #66cc66;">-</span> <span style="color: #ff0000">$min_qty</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">*</span> <span style="color: #ff0000">$step_r</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span>
<span style="color: #ff0000">$green</span> <span style="color: #66cc66;">=</span> <span style="color: #ff0000">$min_g</span> <span style="color: #66cc66;">+</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000">$value</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'quant'</span><span style="color: #66cc66;">&#93;</span> <span style="color: #66cc66;">-</span> <span style="color: #ff0000">$min_qty</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">*</span> <span style="color: #ff0000">$step_g</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span>
<span style="color: #ff0000">$blue</span> <span style="color: #66cc66;">=</span> <span style="color: #ff0000">$min_b</span> <span style="color: #66cc66;">+</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000">$value</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'quant'</span><span style="color: #66cc66;">&#93;</span> <span style="color: #66cc66;">-</span> <span style="color: #ff0000">$min_qty</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">*</span> <span style="color: #ff0000">$step_b</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span>
&nbsp;
<span style="color: #ff0000">$size</span> <span style="color: #66cc66;">=</span> <span style="color: #000066;">ceil</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000">$size</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span>
<span style="color: #ff0000">$red</span> <span style="color: #66cc66;">=</span> <span style="color: #000066;">ceil</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000">$red</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span>
<span style="color: #ff0000">$green</span> <span style="color: #66cc66;">=</span> <span style="color: #000066;">ceil</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000">$green</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span>
<span style="color: #ff0000">$blue</span> <span style="color: #66cc66;">=</span> <span style="color: #000066;">ceil</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000">$blue</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span>
&nbsp;
<span style="color: #000066;">echo</span> <span style="color: #ff0000;">'&lt;a href=&quot;#&quot; style=&quot;font-size: '</span><span style="color: #66cc66;">.</span><span style="color: #ff0000">$size</span><span style="color: #66cc66;">.</span><span style="color: #ff0000;">'; color: rgb('</span><span style="color: #66cc66;">.</span><span style="color: #ff0000">$red</span><span style="color: #66cc66;">.</span><span style="color: #ff0000;">', '</span><span style="color: #66cc66;">.</span><span style="color: #ff0000">$green</span><span style="color: #66cc66;">.</span><span style="color: #ff0000;">', '</span><span style="color: #66cc66;">.</span><span style="color: #ff0000">$blue</span><span style="color: #66cc66;">.</span><span style="color: #ff0000;">');&quot; title=&quot;'</span><span style="color: #66cc66;">.</span><span style="color: #000066;">strtolower</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000">$key</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">.</span><span style="color: #ff0000;">'&quot; rel=&quot;nofollow&quot;&gt;'</span><span style="color: #66cc66;">.</span><span style="color: #000066;">strtolower</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000">$key</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">.</span><span style="color: #ff0000;">'&lt;/a&gt; '</span><span style="color: #66cc66;">;</span>
<span style="color: #808080; font-style: italic;">// The space must be there to seperate tags. You could surround each one with a div and float them.</span>
<span style="color: #b1b100;">endforeach</span><span style="color: #66cc66;">;</span></pre></div></div>

<p>To echo out the id use <code>$value['id']</code> at any point during the foreach loop.</p>
<p>Good luck. Just ask if you need any more help. <img src='http://returntrue.natural-tys.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Making A Custom Feedburner Subscriber Counter by Veneficus Unus</title>
		<link>http://returntrue.natural-tys.com/2008/06/20/making-a-custom-feedburner-subscriber-counter/#comment-1037</link>
		<dc:creator>Veneficus Unus</dc:creator>
		<pubDate>Thu, 03 Jul 2008 11:21:11 +0000</pubDate>
		<guid isPermaLink="false">http://returntrue.natural-tys.com/?p=151#comment-1037</guid>
		<description>Something I forgot to mention in the tutorial was that you need the FreeType library along with your GD installation.

To see if you have FreeType just run &lt;code&gt;phpinfo()&lt;/code&gt; on a blank php file and look for FreeType.

If it's not there then sorry. You could ty to use the one on Marcofolio.net as I don't think that one requires FreeType.

If you do have FreeType then I always find it helps to look at stupid things first. Like is the path to your PNG background image correct, so for instance does it load if you link directly to the image instead of the php file.

Is the file a valid PNG, I once had a problem with GD loading an image because it thought the file was corrupt?

Finally is the path to the ttf file correct. No way to check this one really just check it over again and again.

I hope one of those fixes your problem. I'd be suprised if you don't have both GD &#038; FreeType though as they have been relatively common on the servers I have used.

Good luck. Feel free to ask again if you're still having the problem. ;)</description>
		<content:encoded><![CDATA[<p>Something I forgot to mention in the tutorial was that you need the FreeType library along with your GD installation.</p>
<p>To see if you have FreeType just run <code>phpinfo()</code> on a blank php file and look for FreeType.</p>
<p>If it&#8217;s not there then sorry. You could ty to use the one on Marcofolio.net as I don&#8217;t think that one requires FreeType.</p>
<p>If you do have FreeType then I always find it helps to look at stupid things first. Like is the path to your PNG background image correct, so for instance does it load if you link directly to the image instead of the php file.</p>
<p>Is the file a valid PNG, I once had a problem with GD loading an image because it thought the file was corrupt?</p>
<p>Finally is the path to the ttf file correct. No way to check this one really just check it over again and again.</p>
<p>I hope one of those fixes your problem. I&#8217;d be suprised if you don&#8217;t have both GD &#038; FreeType though as they have been relatively common on the servers I have used.</p>
<p>Good luck. Feel free to ask again if you&#8217;re still having the problem. <img src='http://returntrue.natural-tys.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Add, Edit, Delete &#038; Sorting Table Version 2 - TIAMOT by Veneficus Unus</title>
		<link>http://returntrue.natural-tys.com/2008/05/21/add-edit-delete-sorting-table-version-2-tiamot/#comment-1035</link>
		<dc:creator>Veneficus Unus</dc:creator>
		<pubDate>Thu, 03 Jul 2008 11:12:02 +0000</pubDate>
		<guid isPermaLink="false">http://returntrue.natural-tys.com/?p=95#comment-1035</guid>
		<description>Well, without thinking about it properly I'm not sure (Sorry, got a huge amount of stuff to do).

However my best guess is that you would need to have another ajax function something like &lt;code&gt;ajaxAddPreview()&lt;/code&gt; which calls over to the php file again and runs another action. It's pretty much exactly the same as how you added in the creation of the preview.

Although now I think about it, if you just want to add it to the main tiamot table then my &lt;code&gt;ajaxAdd()&lt;/code&gt; is already built to do that. All you would need to do is call ajaxAdd from a button on the preview table and pass the id of the row you want to add... I think that should work.

I hope that helps. I'll take a more detailed look a bit later when I'm not so busy. I just thought you'd prefer a quick answer now rather than none until later. ;)</description>
		<content:encoded><![CDATA[<p>Well, without thinking about it properly I&#8217;m not sure (Sorry, got a huge amount of stuff to do).</p>
<p>However my best guess is that you would need to have another ajax function something like <code>ajaxAddPreview()</code> which calls over to the php file again and runs another action. It&#8217;s pretty much exactly the same as how you added in the creation of the preview.</p>
<p>Although now I think about it, if you just want to add it to the main tiamot table then my <code>ajaxAdd()</code> is already built to do that. All you would need to do is call ajaxAdd from a button on the preview table and pass the id of the row you want to add&#8230; I think that should work.</p>
<p>I hope that helps. I&#8217;ll take a more detailed look a bit later when I&#8217;m not so busy. I just thought you&#8217;d prefer a quick answer now rather than none until later. <img src='http://returntrue.natural-tys.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on PHP: How To Build A Tag Cloud by Souljacker</title>
		<link>http://returntrue.natural-tys.com/2008/03/18/how-to-build-a-tag-cloud-using-php/#comment-1016</link>
		<dc:creator>Souljacker</dc:creator>
		<pubDate>Thu, 03 Jul 2008 07:46:25 +0000</pubDate>
		<guid isPermaLink="false">http://returntrue.natural-tys.com/?p=21#comment-1016</guid>
		<description>How can I get each tag's id so I can put it in the tag link?</description>
		<content:encoded><![CDATA[<p>How can I get each tag&#8217;s id so I can put it in the tag link?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Making A Custom Feedburner Subscriber Counter by Joseph</title>
		<link>http://returntrue.natural-tys.com/2008/06/20/making-a-custom-feedburner-subscriber-counter/#comment-991</link>
		<dc:creator>Joseph</dc:creator>
		<pubDate>Thu, 03 Jul 2008 03:23:32 +0000</pubDate>
		<guid isPermaLink="false">http://returntrue.natural-tys.com/?p=151#comment-991</guid>
		<description>Hi there.  I saw the same tutorial on Marcofolio.net and have tried the same thing using TTF files like you have suggested.  But whichever way I try it, the image refuses to display.  

Basically, the source code of my site header shows the img tag pointing to the php file...which is basically the same as yours with exception of the changes to the feedburner url and the font which I've uploaded and pointed to.

Any suggestions? :)</description>
		<content:encoded><![CDATA[<p>Hi there.  I saw the same tutorial on Marcofolio.net and have tried the same thing using TTF files like you have suggested.  But whichever way I try it, the image refuses to display.  </p>
<p>Basically, the source code of my site header shows the img tag pointing to the php file&#8230;which is basically the same as yours with exception of the changes to the feedburner url and the font which I&#8217;ve uploaded and pointed to.</p>
<p>Any suggestions? <img src='http://returntrue.natural-tys.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Add, Edit, Delete &#038; Sorting Table Version 2 - TIAMOT by Anthony</title>
		<link>http://returntrue.natural-tys.com/2008/05/21/add-edit-delete-sorting-table-version-2-tiamot/#comment-979</link>
		<dc:creator>Anthony</dc:creator>
		<pubDate>Thu, 03 Jul 2008 01:22:10 +0000</pubDate>
		<guid isPermaLink="false">http://returntrue.natural-tys.com/?p=95#comment-979</guid>
		<description>Well I've run into another issue.  I am attempting to send the updated data from the 'preview' to the main tiamot table.

Do I need to create another function and call it from ajaxPreview()?  Or can I use an existing.  I attempted to use the createTable() but it did not work.

Thanks again... i think this is almost over(Thank God)</description>
		<content:encoded><![CDATA[<p>Well I&#8217;ve run into another issue.  I am attempting to send the updated data from the &#8216;preview&#8217; to the main tiamot table.</p>
<p>Do I need to create another function and call it from ajaxPreview()?  Or can I use an existing.  I attempted to use the createTable() but it did not work.</p>
<p>Thanks again&#8230; i think this is almost over(Thank God)</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Preloading An Image &#038; Displaying With A Automatic Resizing Container With jQuery by Veneficus Unus</title>
		<link>http://returntrue.natural-tys.com/2008/06/12/preloading-an-image-displaying-with-a-automatic-resizing-container-with-jquery/#comment-959</link>
		<dc:creator>Veneficus Unus</dc:creator>
		<pubDate>Tue, 01 Jul 2008 19:48:43 +0000</pubDate>
		<guid isPermaLink="false">http://returntrue.natural-tys.com/?p=114#comment-959</guid>
		<description>Nope fraid not. It is caused by the fact that the fadeOut command in jQuery is an unqueueable command.

jQuery's animation queue does not queue the fadeOut and fadeIn commands. For example:

&lt;pre lang="javascript"&gt;
$('#animateit').animate({'top': 200}, 1000);
$('#animateit').fadeOut('fast');
&lt;/pre&gt;

When ran you would think that it would move the div animateit 200px from the top and then fadeOut fast. Unfortunately not, because fadeOut is unqueueable animate will start to run but it will immediately fade out before that animation finishes.

The reason you never see the loader depends on your internet connection speed and the size of the images you're using. If they are small and you have a high speed connection the image will have loaded near to instantly so there is no need to show the loader. Plus I have tested it on extremely large images (jpegs of 4000 x 4000px) in IETester and I see the loader fine.

There could be another reason the loader gif doesn't show which is the fact it is the class that shows it is removed after the first image is loaded. To show the loader again you need to reattach the .loading class again on the click event that loads the next picture. For example:

&lt;pre lang="javascript"&gt;
$("div.controls a.next").click(function() {
                $('#loader').addClass('loading');
		if (picPosition  0) {
			picPosition--;
			preloadImage(picsArray[picPosition]);
		}
		return false;
});
&lt;/pre&gt;

That will then show the loading class, which shows the loader, again each time a new image is shown until the preload is complete and then the preload function removes the class again as the image is finished loading.

I hope that makes sense. The fadeOut problem should only occur if the next image loads quick enough for it to interupt the previous image. There isn't really anyway to stop that problem though. Although you could try swapping the two fades. That's the fadeIn in the preloadImage function and the fadeOut your using with this &lt;code&gt;animate({'opacity': 1}, 500)&lt;/code&gt; for fadeIn and change 1 to 0 for fadeOut.

I hope that helps you some more. Just shout if you have any more questions.

&lt;strong&gt;EDIT:&lt;/strong&gt; Here is a better example of the need to put back the .loading class. This is the code that loads the new image when a thumbnail is clicked on my example:

&lt;pre lang="javascript"&gt;
function changeImage(a) {
	img = $(a).children();
	imgThmb = img.attr('src');
	imgPath = imgThmb.replace(/-\d+x\d+/gi, '');
	$('.fullSizeImage').fadeOut();
	$('#loader').addClass('loading'); // The line required...
	preloadImage(imgPath);
}
&lt;/pre&gt;

As you can see each time a new image is loaded the loading class is added back to the loader div. preloadImage holds the other part which removes the loader before fading the image in.</description>
		<content:encoded><![CDATA[<p>Nope fraid not. It is caused by the fact that the fadeOut command in jQuery is an unqueueable command.</p>
<p>jQuery&#8217;s animation queue does not queue the fadeOut and fadeIn commands. For example:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript">$<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'#animateit'</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">animate</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#123;</span><span style="color: #3366CC;">'top'</span>: <span style="color: #CC0000;">200</span><span style="color: #66cc66;">&#125;</span>, <span style="color: #CC0000;">1000</span><span style="color: #66cc66;">&#41;</span>;
$<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'#animateit'</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">fadeOut</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'fast'</span><span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p>When ran you would think that it would move the div animateit 200px from the top and then fadeOut fast. Unfortunately not, because fadeOut is unqueueable animate will start to run but it will immediately fade out before that animation finishes.</p>
<p>The reason you never see the loader depends on your internet connection speed and the size of the images you&#8217;re using. If they are small and you have a high speed connection the image will have loaded near to instantly so there is no need to show the loader. Plus I have tested it on extremely large images (jpegs of 4000 x 4000px) in IETester and I see the loader fine.</p>
<p>There could be another reason the loader gif doesn&#8217;t show which is the fact it is the class that shows it is removed after the first image is loaded. To show the loader again you need to reattach the .loading class again on the click event that loads the next picture. For example:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript">$<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&quot;div.controls a.next&quot;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">click</span><span style="color: #66cc66;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
                $<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'#loader'</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">addClass</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'loading'</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #66cc66;">&#40;</span>picPosition  <span style="color: #CC0000;">0</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
			picPosition--;
			preloadImage<span style="color: #66cc66;">&#40;</span>picsArray<span style="color: #66cc66;">&#91;</span>picPosition<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
		<span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span>;
<span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p>That will then show the loading class, which shows the loader, again each time a new image is shown until the preload is complete and then the preload function removes the class again as the image is finished loading.</p>
<p>I hope that makes sense. The fadeOut problem should only occur if the next image loads quick enough for it to interupt the previous image. There isn&#8217;t really anyway to stop that problem though. Although you could try swapping the two fades. That&#8217;s the fadeIn in the preloadImage function and the fadeOut your using with this <code>animate({'opacity': 1}, 500)</code> for fadeIn and change 1 to 0 for fadeOut.</p>
<p>I hope that helps you some more. Just shout if you have any more questions.</p>
<p><strong>EDIT:</strong> Here is a better example of the need to put back the .loading class. This is the code that loads the new image when a thumbnail is clicked on my example:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript"><span style="color: #003366; font-weight: bold;">function</span> changeImage<span style="color: #66cc66;">&#40;</span>a<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
	img = $<span style="color: #66cc66;">&#40;</span>a<span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">children</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
	imgThmb = img.<span style="color: #006600;">attr</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'src'</span><span style="color: #66cc66;">&#41;</span>;
	imgPath = imgThmb.<span style="color: #006600;">replace</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066FF;">/-\d+x\d+/gi</span>, <span style="color: #3366CC;">''</span><span style="color: #66cc66;">&#41;</span>;
	$<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'.fullSizeImage'</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">fadeOut</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
	$<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'#loader'</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">addClass</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'loading'</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #009900; font-style: italic;">// The line required...</span>
	preloadImage<span style="color: #66cc66;">&#40;</span>imgPath<span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>As you can see each time a new image is loaded the loading class is added back to the loader div. preloadImage holds the other part which removes the loader before fading the image in.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Add, Edit, Delete &#038; Sorting Table Version 2 - TIAMOT by Veneficus Unus</title>
		<link>http://returntrue.natural-tys.com/2008/05/21/add-edit-delete-sorting-table-version-2-tiamot/#comment-958</link>
		<dc:creator>Veneficus Unus</dc:creator>
		<pubDate>Tue, 01 Jul 2008 19:29:22 +0000</pubDate>
		<guid isPermaLink="false">http://returntrue.natural-tys.com/?p=95#comment-958</guid>
		<description>Well you would need to make sure that it references the relevent field name and id around the element that you want to edit plus the class edit. So it would look have to look something like this:

&lt;pre lang="html"&gt;
&lt;div class="edit" id="field_name id"&gt;content&lt;/div&gt;
&lt;/pre&gt;

It would have to be done Inside your &lt;code&gt;createPreview()&lt;/code&gt; function as the &lt;code&gt;createTable()&lt;/code&gt; function does the same for TIAMOT when a field is added. It would probably be something like:

&lt;pre lang="php"&gt;
$o .= '&lt;div id="'.$key.'" "'.$id.'" class="edit"&gt;'.$row.'"&lt;/div&gt;';
&lt;/pre&gt;

The code in the php file needs the field name which is held in the key and the id which is held in id.

You will also need to call the javascript function &lt;code&gt;init()&lt;/code&gt; after the adding of your preview table or the edit function won't know to make it editable.

Add it to just above the &lt;code&gt;setTimeout()&lt;/code&gt; in your &lt;code&gt;ajaxPreview()&lt;/code&gt; function but only inside the &lt;code&gt;if(msg.indexOf(\"false\") == -1)&lt;/code&gt; of the if.

I hope that makes sense. ;)</description>
		<content:encoded><![CDATA[<p>Well you would need to make sure that it references the relevent field name and id around the element that you want to edit plus the class edit. So it would look have to look something like this:</p>

<div class="wp_syntax"><div class="code"><pre>&lt;div class=&quot;edit&quot; id=&quot;field_name id&quot;&gt;content&lt;/div&gt;</pre></div></div>

<p>It would have to be done Inside your <code>createPreview()</code> function as the <code>createTable()</code> function does the same for TIAMOT when a field is added. It would probably be something like:</p>

<div class="wp_syntax"><div class="code"><pre class="php"><span style="color: #ff0000">$o</span> <span style="color: #66cc66;">.=</span> <span style="color: #ff0000;">'&lt;div id=&quot;'</span><span style="color: #66cc66;">.</span><span style="color: #ff0000">$key</span><span style="color: #66cc66;">.</span><span style="color: #ff0000;">'&quot; &quot;'</span><span style="color: #66cc66;">.</span><span style="color: #ff0000">$id</span><span style="color: #66cc66;">.</span><span style="color: #ff0000;">'&quot; class=&quot;edit&quot;&gt;'</span><span style="color: #66cc66;">.</span><span style="color: #ff0000">$row</span><span style="color: #66cc66;">.</span><span style="color: #ff0000;">'&quot;&lt;/div&gt;'</span><span style="color: #66cc66;">;</span></pre></div></div>

<p>The code in the php file needs the field name which is held in the key and the id which is held in id.</p>
<p>You will also need to call the javascript function <code>init()</code> after the adding of your preview table or the edit function won&#8217;t know to make it editable.</p>
<p>Add it to just above the <code>setTimeout()</code> in your <code>ajaxPreview()</code> function but only inside the <code>if(msg.indexOf(\"false\") == -1)</code> of the if.</p>
<p>I hope that makes sense. <img src='http://returntrue.natural-tys.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Preloading An Image &#038; Displaying With A Automatic Resizing Container With jQuery by Nat Ring</title>
		<link>http://returntrue.natural-tys.com/2008/06/12/preloading-an-image-displaying-with-a-automatic-resizing-container-with-jquery/#comment-957</link>
		<dc:creator>Nat Ring</dc:creator>
		<pubDate>Tue, 01 Jul 2008 16:09:32 +0000</pubDate>
		<guid isPermaLink="false">http://returntrue.natural-tys.com/?p=114#comment-957</guid>
		<description>Awesome, those fixes worked. Thanks Paul!

And I believe that Peter is onto something. When I go back in my array of pictures, the old picture does not fade out. It disappears immediately and the new one fades in. And the .loading class is never loaded either - so the Ajax loader .gif never displays. I haven't had too much time to investigate it, but I think it may have to do with loading the image from the cache.</description>
		<content:encoded><![CDATA[<p>Awesome, those fixes worked. Thanks Paul!</p>
<p>And I believe that Peter is onto something. When I go back in my array of pictures, the old picture does not fade out. It disappears immediately and the new one fades in. And the .loading class is never loaded either - so the Ajax loader .gif never displays. I haven&#8217;t had too much time to investigate it, but I think it may have to do with loading the image from the cache.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Add, Edit, Delete &#038; Sorting Table Version 2 - TIAMOT by Anthony</title>
		<link>http://returntrue.natural-tys.com/2008/05/21/add-edit-delete-sorting-table-version-2-tiamot/#comment-956</link>
		<dc:creator>Anthony</dc:creator>
		<pubDate>Tue, 01 Jul 2008 12:04:06 +0000</pubDate>
		<guid isPermaLink="false">http://returntrue.natural-tys.com/?p=95#comment-956</guid>
		<description>This is what I ended up with.
&lt;pre lang="php"&gt;
	function createPreview($rows, $id) {
		global $field_list, $edit_list;
		$o .= "";
		$o .= '';
		foreach($rows as $key =&#62; $row) {
			if(!in_array($key, $field_list)) {
				continue;
			} else {
				if(in_array($key, $edit_list)) {
					if($key == "promo_title") {
    					$o .= ''.$row.'';
  					}elseif($key == "promo_desc") {
    					$o .= ''.$row.'';
  					}
				}
			}
		}
		$o .= '';
		return $o;
	}
&lt;/pre&gt;
when i inspect the elements with fireBug, I see that the ID and class is consistent with that of a cell in Tiamot table, the only difference is that intiamot table there is a title attribute that I am assuming is dynamically inserted based ont he class="edit"

The only other difference here is that this table gets inserted into a div called "preview"....

It looks as if it should work, the cursor changes on hover and etc., but it does not allow for edit.  So all the attributes are there just no go.

Can you provide some suggestions?</description>
		<content:encoded><![CDATA[<p>This is what I ended up with.</p>

<div class="wp_syntax"><div class="code"><pre class="php">	<span style="color: #000000; font-weight: bold;">function</span> createPreview<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000">$rows</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000">$id</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
		<span style="color: #000066;">global</span> <span style="color: #ff0000">$field_list</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000">$edit_list</span><span style="color: #66cc66;">;</span>
		<span style="color: #ff0000">$o</span> <span style="color: #66cc66;">.=</span> <span style="color: #ff0000;">&quot;&quot;</span><span style="color: #66cc66;">;</span>
		<span style="color: #ff0000">$o</span> <span style="color: #66cc66;">.=</span> <span style="color: #ff0000;">''</span><span style="color: #66cc66;">;</span>
		<span style="color: #b1b100;">foreach</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000">$rows</span> <span style="color: #b1b100;">as</span> <span style="color: #ff0000">$key</span> <span style="color: #66cc66;">=&amp;</span>gt<span style="color: #66cc66;">;</span> <span style="color: #ff0000">$row</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
			<span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">!</span><span style="color: #000066;">in_array</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000">$key</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000">$field_list</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
				<span style="color: #b1b100;">continue</span><span style="color: #66cc66;">;</span>
			<span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #66cc66;">&#123;</span>
				<span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span><span style="color: #000066;">in_array</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000">$key</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000">$edit_list</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
					<span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000">$key</span> <span style="color: #66cc66;">==</span> <span style="color: #ff0000;">&quot;promo_title&quot;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
    					<span style="color: #ff0000">$o</span> <span style="color: #66cc66;">.=</span> <span style="color: #ff0000;">''</span><span style="color: #66cc66;">.</span><span style="color: #ff0000">$row</span><span style="color: #66cc66;">.</span><span style="color: #ff0000;">''</span><span style="color: #66cc66;">;</span>
  					<span style="color: #66cc66;">&#125;</span><span style="color: #b1b100;">elseif</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000">$key</span> <span style="color: #66cc66;">==</span> <span style="color: #ff0000;">&quot;promo_desc&quot;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
    					<span style="color: #ff0000">$o</span> <span style="color: #66cc66;">.=</span> <span style="color: #ff0000;">''</span><span style="color: #66cc66;">.</span><span style="color: #ff0000">$row</span><span style="color: #66cc66;">.</span><span style="color: #ff0000;">''</span><span style="color: #66cc66;">;</span>
  					<span style="color: #66cc66;">&#125;</span>
				<span style="color: #66cc66;">&#125;</span>
			<span style="color: #66cc66;">&#125;</span>
		<span style="color: #66cc66;">&#125;</span>
		<span style="color: #ff0000">$o</span> <span style="color: #66cc66;">.=</span> <span style="color: #ff0000;">''</span><span style="color: #66cc66;">;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #ff0000">$o</span><span style="color: #66cc66;">;</span>
	<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>when i inspect the elements with fireBug, I see that the ID and class is consistent with that of a cell in Tiamot table, the only difference is that intiamot table there is a title attribute that I am assuming is dynamically inserted based ont he class=&#8221;edit&#8221;</p>
<p>The only other difference here is that this table gets inserted into a div called &#8220;preview&#8221;&#8230;.</p>
<p>It looks as if it should work, the cursor changes on hover and etc., but it does not allow for edit.  So all the attributes are there just no go.</p>
<p>Can you provide some suggestions?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
