Here's what I managed to get working. I based it on another solution (I forget what - it was a while ago).<br><br>Insert the following at the bottom of local/config.php<br><br>Markup('AdSenseVBanner', 'directives', '/\\(:AdSenseVBanner:\\)/e',"Keep(\"
<br><script type='text/javascript'><!--<br>google_ad_client = 'pub-1234567890123456';<br>google_ad_width = 120;<br>google_ad_height = 240;<br>google_ad_format = '120x240_as';<br>google_ad_type = 'text';<br>google_ad_channel ='9999999999';
<br>google_color_border = 'CCCCCC';<br>google_color_bg = 'FFFFFF';<br>google_color_link = '000000';<br>google_color_url = '666666';<br>google_color_text = '333333';<br>//--></script><br><script type='text/javascript'
<br> src='<a href="http://pagead2.googlesyndication.com/pagead/show_ads.js">http://pagead2.googlesyndication.com/pagead/show_ads.js</a>'><br></script><br>\")");<br><br>Markup('AdSenseHBanner', 'directives', '/\\(:AdSenseHBanner:\\)/e',"Keep(\"
<br><script type='text/javascript'><!--<br>google_ad_client = 'pub-1234567890123456';<br>google_ad_width = 468;<br>google_ad_height = 60;<br>google_ad_format = '468x60_as';<br>google_ad_type = 'text';<br>google_ad_channel ='9999999999';
<br>google_color_border = 'CCCCCC';<br>google_color_bg = 'FFFFFF';<br>google_color_link = '000000';<br>google_color_url = '666666';<br>google_color_text = '333333';<br>//--></script><br><script type='text/javascript'
<br> src='<a href="http://pagead2.googlesyndication.com/pagead/show_ads.js">http://pagead2.googlesyndication.com/pagead/show_ads.js</a>'><br></script><br>\")");<br><br>Note the specifics of all the brackets and quotes, as distinct from the code generated by Google. You'll also need to put appropriate publisher and channel ids in there and select suitable colours.
<br><br>Then anywhere in your pages or templates, just put a (:AdSenseHBanner:) or (:AdSenseVBanner:) for a horizontal or vertical banner respectively. Once you've got that working it should be pretty straightforward to adapt the solution to work for other AdSense block types, or to change colours etc. Try generating the code from Google and see the subtle differences that need to be specified in the PHP version (above) and you'll have no troubles doing exactly what you need.
<br><br>A working example of this is at <a href="http://tawa.location.org.nz/">http://tawa.location.org.nz/</a><br><br>Hope this helps.<br><br><div><span class="gmail_quote">On 12/20/05, <b class="gmail_sendername">Phil Seyer
</b> <<a href="mailto:weddingdj@gmail.com">weddingdj@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div>
Is here anyway to add Google Adsense code to a pmwiki website so that adwords will be displayed?</div>
<div> </div>
<div>For example:</div>
<div> </div>
<div><script type="text/javascript"><!--<br>google_ad_client = "pub-xxxx";<br>google_ad_width = 120;<br>google_ad_height = 600;<br>google_ad_format = "120x600_as";<br>google_ad_type = "text_image";
<br>google_ad_channel ="";<br>//--></script><br> <script type="text/javascript"<br> src="<a href="http://pagead2.googlesyndication.com/xx.js" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://pagead2.googlesyndication.com/xx.js
</a>"><br></script></div>
<div> </div>
<div><font style="background-color: rgb(255, 255, 153);">The above is an example only and is not real, working code.</font></div>
<div> </div>
<div>Thanks,</div><span class="sg">
<div> </div>
<div>Phil</div>
</span><br>_______________________________________________<br>pmwiki-users mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:pmwiki-users@pmichaud.com">pmwiki-users@pmichaud.com</a><br>
<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://host.pmichaud.com/mailman/listinfo/pmwiki-users" target="_blank">http://host.pmichaud.com/mailman/listinfo/pmwiki-users</a><br><br><br></blockquote></div>
<br>-- <br>Allister