Adsense-Deluxe WordPress Plugin “Invalid Argument” PHP error

August 29th, 2007

If you’ve seen a PHP error when saving Adsense-Deluxe options in your WordPress blog which looks like the following:

Warning: Invalid argument supplied for foreach() in /public_html/wp-content/plugins/adsense-deluxe.php on line XXX

it’s most likely because some adsense code was inserted into the database with fancy or curly quotes instead of plain ASCII quotes. I’ve gotten four reports of this problem and finally tracked it down while trying to work through the problem with an Adsense-Deluxe user. It seems I may have been the source of these mistakes because this user simply copied some code from one of my posts which showed how to make an ad block float to the left side of your post, and my WordPress was displaying that code with fancy/curly quotes.

If you’re able to fix those quotes or delete the adsense blocks you defined containing those quotes, that should resolve the problems. If you’re unable to do that, then there’s a convoluted method outlined below which can be used to wipe out all the plugin’s stored settings and start over.

Convoluted Way of deleting the plugin settings:

Use your FTP software to edit the file wp-content/plugins/adsense-deluxe.php. Locate the line near the top of the file: define(’ADSDEL_OPTIONS_ID’, ‘acmetech_adsensedeluxe’); Insert underneath that line, beginning on a blank line in the file:update_option(ADSDEL_OPTIONS_ID, '');, and save the file back to the server. Return to your WordPress administration and load the Adsense-Deluxe options page. Loading this page after making that change will zero out the old options and create a new default set. Go back to the Adsense-Deluxe.php file opened in your FTP software and remove that line. Save these changes back to the server.

For savvy users you can optionally go into the wordpress database and remove the plugin options record for the key ‘acmetech_adsensedeluxe’.

WordPress JavaScript Plugin for Posts

March 19th, 2006


The Adsense-Deluxe WordPress plugin can do more than simply help you add Adsense ads to your WordPress blog posts. It’s also great for including JavaScript code or most any other text you want to insert when a post is viewed.

When I first wrote Adsense-Deluxe, I just wanted a more efficient method of including a variety of Adsense ads in my posts and templates, and a way to easily change those over time, or disable them. But Adsense-Deluxe is essentially just a search/replace filter for posts, which means you can just as easily include Yahoo Publisher Network (YPN) ads, or Clicksor Contextual Advertising or any other advertising code the same way Adsense is configured.

Today one of the many satisfied Adsense-Deluxe users (Michael B. at http://www.MarketItOnline.co.nz wrote about his frustrations in finding a way to include JavaScript in his posts since WordPress adds <br> html formatting to each line of the JavaScript code. He asked if I had any ideas or knew of a plugin which would do this. While I suspect there may be some WordPress plugins in the “programmer tools” categories which could accomplish this, I suggested he just make the Adsense-Deluxe plugin perform that task. Afterall, Adsense ad code is nothing more than JavaScript, so instead of advertising JavaScript, you can use any other JavaScript you want for per-post inclusion.

[ You can checkout Michael’s Body Mass Index Calculator JavaScript within a WordPress post. ]

Mac OS X - Cocoa Text Key Bindings

March 19th, 2006


Just came across an excellent reference chart for the default text editing system key bindings in OS X Cocoa Text System - Default System Key Bindings.

For cool tips on modifying the default findings and doing some other pretty funky things to the Cocoa Text System, see MacOSXHints Post

Adsense-Deluxe On Another Top WordPress Plug-ins List

March 14th, 2006

Yet another top ten WordPress Plugins list includes our Adsense-Deluxe Plugin. Thanks guys!

10 most useful wordpress plugins according to Sabahan.com « Sabahan.com
Being an Adsense publisher myself on several of my earlier websites, Adsense Deluxe is one of the first plugins that I searched for. It’s a great plugin allowing you to plug your Adsense ads easily anywhere within your post simply by inserting html comments. You can define a single default code or as many variations as you like for your skyscraper, banner, link unit ads.

Our favorite site for professional blogging also received a lot of feedback recommending Adsense-Deluxe.

Google Maps Hacking

February 12th, 2006

I’ve been helping a friend with his new real estate oriented web site, and got my first chance to play with the Google Maps API. While limited, it is fun and certainly helps liven up a web page. The playground is at Obares. Presently we just focus the Google map at a City resolution for each individual city real estate page, but hope to start showing the local resources mapped out on the map.

WordPress 2.0 and Adsense-Deluxe Plugin

January 9th, 2006


AdSense-Deluxe v0.7 was released tonight and includes support for WordPress 2.0’s (WYSIWYG) Rich Editor as well as updating the documentation and help text to remind people it works equally well for Yahoo!’s Publisher Network.

AdSense-Deluxe is a plugin for WordPress (1.5 or later) which greatly simplies the addition of Google or Yahoo! ads to your WordPress blogs, allowing for use of multiple ad styles and controlling when and where ads are displayed.
Read the rest of this entry »



You are viewing a mobilized version of this site...
View original page here

Mobilized by Mowser Mowser