Jul
Whilst waiting for my new [iMac->http://www.apple.com/imac/] , I’ve been getting to grips with John Godley’s amazing [Inscript plugin ->http://www.urbangiraffe.com/plugins/inscript]. You can do so much with this single plugin that it makes many of others I’ve downloaded redundant.
John has also written a complete 33 page user guide in PDF (which I think I must have read about ten times in the last couple of days!) to accompany the plugin. However, although John has obviously gone to a lot of trouble to make Inscript easy to use, I think a certain level of familiarity with the concepts is assumed, with odd bits of clarification lacking or hard to locate. Or maybe I’m just a dummy!
Anyway, in the end I mananged to add some very useful meta tag coding by using the example given in the guide as a starting point. Now at last I can have default keyword / description tags for general and multi-post pages, and for other pages my choice of either tags using data pulled from posts, or tags using custom field data. Wonderful!
I’m still having trouble creating a snippet to insert [Adsense ->https://www.google.com/adsense/] ads into my pages though. Inscript is picking up the tags within the text, but failing quietly. I’ve tried every permutation I can think of but haven’t been able to discover the problem. Yet!
Ideally I’d like to just use a standard Inscript variable replacement tag, but when I try that Inscript fills the Adsense code with escapes. So then I tried various ways of using a function to include a text file containing the Adsense code, but that doesn’t work either.
Despite my own headaches though, I’d definitely recommend Inscript as a “must have” WordPress plugin. The power and flexibilty makes it almost limitless in its applications.
Hi Azam,
Caught this via a trackback. Your problems may be the result of a bug. I noticed InScript was escaping things that it shouldnt, because of a PHP auto-escape feature enabled on some webservers. This has been fixed now.
Coincidentaly, I also added a ‘google_adsense’ function to make it easier to insert AdSense code without WordPress mangling everything.
I’d be interested to know what needs clarification in the docs. It’s hard to separate yourself from your own assumptions when writing these things and I know that often all is needed is a little bit more detail and then everything falls into place.
Thanks for the kind words
Thanks for stopping by John.
I’ve just downloaded and installed your latest update. The automatic checking to prevent more than 3 ad blocks on a page in the ‘google_adsense’ function is a great idea. I put the Adsense code directly into the function as implied in the example, and it worked perfectly.
However, I’d rather have the ad code somewhere else and not embedded in the page with the function, enabling me change the ad style site-wide at any time. So I’ve now written the function using code=!!variable!! and that works perfectly too!
The Adsense code stored in !!variable!! is no longer escaped — the fix worked and I’ve now got exactly what I wanted, plus I can put the tags in different sections without having to worry about breaking the 3 ad limit. Thanks!
As for the docs, I’ve been going through them again to try and pinpoint things that could perhaps be clarified and will email you on that tomorrow.
I just released a WordPress plugin with quite a bit of flexibility for embedding Google AdSense ad blocks in posts. I won’t spam the comments with all the features, they’re all easily perused with a mouse click: AdSense-Deluxe WordPress Plugin
I welcome comments and suggestions from anyone who gives it a try long enough to get a good feel for it.
-wayne
Looks excellent Wayne, but from the information on your site it appears that with the exception of the preview functions Inscript already does all the rest.
Plus Inscript can be used both in posts and template sections, not just posts. And most importantly, no matter how many tags you put in your pages — for example if with certain combinations of posts and template sections you end up with more tags than you should have, Inscript never displays more than 3 Google ad blocks on a page, and simply “disappears” any unused tags. So you can’t inadvertently break Google’s rules and get yourself into hot water.
On the other hand though, I must admit that many users may find it easier to get up and runing with AdSense-Deluxe. Inscript is a big plugin that does many things, so the learning curve is inevitably a bit steeper. Well worth it IMHO, but for those who just want a way to use Adsense in posts, your plugin may be perfect.