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):
Screenshot of Google Adsense Widget Control Panel
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.

  1. ovidiu posted the following on February 1, 2007 at 5:15 am.

    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 ovidiu
  2. Aaron posted the following on February 1, 2007 at 1:15 pm.

    I’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.

    1. if(rand(4) == 4){
    2. $user_id = 'Your ID Here;
    3. }
    4. Use the following to copy and paste the code.

    Just add that before echo $before_widget . $before_title . $title . $after_title;

    Reply to Aaron
  3. Kenny Pennington posted the following on March 28, 2007 at 9:01 pm.

    I 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 Pennington
  4. Aaron posted the following on March 28, 2007 at 9:18 pm.

    There 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 Aaron
  5. Chad Riden posted the following on April 25, 2007 at 2:57 pm.

    download link is broken

    Reply to Chad Riden
    1. Aaron posted the following on April 25, 2007 at 10:48 pm.

      Fixed.

      Reply to Aaron
  6. lampsie posted the following on June 13, 2007 at 12:07 pm.

    Hi,
    I 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

    Reply to lampsie
  7. Sarah posted the following on June 14, 2007 at 3:45 pm.

    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 Sarah
    1. Aaron posted the following on June 16, 2007 at 12:49 pm.

      Make 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 Aaron
    2. parimal posted the following on August 27, 2008 at 3:26 am.

      Hi Sarah,
      I am having the same problem. Exactly same error.
      If you find the solution please let me know by email.

      Thanks
      http://healthlifestyleforever.com/blog

      Reply to parimal
      1. endymion posted the following on March 3, 2009 at 9:24 am.

        In the file “max_adsense.php” rename this:(”../wp-content/plugins/widgets/max_adsense_options.php”)
        to this:
        (”../wp-content/plugins/max_ad/max_adsense_options.php”)

        Reply to endymion
  8. derek posted the following on June 28, 2007 at 2:01 am.

    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 derek
  9. Aryan posted the following on January 9, 2009 at 8:35 am.

    Thanx Buddy This Remains Very helpful for me. http://www.funwithfriendz.com

    Reply to Aryan
  10. rahul posted the following on January 26, 2009 at 1:10 am.

    It works like a charm. I was having problems with the size though
    http://www.fashionhub.co.nr

    Reply to rahul
  11. Marcus posted the following on July 4, 2009 at 12:34 am.

    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
  12. imanifest wealth posted the following on February 28, 2010 at 2:08 pm.

    Can’t seem to get the adsense blocking feature to work. My post are named by title, not ID post.

    Tried to enter the test , but the adds still pop up on posts that I want to exclude. Can anyone help?

    Reply to imanifest wealth

Leave a reply

:) :D :( :o 8O :? 8) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: ;) :!: :?: :idea: :arrow: :| :mrgreen: