Adsense Deluxe Plugin for WordPress 2.8.1 and Up
The latest WordPress update have many bugs fixed and tighten securities on administration pages. Now many blogger who have their blogs setup using WordPress will be more confident and secure specially on using plugins where the source is not really known to be credible. But lately there was a problem on some plugins we are using that have no latest update. Specially the Adsense Deluxe WordPress plugin where the author have not made an update since 2006. Maybe the guy lost interest on this precious plugin. I can’t think of a good reason rather than having lack of user support (donation) because the plugin is free, I think there will be no initiative for users to pay it. So I think it will take a longer time or maybe no update at all for those who wants to use it.
But for those bloggers out there who are still using this plugin, I know the value of this because not only can you use it on Adsense, you also use this on any advertising network for displaying ads on your blogs. After I updated my wordpress to version 2.8.1, I have encountered a bug on this plugin. What happened is I can’t access the Adsense deluxe administration page and only saw a blank page with this message “You do not have sufficient permissions to access this page” so I can’t edit nor see what’s happening in there. I thought someone already hacked my administration page and fear that some malicious code had been running again so I made some research. Thanks to this site that I discovered that you only need to replace a variable called hook in PHP. Many plugin used admin_init instead of admin_menu inside the plugin code. In the case of adsense deluxe, the hook used is admin_head that should be replaced by admin_menu. So to make it work, first thing to do is disable the adsense deluxe plugin. Maybe I need no explanation on this part if you are a WordPress user. Then open up your FTP program and go to the plugins directory and transfer the file adsense-deluxe.php from the subdiretory adsense-deluxe_wp_plugin_v0.8 to the plugins directory.
Then delete the adsense-deluxe_wp_plugin_v0.8 directory and all of the contents and activate it by going to Plugins link on the left side of your wordpress admin panel (The reason why you have to delete it is because you won’t be able to edit your adsense code once you get inside the adsense deluxe admin page). Then open your plugin code and click edit on your installed adsense deluxe plugin. Then look for the code below and change the admin_head to admin_menu. See what I did:
Then click the save button. Now you will be able to view the admin page and edit the contents of your adsense deluxe plugin page.
Tip on How to Limit the Ads on The Blog HomePage
One flaw of this plugin is the number of ads shown on the homepage if you want your ad shown on every post. The default number in the plugin code was 3 but actually it is four. Four ads will be shown per page. So, to limit it to 3, you just have to replace 3 to 2 on the code. To do this, as what we did previously, edit the code by going to the plugin admin panel and see the sample below: