<?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 on: Wordpress AdSense Injection - Random Google Ads on Your Blog</title>
	<atom:link href="http://www.fieldguidetoprogrammers.com/wordpress/wordpress-adsense-injection-random-google-ads-on-your-blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.fieldguidetoprogrammers.com/wordpress/wordpress-adsense-injection-random-google-ads-on-your-blog/</link>
	<description>Code, Toys, Bits of Odd Fluff</description>
	<pubDate>Tue, 06 Jan 2009 23:49:00 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
		<item>
		<title>By: Google Ad Wrap Plug-in - Telling Google about Relevant Content &#124; Field Guide to Programmers</title>
		<link>http://www.fieldguidetoprogrammers.com/wordpress/wordpress-adsense-injection-random-google-ads-on-your-blog/#comment-120</link>
		<dc:creator>Google Ad Wrap Plug-in - Telling Google about Relevant Content &#124; Field Guide to Programmers</dc:creator>
		<pubDate>Sat, 16 Feb 2008 01:25:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.fieldguidetoprogrammers.com/blog/wordpress/wordpress-adsense-injection-random-google-ads-on-your-blog/#comment-120</guid>
		<description>[...] back I wrote about Dax Herrera's Google AdSense plug-in for Wordpress. I happened to be out trolling the treasure troves of plug-ins for a different site when I came [...]</description>
		<content:encoded><![CDATA[<p>[...] back I wrote about Dax Herrera&#8217;s Google AdSense plug-in for Wordpress. I happened to be out trolling the treasure troves of plug-ins for a different site when I came [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: piligrim</title>
		<link>http://www.fieldguidetoprogrammers.com/wordpress/wordpress-adsense-injection-random-google-ads-on-your-blog/#comment-63</link>
		<dc:creator>piligrim</dc:creator>
		<pubDate>Sun, 09 Dec 2007 20:11:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.fieldguidetoprogrammers.com/blog/wordpress/wordpress-adsense-injection-random-google-ads-on-your-blog/#comment-63</guid>
		<description>Could not paste the code into the previous post, here is the style string for first two DIVs:

float: left; margin-right: 10px;

float: right; margin-left: 10px;</description>
		<content:encoded><![CDATA[<p>Could not paste the code into the previous post, here is the style string for first two DIVs:</p>
<p>float: left; margin-right: 10px;</p>
<p>float: right; margin-left: 10px;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: piligrim</title>
		<link>http://www.fieldguidetoprogrammers.com/wordpress/wordpress-adsense-injection-random-google-ads-on-your-blog/#comment-62</link>
		<dc:creator>piligrim</dc:creator>
		<pubDate>Sun, 09 Dec 2007 20:10:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.fieldguidetoprogrammers.com/blog/wordpress/wordpress-adsense-injection-random-google-ads-on-your-blog/#comment-62</guid>
		<description>I modified the margin code a little bit, so the margin is only applied on one side of the banner, like this:

function ai_pickalign($tag){
  if($tag == "left")
    return '';
  if($tag == "right")
    return '';
  if($tag == "center")
    return '';
  else
    return ai_pickalign(rand(0,10)</description>
		<content:encoded><![CDATA[<p>I modified the margin code a little bit, so the margin is only applied on one side of the banner, like this:</p>
<p>function ai_pickalign($tag){<br />
  if($tag == &#8220;left&#8221;)<br />
    return &#8221;;<br />
  if($tag == &#8220;right&#8221;)<br />
    return &#8221;;<br />
  if($tag == &#8220;center&#8221;)<br />
    return &#8221;;<br />
  else<br />
    return ai_pickalign(rand(0,10)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jamiegrove</title>
		<link>http://www.fieldguidetoprogrammers.com/wordpress/wordpress-adsense-injection-random-google-ads-on-your-blog/#comment-45</link>
		<dc:creator>jamiegrove</dc:creator>
		<pubDate>Sun, 04 Nov 2007 21:34:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.fieldguidetoprogrammers.com/blog/wordpress/wordpress-adsense-injection-random-google-ads-on-your-blog/#comment-45</guid>
		<description>No problem.  You just need to modify the function ai_pickalign.  Below is the code I modified.  I believe this function begins around line 295.

The default version has floats but no margin or padding.  I added a margin in specifically, but you could easily assign a style class instead and tweak it through your main stylesheet.
&lt;pre&gt;
function ai_pickalign($tag){
  if($tag == "left")
    return '&#60;div style="float: left;&lt;span style="color:red"&gt;margin:5px;&lt;/span&gt;"&#62;';
  if($tag == "right")
    return '&#60;div style="float: right;&lt;span style="color:red"&gt;margin:5px;&lt;/span&gt;"&#62;';
  if($tag == "center")
    return '&#60;div style="text-align: center;&lt;span style="color:red"&gt;margin:5px;&lt;/span&gt;"&#62;';
  else
    return ai_pickalign(rand(0,10)&#60;5?"left":"right");
}
&lt;/pre&gt;
</description>
		<content:encoded><![CDATA[<p>No problem.  You just need to modify the function ai_pickalign.  Below is the code I modified.  I believe this function begins around line 295.</p>
<p>The default version has floats but no margin or padding.  I added a margin in specifically, but you could easily assign a style class instead and tweak it through your main stylesheet.</p>
<pre>
function ai_pickalign($tag){
  if($tag == "left")
    return '&lt;div style="float: left;<span style="color:red">margin:5px;</span>"&gt;';
  if($tag == "right")
    return '&lt;div style="float: right;<span style="color:red">margin:5px;</span>"&gt;';
  if($tag == "center")
    return '&lt;div style="text-align: center;<span style="color:red">margin:5px;</span>"&gt;';
  else
    return ai_pickalign(rand(0,10)&lt;5?"left":"right");
}
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Randy</title>
		<link>http://www.fieldguidetoprogrammers.com/wordpress/wordpress-adsense-injection-random-google-ads-on-your-blog/#comment-44</link>
		<dc:creator>Randy</dc:creator>
		<pubDate>Sun, 04 Nov 2007 15:35:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.fieldguidetoprogrammers.com/blog/wordpress/wordpress-adsense-injection-random-google-ads-on-your-blog/#comment-44</guid>
		<description>Jamie

I read that you where able to pad your ads in the plugin, so that the ads didn't touch blog text. Is it possible to get a copy of the Adsense Injection with your improvement?

Thanks,
Randy</description>
		<content:encoded><![CDATA[<p>Jamie</p>
<p>I read that you where able to pad your ads in the plugin, so that the ads didn&#8217;t touch blog text. Is it possible to get a copy of the Adsense Injection with your improvement?</p>
<p>Thanks,<br />
Randy</p>
]]></content:encoded>
	</item>
</channel>
</rss>
