Google Adsense Widget
Posted on Tuesday the 27th of June, 2006 at 1:56 am in Widget After 24 grueling hours slaving over a hot computer, I have completed the Max Adsense widget to make the process of adding ads easier than counting all the money you’re sure to reap. The widget is made is such a way that everything you can do in the Google Adsense control panel (except anything that requires being saved such as saving channels, pallets etc.) is built directly into the widget. It evens has a wonderful (if I do say so myself) color picker to make it even easier to design your ads and alows up to 4 widgets*. If the widget is popular I may even add a few more features such as a dynamic example ad etc. However, the widget does not make referral buttons, there are too many of each kind to add into one little widget.
Screen shot (click thumbnail to see larger image, although it is still scaled down):
![]()
All it requires is a Google Adsense account and the widgets plugin for wordpress.
To Install:
- Unzip max_ad.zip.
- Copy the two files in the max_ad folder into your plugins > widgets directory.
- Activate the widget in your control panel.
- The only thing else you need is your publisher id from google. It can be found in top line of any of your old Google ad codes and looks like pub-23456765434
Other than that most of it should be self explanatory. But feel free to ask any questions.
Download:Max Adsense
*Thanks to Otto for making his execphp widget which I heavily borrowed code from to allow multiple widgets.
Change log:
6/27/06: Fixed a bug where the javascript in multiple ad widgets would only effect the first widget.


hello,
I just had a look at your widget and it looks great. I am just curious if it would work in an wpmu environment. What is important to know is where and how it stores the settings, to know if it would store the settigns for each blog owner separately or not, it it would be possible to hardcode my own adsense ID into the script with a fixed rate, so that my adds would be displayed 20% the blog owners ads 805 of the time, as an example…
Reply to ovidiuI’ve never tested it in WPMU, but I’ve just read through MU’s code and I don’t see anything that would cause problems. I also know that this plugin has been suggested on the WPMU forums a few times.
Hard-coding your id is easy.
if(rand(4) == 4){$user_id = 'Your ID Here;}Just add that before echo $before_widget . $before_title . $title . $after_title;
Reply to AaronI tried this widget, but could not get it to work. It just leaves a blank space where the widget should be, but the title is not inserted and no ads appear. Any ideas?
Reply to Kenny PenningtonThere really hasn’t been any developement on this for almost a year now, so I’m not really sure of where it could be going wrong. I’ll try to get to it over this weekend.
Reply to Aarondownload link is broken
Reply to Chad RidenFixed.
Reply to AaronHi,
Reply to lampsieI to am seeing just blank entries after populating the configuration screen. I’m on wordpress 2.2 which ships with Widgets by default
Thx,
Lampsie
This may be a silly question, but I’m getting this error message when I try to launch the widget in Wordpress:
Warning: include(../wp-content/plugins/widgets/max_adsense_options.php) [function.include]: failed to open stream: No such file or directory in /home/thesexys/public_html/wp-content/plugins/max_adsense.php on line 137
Warning: include() [function.include]: Failed opening ‘../wp-content/plugins/widgets/max_adsense_options.php’ for inclusion (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in /home/thesexys/public_html/wp-content/plugins/max_adsense.php on line 137
Can anyone help?
Reply to SarahMake sure all riles in the zip were uploaded correctly; however , I’m not even sure if the plugin will still work as it hasn’t been updated or tested in over a year.
Reply to AaronHi Sarah,
I am having the same problem. Exactly same error.
If you find the solution please let me know by email.
Thanks
Reply to parimalhttp://healthlifestyleforever.com/blog
In the file “max_adsense.php” rename this:(”../wp-content/plugins/widgets/max_adsense_options.php”)
Reply to endymionto this:
(”../wp-content/plugins/max_ad/max_adsense_options.php”)
Hi!
Does your plugin support section targeting? I am currently using adsense deluxe, and even if I have the code for section targeting it doesn’t show relevant ads on my post. You can take a look at my site http://yuwoncedric.com
Reply to derekThanx Buddy This Remains Very helpful for me. http://www.funwithfriendz.com
Reply to AryanIt works like a charm. I was having problems with the size though
Reply to rahulhttp://www.fashionhub.co.nr
when i put my adsense widget up in blogger there is also a blank space that takes up the same amount of space the adsence panel would. but only on the side
Reply to Marcus