Getting Started with AdSense Manager 3.x

March 3, 2008

AdSense Manager 3.x is the latest update to the popular WordPress ad management plugin. More than a normal gradual update, version 3.x represents an almost complete rewrite to support a number of changes in the Google AdSense service and the recent explosion in new blog-targeted ad networks. As of writing, AdSense Manager 3.x now also supports Adpinion, AdRoll, AdBrite, Commission Junction, HTML Code, ShoppingAds and WidgetBucks.

The instructions below will guide you through the first steps of configuring Adsense Manager 3.x. If you are upgrading from a previous version of AdSense Manager, you can skip these instructions.

Getting Ready

Before you can do anything else, you will first need to set yourself up with an AdSense account and install the AdSense Manager plugin.

You can also use Adpinion, AdRoll, AdBrite, Commission Junction, HTML Code, ShoppingAds and WidgetBucks. Once you’ve created your account your provider will give you some “Ad Code” to paste into your site. Keep this window open for later: you’ll need to be able to paste this code into AdSense Manager once installed.

  1. Download AdSense Manager v3.x

Take the downloaded file, unzip and copy the /adsense-manager/ directory into your WordPress plugins directory at /wp-content/plugins/. After this is done you should have a folder at /wp-content/plugins/adsense-manager/ containing all the plugin’s files. To activate the plugin, simply go to your WordPress dashboard » Plugins and click ‘Activate’.

Upgrading for Previous Versions

If you’re upgrading from a previous 1.x / 2.x version of AdSense Manager simply copy the /adsense-manager/ directory from the downloaded .zip file into /wp-content/plugins/. This will replace the previous version with the new files. AdSense Manager will handle the upgrade of settings/etc. automatically when you next access the WordPress dashboard and show a notice if it succeeds.

Setting Up Adsense Manager

Previously you had to input your Google AdSense ID manually when setting up AdSense Manager, but this is now updated automatically when you import code. If you go to Options » Adsense Manager, you will find the following instructions for importing your first Ad Unit:

  1. Create a new ad unit using your network’s ad online management system.
  2. Copy the ad code generated (Edit » Copy, from within your browser)
  3. Go to Manage » Ad Units and paste the code into the box
  4. Click Import to New Ad Unit»

Below here are the settings for Be Nice! a method for supporting development by donating a % of your Ad space and Alternate Ads to raise funds for AdSense Manager. All ads are hand-selected and family friendly, and the income generated in this way allows me to dedicate time that would be otherwise spent on a bar job.

Just enter a % value indicating the proportion of ads you wish to use to support us. If you enter 0 only your own ads will be shown (no hard feelings but please consider donating instead).

Creating Ads

All creating and editing of Ad Units is done on the Manage » Ad Units page in your WordPress Dashboard.

The simplest way to ad new Ad Units to AdSense Manager is by importing Ad Code from your network. To do this simply go to your ad network’s management page, choose your ad settings, and copy the code that is generated. This can be pasted directly into the box at the bottom-left of the Manage » Ad Unit page.

Manage » Ads

From here you have three options: Save as Code, Import to Defaults, Import to Ad Unit.

Import to Ad Unit

This will be the most commonly used method of importing ad code. By clicking on this option, AdSense Manager will attempt to determine which entwork your ad unit is from and import the settings to create a network-specific unit. This has a number of benefits, including access to network management links and the ability to change defaults for a given network as a group. For example, some networks may require specific HTML wrapped around them.

After clicking import you will see the imported settings: check values and set a name before saving.

Manage » Ads

Import to Defaults

This imports the ad code and uses the settings to set the defaults for the network. For many networks this will simply be the network ID, but some networks will store default dimensions etc. If you ever want to change the account ID associated with a network (e.g. if you change your Google AdSense account) this is the option you will want to use to update all your ads automatically.

Save as Code

If for some reason importing is not working, or you want to store the ad code as-is, you can choose to import to a plain Ad Code unit. This will not attempt to import, modify or do anything else to the code: it will be output precisely as imported (although, of course, you can edit it later).

AdSense Classic

The simplest way to create Ads in AdSense Manager is by importing Ad Code generated from your ad network (e.g. Google, or Adroll) described above. However, the plugin still supports old-style AdSense Ads if you want to create them from scratch. Simply click on the buttons for ‘AdSense Classic’ in the bottom-right of Manage » Ad Units, and then follow the instructions from AdSense Manager v2.x.

Network Defaults

As mentioned, each network in AdSense Manager has it’s own set of defaults (including the Account ID) that are used as the basis for all adverts on that network. For example you can optionally choose to wrap all ads on a network in specific HTML markup, or you can change the display settings so all AdSense ads are shown on Posts only for example.

Default Settings for a network can be changed by clicking the “Network Defaults” button in the Manage » Ad Units list. As with editing an Ad Unit, when you’re finished click Save changes »

Ad Management

Once you have a few blocks listed, you can manage each block using the buttons provided on the right hand side of the Ad list. Details of each of these are given below:

Manage » Ads

Clicking Copy generates a copy of the selected Ad, which can then be reconfigured with any necessary changes. This is a good way of setting up a series of similar Ads for example. Note: You can also use Network Settings to configure multiple ads.

The DA (Default Ad) radio button sets which Ad unit will be used by default on your site. When adding AdSense Manager code to your site (or in your posts) you have the option to either specify an ad ID or to show the default. If you opt to show the default Ad on your site, you can then cycle through different Ad configurations by changing the selected Default Ad here.

Positioning Ads

Widgets

If you have the Sidebar Widgets plugin installed, each Ad block will appear on the Widgets configuration page to be positioned as you like. Each Ad will appear with the name of the block in the title.

Ad Widget

Drag onto your sidebar and position as you want.

Posts and Pages

You can include Ads into your Posts and Pages using the code below where “name” is the name of the Ad block you have created. New to v3.x is the addition of the shorthand <!--am#name--> format.

[ad#name]

You can also display the default Ad in your posts and pages by omitting #name. Doing this allows you to switch these Ads simply by switching the Default Ad in Manager » Ads.

[ad]

Of course any Ads in posts update automatically when colours or layouts are modified.

Code

You can include Ads in your non-Widget blog adding the code below in your WordPress templates. For example, a good place to add Ads might be sidebar.php.

<?php adsensem_ad('name'); ?>

Again you can display the Default ad by omitting the ‘name’ e.g.

<?php adsensem_ad(); ?>

If you want to avoid errors when you disable AdSense Manager you’ll want to add a function check to the above code. For example:

<?php if(function_exists('adsensem_ad')){ adsensem_ad("name"); } ?>

More

If you have any further questions on using Adsense Manager or have suggestions for modifications, simply leave a comment & I’ll get back to you.

132 Responses to “Getting Started with AdSense Manager 3.x”

  1. Paul Walker said

    I tried to upgrade from Adsense Manager 2 just a minute ago. After uploading the new plugin over the old one, I can no longer access the Dashboard. The error “Parse error: syntax error, unexpected T_VARIABLE in /home/btliquid/public_html/wp-content/plugins/adsense-manager/class-admin.php on line 286” appears when I try. The adsense widget in my blog is also gone (obviously), replaced with “Fatal error: Call to a member function on a non-object in /home/btliquid/public_html/wp-content/plugins/adsense-manager/adsense-manager.php on line 175”

    Help?

  2. James said

    Was just testing WP2.5 and saw your plugin as a recently updated plugin from the Dashboard.

    Your Plugin looks REALLY cool. I’m just wondering if there’s a feature that I really need, and that is similar to donating 10% to you, but splitting 10% between post authors and site owners.

    Let me know if that makes sense.

  3. Quin said

    Just downloaded 3.x. Getting the following error when I try to activate it:

    Parse error: syntax error, unexpected T_VARIABLE in /home/roycesof/public_html/mokonamodoki-com/wp-content/plugins/adsense-manager/class-admin.php on line 286

    Any ideas?

  4. I’m getting an error message:
    Fatal error: Call to undefined method adsensem::get_ad() in .../wp-content/plugins/adsense-manager/adsense-manager.php on line 92

  5. Bill said

    I’m getting the following error when I try to activate version 3.0.1.

    Parse error: syntax error, unexpected T_VARIABLE in /home/xxxxx/public_html/wp-content/plugins/adsense-manager/class-admin.php on line 305

    I’m running WP version 2.3.3.

    I got the same error when I tried to use adsense manager 3.0

  6. If you’ve had problems with v3 please make sure you download the latest version (as of writing this is 3.0.5). Despite bug testing there are always problems on a major release and this is no exception! I’ve been coding to patch it up since it rolled out and it seems most problems are now fixed.

    The php4 incompatibilities have been fixed: there is no real reason for the php5 stuff, but that’s what I’m developing on here. Difficult to spot bugs when they don’t scream at you 😉 I’m looking at getting a testing-system with v4 on to avoid this in future.

    Of course, if you update & get the same problems: let me know!

    Thanks for the feedback.

  7. I’d also be interested to hear any feature requests: from posts I’ve read it appears the biggest requests are for ‘automatic ad insertion’, ‘MU support’, ‘more ad placement control’, ‘limits on ad numbers’.

    Anything else spring to mind? 🙂

  8. Bill said

    just updated to 3.0.5 and got this error:

    Parse error: syntax error, unexpected T_VARIABLE in /home/macuser/public_html/wp-content/plugins/adsense-manager/class-admin.php on line 313

    I’m running WP 2.3.3 on PHP 4.4.7 and mysql 4.1.22.

    thanks!

  9. Bill: I found myself a php4 testing box and sure enough I found the problem. It’s fixed, updated and confirmed working on php4. Try download and install v3.0.7 and you should see the problems gone! Sorry about the hassle there, there are some obscure differences between the two.

    Let me know if anything else appears!

    Thanks for the feedback.

  10. José Luís: That’s also fixed. Download v3.0.7 and let me know how you get on! Thanks.

  11. Fredrik said

    Great update!

    I had a problem with version 2 and the K2 theme’s sidebar. Seems that version 3 doesn’t work properly with it either. The docs say that the ads should show up as widgets, but they don’t. I also tried to create a “Text, HTML or PHP” widget and inserted the Adsense-manager tag (<–am#name–>), but even that didn’t work. The only way is to paste the actual code in there, but then I’m not using the Adsense manager.

    Any ideas about this?

  12. Fredrik: K2 uses Sidebar Modules instead of Widgets although for some reason most other plugins seem to be fine with it 🙂 In previous versions I had hacked together a nasty bit of code to make it work, but pulled it out this time as it had gotten too bad to maintain (i.e. I wasn’t even sure what it did anymore).

    I’m downloading a copy of K2 now and I’ll use the backups from v2.0 as a starting point to getting the Widgets working. As you say, it’s kind of a central part of using AdSense Manager. I’ll let you know how I get on!

  13. Sean said

    Just installed 3.0.8 and the ad zones show up where I want them to, but they are blank and show up as square boxes no matter what size I tell it. Any ideas?

  14. Sean said

    Hey its me again, I did some more research and it seems that the adbrite php code is broken. you are putting the “sid” where the “zs” goes and visa-versa. I switched them around and its lookin good now 🙂

  15. Linus said

    I upgraded from 2.5 to 3.0.8, got the message that a previous installation was found. Pressed ok. and now I have no ads anymore?! Help Please!!!!

  16. Linus said

    Ok, found it, hat to go through all ads and save them once…still don’t understand why, but nevermind….thank you anyway!

  17. I would LOVE to see multiuser (multi author) support with some kind of revenue sharing model (where a certain percentage goes to the author and a certain percentage goes to the admin), sort of what you already have done with the Be Nice addition. Expect a *very nice* donation if this is added 😉

  18. Fredrik said

    Wonderful, thank you! Excellent work, keep it up! 🙂

  19. Michael said

    Hello,
    Have added the code to wrap text around ads but nothing happens. I am using wpress 2.3. Put in before and after box: . Still stays the same. Using latest plugin.
    Any help appreciated. Thanks in advance.

  20. Martin,
    GREAT JOB! It seems to be working fine, now!

    Although I still get blank ads shown… Maybe I have to tweak my adsense settings… 😉

  21. José Luís: The blank ads are because you’ve gone over the Google limit of 3 ads per page. You can choose to show a different ad using the “Alternate Ad” option on the ad’s settings.

    If you create a second unit with the same dimensions it will appear in the list as an alternate ad option (You’ll need v3.0.9 for the working version of this…) AdSense Manager will then automatically show this when Google has no ads available. Alternatively you can point to another URL or opt to donate them to me with Be Nice!

    When the “Ad Zones” code is completed new ad rotation/auto-selection stuff will come into play so most of this will be automagic. Watch this space…

    Let me know if you spot anything else or have suggestions for improvements!

  22. Linus: It’s a weird bug that I’m having trouble tracking down (although I think I’ve got it this time!)

    Sean: Oops 🙂 Fixed in 3.0.10 (you’ll have to switch them back 😉 …thanks for figuring that out!

    Jean-Paul Horn: Is this for WP MU? I can add optional revenue sharing to the AdSense blocks (with the option to switch a “site owner” Google ID in/out) for MU blogs if that would cover it? If it’s revenue sharing for different authors on the same blog it will take a bit of thinking to get that working but I’ll get looking 🙂 It’s definately a much requested feature… Thanks!

    Michael: HTML Code Wrap is fixed in 3.0.10 also 🙂 Thanks for spotting that.

  23. ddave said

    How is it better to create adds? By creating them on the adsense site and importing the adcode? Or by creating them from scratch directly from wordpress admin?

  24. ddave said

    [Wed Mar 05 16:06:51 2008] [error] [client 192.168.1.7] PHP Fatal error: Call to a member function pd() on a non-object in /var/www/html/wp-content/plugins/adsense-manager/class-generic.php on line 94, referer: http://www.k.com/

    this is the error i get with 3.0.10

  25. Michael said

    Thank you very much for the fix, appreciated, I installed 3.10 but it seems to have messed up my theme or something because images are now large not thumbnails and all post text gone. Getting this error:
    Fatal error: Call to a member function pd() on a non-object in …/public_html/wp-content/plugins/adsense-manager/class-generic.php on line 94
    Can you help, Thanks in advance.

  26. Michael said

    Sorry some of the code got cut out:
    …adsense-manager/class-generic.php on line 94
    Thanks

  27. ddave/Michael: Fixed in 3.0.11 🙂 Getting there…

    ddave: The choice between creating ads locally or using Google’s system depends on what you want to do. Creating them using AdSense Manager allows you to edit colours, size, etc. from within WordPress while Googles system makes it easier to work with Referral blocks (more options).

    Certainly for Referral blocks I would use Google’s system, but for Ads it’s up to you.

  28. Michael said

    Works great, thanks for all the help and updates. Greatly appreciated.

  29. sean said

    Martin, if it was any more difficult than a URL I would have been lost, but you’re welcome and thanks !

  30. Walt said

    I just upgraded on one of my blogs. I want to continue to use the classic mode, but my network defaults (colors, corner styles, etc) won’t save. I fill in all the fields, click save, go back in, and it’s reverted to the defaults (blank). I seem to be able to save everything associated with individual ad units OK.

  31. Jean-Paul Horn: I’ve done some work on the multi-author/MU support and I think the best way to do this is through an additional plugin with hooks from AdSense Manager (saves creating complicated options for normal users).

    As I see it there will be an admin interface (for the admin of a particular blog). Here will be options to activate revenue sharing for supported networks (AdSense and others) as well as % share.

    When activated, authors can add their AdSense account IDs etc. through the interface and these will be switched in as required, with the ID set by the admin being used the rest of the time.

    It gets complicated with MU a little (since they each have their own admin panel for setting their own AdSense IDs) but if I can figure out a way to do revenue sharing for both single blogs & MU in a single plugin I will.

    I’m aiming for it to be a simple case of installing a second plugin & filling in AdSense IDs to make it work.

    Am I getting the right idea here? 🙂

  32. Walt: Thanks for the report. I’ll look into it and release a fix as soon as possible.

  33. Walt said

    Addendum to my last post. On a few of my ads that are image-only I decided to type “image” in the notes (since that seems to be reflected on the Manage Ads list). I click “save”, and it reverts back to “Ad Unit”. Every time.

  34. Walt: OK I’m going to go through all the settings-saving code and check for any peculiarities. I’ll update you as soon as I have any answers.

    Also, I think I’ll update the listing to use the “Slot” column to show the Product Type in Classic AdSense ads (so it will show whether it’s Ad, Link or Referral and then whatever the current setting is: Image, Text, Image/Text). It doesn’t make much sense to have all the space and put nothing of use in it.

    Thanks again for the feedback.

  35. Walt said

    Here’s another addendum (you’re going to get tired of me). The link button is being generated as just “160×90” which shows up as blank. Looking at another blog it’s “160x90_0ads_al”. I copied the generated button code from view source, hard-coded it the template, made that modification, and it showed up. I’m not sure if the rounded corner line should be appended to a link button, but it doesn’t seem to hurt.

  36. Hi Martin,

    I think most of your work is already done by the coder of the Author Advertising plugin. the only thing left to do is taking care of the new ad_slot mechanism for Adsense (a bad move and a royal PITA imho) and making on of the two plugins (AdSense Manager or author Advertising) pluggable for the other. I’ve already taken a look at the code to see whether I could do it myself, but it’s a little beyond my PHP experience 😉

  37. Walt: Not at all 🙂 That additional bit should be outputted as thats set by the 4/5ads dropdown. I’ll have a look incase it’s being cleared/not saved somewhere (…going on your other posts!)

    Jean-Paul Horn: I’ll have a look and see if integrating the two plugins is possible. It may be that it will save a lot of typing! The Slot IDs are a problem because, as unique identifiers, I’m not sure how AdSense is going to respond if you update just the account ID and not the other.

    The alternative is to have lists of slot IDs too but that’s a bit of a nightmare or to only use the classic style ads. Not sure about this one… but will take a look! 🙂

  38. Martin, I already have some experience with the Slot ID’s and they definitely need to be unique identifiers and are tied to the publisher id. You can *only* do revenue sharing (making the pub_id a variable) for the classic ads, not for the new slot ads. I don’t mind really, I like the classic ad format a lot better.

    Hope you’re able to make a dent 🙂

  39. Jean-Paul Horn: Well that saves a bit of experimenting. I’ll get on with it over the next few days and let you know how it goes.

  40. beatus said

    Unfortunately the sidebar widget is not displayed

  41. max said

    hey great plugin but they arent showing up in my side bar!?!?
    i followed everything here

  42. Max/Beatus: Try opening the Network Defaults and then re-saving – there seem to have been bugs with earlier versions (although I thought I’d got them fixed). Which version are you currently using & which others have you had installed?

    Can you also let me know which Network’s ads this problem is with so I can have a closer look at that? Thanks for the feedback.

  43. Eric said

    Thank-you for this plugin!

  44. katy said

    my adsense ads don’t load when i’m working from certain computers — the ad on your right sidebar doesn’t load, either. i don’t have this problem looking at other blogs’ adsense ads, so i’m wondering it it’s a glitch in the manager program…

  45. Charles said

    Confusion about upgrading! Do I DEACTIVATE MY OLD VERSION PLUGIN 2.5 on a live site and then overwrite it.. then activate? Or do I just overwrite the plugin while it’s active? I am confused.

    Thanks,
    Charles

  46. katy: It will sound like a stupid question, but are the other computers running Ad Block software (e.g. in Firefox?) …I only ask because I know other people have been caught by that before. If not could you post the URLs to some example sites and I’ll be able to see if there are any differences in the code coming out.

    Oh and the Ads on this site aren’t run on AdSense Manager… though that’s no reflection on the plugin 😉

    Charles: It doesn’t matter how you do it. You can either delete the old folder and upload the new one or just copy the new one over the old. If you do the first you will need to reactivate the plugin, but WordPress won’t even notice if you do the second.

    Let me know if you need any more help.

  47. johnny: Just leave that blank. The before/after code bits are just optional if you want to wrap your Ads in something extra. To place them in the template/posts use the instructions on this page.

    Let me know if you need any more help.

  48. barry said

    I have tried upgrading the plugin to 3.13 on 3 different sites each with different themes and it breaks each of them. it is not dependent on the widget ad being active. i have to keep this deactivated until there is a fix.

    Warning: Wrong parameter count for preg_replace() in /public_html/phoningireland/wp-content/plugins/adsense-manager/adsense-manager.php on line 236

    Warning: Wrong parameter count for preg_replace() in /public_html/phoningireland/wp-content/plugins/adsense-manager/adsense-manager.php on line 243

    Warning: Wrong parameter count for preg_replace() in /public_html/phoningireland/wp-content/plugins/adsense-manager/adsense-manager.php on line 243

  49. barry: Thanks for the update. That’s happening around a change I made to enable limiting ads to the 3-ads-per-page requirement on Google. It’s another php4/php5 compatibility bug, I hadn’t noticed that the final parameter was only added in php5. Doh.

    I’m at work right now, but finishing up in 2 hours and will update a fix then. If you want to get your ads back on in the meantime, simply change the final parameter from the two lines mentioned and change the counter_click($n); lines to counter_click();

    Now to how to make this work *and* still count the ads shown…. 😉

  50. barry: Fixed in 3.0.14… Interestingly, while fixing the bug I discovered a way to streamline the filter processing and it’s now reduced from ~20 lines to 2. So I owe you a thankyou 😉

    Let me know if you spot any more weirdness. This problem aside it should now be stable: I’m looking to move this to 3.1.0 and start on the next bunch of developments 🙂

  51. barry said

    Martin, not at all, you do a great job and thanks for fixing it so quickly. You seen to have left a WAHH! in there 🙂 I will remove it but you might want to comment it out or delete it 🙂
    Sending some money your way as a thank you 🙂

    Barry

  52. gambit32 said

    Love the plugin, but like Barry already pointed out, I found a WAHH! in mine too. I had to deactivate all my plugins to find out what was doing it. Thanks for the plugin!

  53. barry/gambit: Thanks 🙂 It’s definately not in my local version so I’ve resubmitted a .15 version which should make sure it’s the right one installed.

    Only problem is that now you know my secret “debug phrase”… Should I be worried!? 😉

  54. Robert said

    Although I’m sure it is a great plug in and looks clean, in my case it creates wonderful white blocks in my text, but they stay blank. I’m using the same adsense account succesfully on some other sites.
    I tried resaving the network settings, no change. Any suggestions?

  55. Classics said

    Hi. This version doesn’t work on my website. How can i go back to the 2.5 version ?

  56. Michał said

    Hi.
    After i upgraded to ver. 3 and up it does not work. When i try to activate it i get Fatal Error. If you need any info please ask.

  57. Michal / Robert / Classics: If you are seeing white blocks where Ads used to be that is temporary as AdSense refreshes your blog information. I think it has something to do with the server used when generating the code but everyone that has had this problem before has reported it passes in ~ 1 hour.

    Michal: Which version of the plugin are you using, which version of WordPress and do you know what version of PHP your host is running? Any information will help be find the problem and fix it: Even the full error message generated would be good. Thanks.

    Classics: If you really want to go back to the old version that’s possible, drop me an email (use the Contact form on this page) and I’ll explain how to do it.

    If there are other problems can you give me your WordPress version and plugin version that you’re using and I’ll look into it.

    Thanks for the feedback.

  58. PleX said

    Adsense Manager Is Breaking the Flexible Upload Plugin

    When you upload a photo within the wp-admin and the AdSense Manager Is Activated You Get This:

    When AdSense Manage is deactivated, You Get This (Like You Should):

    Let me know if you need any information to debug this,

    Thanks!

  59. Andrew said

    How can I put a Banner add above my Header and on the left of my blog (The sidebar is on the right)

  60. Plex: Your examples of what it looks like didn’t come through. I’ll download the plugin and have a look myself… very strange 🙂

    Andrew: I’ve had a look at your site and it looks as though you already have ads showing at the top like you’ve asked. Do you also want them down the left hand side (like a second sidebar?). Thanks.

  61. PleX said

    TY, It’s from within the WP-Admin,

    Here are the links to the images, I had posted them as actual img tags lol

    How It Should Look:

    How Flexible Uploads Looks When Adsense Manager Is Activated:

    Thanks!

  62. Sam said

    Keep getting a blank on a comment page with this source address—
    res://ieframe.dll/http_400.htm#http://pagead2.googlesyndication.com/pagead/ads?

    I can’t find anything in my database that would remove it.

    Also deactivated plugin, deleted and reinstalled nothing…
    Any ideas?

  63. Sam said

    getting a blank error on page with comments. Even when the plugin in deactivated. Can you please take a look and advise.

  64. Scott said

    With respect to Michal’s fatal error, I may be able to tell you what the message said. Here’s mine:

    Fatal error: Non-static method adsensem_admin::network_header() cannot be called statically in /home/myblogpath/wp-content/plugins/adsense-manager/class-admin.php on line 546

    This is upon upgrading from 2.x.

    P.S.: Thanks for a great plugin!

  65. Scott: Are you getting that error with the latest version? That’s a bit bizarre as that line isn’t even in the plugin! Let me know and I’ll do some digging… 🙂

  66. Ah. I might have found it: the network_header() function is called bare and isn’t attached to the class. It’s probably clashing with another installed plugin (it’s a pretty standard function name). I’m waiting to upload the latest version as I’ve hacked the guts to bit a little… but in the meantime just search/replace for network_header() >> adsensem_network_header() in the class-admin.php and see if it solves you’re problem.

    Let me know so I know I’ve got the beastie.

  67. Scott said

    Here are a few lines [image] from my class-admin.php based on the latest download from WordPress.com.

    Hope this helps!

  68. Scott said

    Here’s what I get after the search/replace:

    Fatal error: Non-static method adsensem_admin::adsensem_network_header() cannot be called statically in /home/pathtomyblog/wp-content/plugins/adsense-manager/class-admin.php on line 546

  69. Scott: OK, I’m going to be brave and run the update. Try v3.1.3 and see if that solves the problem! Thanks for the help.

  70. Gah. Make it 3.1.4 and call it quits 😉

  71. Martin
    I am still getting Fatal Error with no error message. I know that it does not help 🙂
    Waiting for release that fixes this bug.

  72. Scott said

    Martin: Works great. I had to kill my classic ads and switch to the Google-managed method for them to show up on the page, but everything’s working splendidly now. Thanks for all the hard work.

  73. Aces said

    Adsense Manager 3.1.4 (and earlier) seems to break the Alinks plugin – I get the following:

    Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, ‘adsensem_admin::init_admin’ was given in [edited…] /htdocs/shakey/wp-includes/plugin.php on line 164

    when I view the alink keyphrase data…
    Adsense manager shows the demo ad as expected and alinks works properly other than the above…

  74. Abdul said

    Hey

    Thanks for the plugin

    I have a question though.

    Once I installed it and add to my page code using the theme manager no ads show up.

    So how do I add it?

    Also do you know which pages I would need to edit if I wanted to add a link bar at the top of each post page?

    Thanks

  75. Scott: Glad it’s working. If you want to work with locally editable ads (the old-style Google ones) it should work if you create them using the interface. It was probably an upgrading problem: I’ll look into it. Thanks for getting back to me.

    Aces: Another strange one 😉 I’ll have a look at the Alinks plugin and see what I can do to fix the problem.

    inirudebwoy: Which version was that on? I’ll rerun the current one through testing to see if I can spot anything odd. Hopefully should have a fixed one soon: If you upgraded from a previous version and want to go back let me know – there’s a pretty simple “downgrade” process if you need it.

    Sam: Is that happening with the most recent release? What other plugins do you have installed: it looks as though the AdSense script urls are being mangled before output (probably having a # put in from of them). Is this happening to Ads in posts or in the templates? Thanks.

    Abdul: Go to Options » Ad Units and paste some code from one of your ad providers (e.g. the Google AdSense code). That will save it as an ad unit and it should appear. You can have as many ad units as you want by calling them by name (see the information just above the comments on this page).

    Thanks for the feedback 🙂

  76. Sam said

    It is the latest version. I only have the Akismet plugin installed, but not active. I am using the Talian 1.0 template, and you can see the missing ad blank spaces above and below the comments. With or without the adsense plugin activated.Now if I change the template it goes away. I really like this template, I searched through the DB to see if I can delete whats causing the error, but I could not find anything that might cause it. Any suggestions?

  77. Aces said

    Thanks! They are both essential plugins.

    I’ve looked into it a bit further since i posted and discovered that everything seems to work on a local XP based installation, just not on the 1and1 linux based webhosting…. I wonder if it is something to do with that….

    I also noticed on the problem installation that some of the alinks statistics page fails – leaving empty image icons – this is corrected when I disable adsense…

    Hope this helps….

  78. Martin, i am afraid that it happens with every version 3.x.
    I did clean up database, delete plugin and install it. Still same error message which is no message. I start to think that it can be my wordpress installation.

  79. Mark said

    I think I answered my previous question – why I don’t see ads in all my posts.

    According to Google, “AdSense publishers can add a up to three link units to any of their content pages that conform with our program policies.”

    https://www.google.com/adsense/support/bin/answer.py?answer=15940&ctx=sibling

    Thanks, Mark

    Mark

  80. Everyone!: Can you try 3.1.6? I think the problems are due to clashes with other plugins, which I’ve now worked around. Hopefully that should clear up this batch of weird issues 🙂

    Let me know how you get on, will keep working on it til it’s fixed.

  81. Installed 3.1.6, very bad result switched back to 3.1.5..

    post content was messed up.. maybe you stripped away “a” letters from html code? example word “lubiana” become “lubina” 😦

  82. Paulo: Can you try 3.1.8? I had mis-escaped something in a replacement expression. I’ve added a new format to inserting ads: [ad] or [ad#name] to make it possible to do this from within the visual editor.

    I’ve fixed the bug in 3.1.8 along with an error in the ad-limiting counting for AdSense. Let me know how you get on & thanks for getting back to me so quickly.

  83. Everything seems to work now, thank you 🙂

    Happy Easter 🙂

    Ciao

  84. Aces said

    Wow!

    Alinks seems to also be working fine now…

    Thanx

  85. That is error message i have: Plugin could not be activated because it triggered a fatal error.

    How can i uninstall this plugin and make a fresh install?

  86. simon said

    Do you have a changelog?

  87. princell said

    Fatal error: Only variables can be passed by reference in /home/www/ruyaja.com/wp-content/plugins/adsense-manager/class-admin.php on line 454

    this is the error i get with 3.1.9

  88. blogfeuer said

    Hello,

    Updates didn’t really work as good as I thought so. From older to new version, this version didnt even import publisher code.

    If you do a next version, please think about people that update!

  89. anna said

    Hi. I upgraded to WP 2.5 and then upgraded the plug-in. My banner adsense immediately when to a skyskaper. In addition, when I put it another smaller banner, my ads stopped appearing. I only have public service announcements now.

    What did I do wrong?

  90. Walt said

    Hi, I just created a new blog at rel 2.5 just to start testing things out. One of the plugins I loaded is Adsense Manager. I don’t particularly like the Googles Ad Manager, so my preference is to create the ads in the “classic” fashion. Only problem is – there does not seem to be a button or link to actually modify the “Netwoek Settings”. Nothing in the Adsense Manager settings or the Manage Ad Units page.

  91. Michael said

    Hello,

    Upgraded to wordpress 2.5 now none of the ads show up after the upgrade of adsense manager also, funny but my old post show the ads but the new ones I have just put do not show any ads, it shows the whole text post with no ads at all.

    Any help with this?

    Thanks.

  92. Jim said

    Hi,
    Just upgraded my WP to version 2.5 and saw there was a new version of AdSense (previous version was installed c. 1 month ago). Deleted old directory, uploaded new directory. Plugin appears in list as Inactive. Try to activate and get this:

    Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 30500 bytes) in /home/xxxxxx/public_html/play/blog/wp-content/plugins/adsense-manager/adsense-manager.php on line 62

    Any ideas where to go to fix this? 30500 seems a lot less than 8388608 to me.

    Apache version 1.3.41 (Unix)
    PHP version 5.2.5
    MySQL version 4.1.22-standard

  93. Jim said

    PS. Looked in the adsense-manager.php file and commented out the offending line:
    //require_once(‘class-cj.php’); //Commission Junction
    in fact I commmented out all the ad networks I wasn’t using. No joy, the script just runs out of memory a bit later eg. in the class-admin.php file.
    I don’t have access to the php.ini file as I’m on shared hosting. Joomla, WordPress and anything else I’ve run on here have not run up against any memory limits. Any clues?

  94. Claude said

    Hi, I just upgraded to your 3.2.0. I can create AdSense Classic link units, but cannot define/edit their appearance. Also, my previous link units got knocked out and no longer appear throughout the blog. I tried to deactivate and uninstall, then reinstall the prior version, but this caused fatal errors for the entire blog itself.

    I like the idea of where you’re going with this, and it could be very powerful, efficient, and elegant. But right now it’s not very useful until I can get all my previous link units working again or to create new ones to replace them without editing every single one of my posts.

    Any suggestions? Thank you!!

  95. Pinkdilla said

    I updated my site to WP 2.5 today and downloaded your automatic update for this plugin and have not been able to get any of the ads to show up on my site by inserting the code into the template, the way I was able to before I upgraded. This appears to be the same problem as Michael above me.

  96. WEB LOG said

    Click setting->AdSense Manager->
    Show:

    Fatal error: Only variables can be passed by reference in wp/wp-content/plugins/adsense-manager/class-admin.php on line 455

    wordpress ver:2.5
    AdSense Manager ver:3.2.1

    Why?

  97. Everyone: For those having problems with WordPress 2.5 can you please try the latest version of AdSense Manager and then report back with what happens? I’ve had a few random bug reports, but not received any feedback on whether the bugfixes (.1 and .2) have fixed the problem. Much appreciated.

    Jim: The memory problem I ran into also and then, as if by magic, if vanished. If I remember rightly the aLinks plugin was the one that was conflicting somehow. Do you have that installed? If not can you let me know which other plugins you have, and if disabling any of them solves the problem? There must be something going on.

    Bottom line – there are a lot of weird little changes in WordPress 2.5 and I’m still getting to the bottom of where – and why – these things are breaking! I’ll keep you posted.

    All the feedback is much appreciated. Thanks.

  98. Michael said

    Hello,

    just upgraded to the latest 3.2.2 via auto update in wp 2.5 but still no ads showing.

  99. Michael said

    Hello again,

    Just tried adman and it worked but can’t seem to figure out how to wrap ads in it. Maybe you can look at the code in adman as I prefer using Adsense Manager.

    Hope this helps.

  100. Michael: Thanks for the update. Can you please confirm how you’re trying to add the ad blocks to your blog? Are you doing them inline to posts, in widgets, (K2) Sidebar Modules or using code in the templates?

    If you could post the code you’re using, and maybe a link to your site that would be great. Thanks for all the help: I’ll get this fixed 🙂

  101. All: I should have an update ready for tomorrow. I’m working at this blind as I’m unable to reproduce the bugs, but I’m streamlining some stuff down to see if it helps. In the meantime, if anyone knows how to send through their data (from the options database table) please mail it to me so I have something to work with!

    Thanks again.

  102. Jim said

    Plugins installed:
    AdSense Manager 3.2.2 Inactive
    WordPress Database Backup 2.1.5 Active
    WP-SpamFree 1.5.9 Active
    Still having the out of memory problems I’m afraid.
    Will email you a copy of options table.

  103. Jim said

    PS. blog is at http://play.datalude.com/blog if you need to see the ad config. I normally have three google ads in the left hand column, which worked fine in the previous version.

  104. Michael said

    Hi Jim,

    I am installing ads in the post individually, using the the created blocks e.g. [ad#-480×60]. I currently use google adsense and a clickbank script which shows adsense type ads. Currently the old post ads show up but the new post don’t. I have one of the ad blocks as a sidebar module widget this shows up fine but the content ads don’t show.

    The site: http://www.1infomall.com
    Page with ads showing: http://www.1infomall.com/2008/03/29/the-very-basics-of-ebay-getting-started/
    Page with no ads showing: http://www.1infomall.com/2008/04/01/feeding-a-family-on-300-a-month/

  105. Michael: Thanks, I’ve managed to reproduce the problem. I’m working on a fix and hope to have it out by this afternoon.

    Jim: Thanks again, I’ve got the email – it’ll be useful to test with a real setup. As I say, should be fixed this afternoon, hopefully!

    Thanks again for your help.

  106. Works since 3.2.1 🙂 Lovely.
    Thank you

  107. InIrudeBwoy: This is the problem! It works for most people but not for others, always hard to debug! Glad it’s going good for you though, let me know if you have any problems.

    Everyone Else: Please try 3.2.3. I think the problem was with the default ad not being set correct, this prevents rendering of the ads (for safety: stops crashes) but this has been hidden. I’ve added additional code to preselect a default if one is not currently set.

    To do this, simply upgrade to the new version then go to your Manage » Ad Units panel. You should see on the right hand side is a column “DA” (Default Ad). ONE of these should be selected. If it is, you’re good, if not just tick one (but also let me know) and then try refreshing your front page.

    Finally, if you have WP Cache enabled this will be preventing the code from being re-rendered. Simply disable, refresh the pages, then re-enable.

    I’ve also taken this opportunity to update the plugin to fit in with the new WP2.5 admin styling. Looks pretty neat. Have fun, and of course, let me know if you still have problems!

  108. lowfi said

    Any chance of getting a ChangeLog for each release?

  109. Hossam said

    hi , great plugins ,but when i want to activate it , i got error message

    Fatal error: Call to undefined method adsensem::get_ad() in …/wp-content/plugins/adsense-manager/adsense-manager.php on line 23

    i’m using latest version , i downloaded it today from

    http://downloads.wordpress.org/plugin/adsense-manager.zip

    please help me ,,

  110. Michael said

    hello

    i just upgraded my blog to wp 2.5 and still trying to ad some google ads. So i downloaded v3.2.2 and now 3.2.3 without seeing something.
    The only thing (after import the adssetting to the plugin) ist following message in the wigdet section:

    Fatal error: Call to a member function on a non-object in /home/.sites/92/site835/web/blog/wp-content/plugins/adsense-manager/adsense-manager.php on line 196

    I don´t use K2 or something similar – i have the message if i change to the original wp theme. I also tried the keywords for posts or pages. But it seems like, the Plugin doesen´t receive the ad variable and is not able to put the ad on the page. In this case i don´t have any failure – but there is this … [ad] … instead the ad 😦

    Michael

  111. Technofox said

    I have upgraded to word press 2.5 and with the latest version of your adsense plugin 3.2.4 and I get the following error:

    Fatal error: Call to a member function on a non-object in /wp-content/plugins/adsense-manager/class-upgrade.php on line 129

    Do you have any idea why this is going on?

  112. Michael said

    Hi Martin sorry for calling you Jim,

    Updated to latest still no luch, no ads showing, already had the DA ticked in the ad links admin, deactivated wp-cache, still no ads.

    Maybe I can create a temp account for you to see whats going on, let me know.

  113. Aces said

    Using Internet Explorer 7, Adsense Manager 3.2.3 on wp 2.3.3 gives an error icon on the status bar of the Manage Ad Units page:

    Line: 64
    Char: 26
    Error: Object expected
    Code:0
    URL: [edited…] /wp-admin/edit.php?page=adsense-manager-manage-ads

    Similarly, using 3.2.4 on a test site version of WP 2.5.0 gives an error icon on the Manage Ad Units page:

    Line: 72
    Char: 31
    Error: ‘dbxManager’ is undefined
    Code:0
    URL: [edited…] /wp-admin/edit.php?page=adsense-manager-manage-ads

    I don’t know if these actually affect anything as I haven’t fiddled about yet….

  114. Aces: Thanks I’ve fixed that in release 3.2.7. It’s minor/cosmetic and shouldn’t affect the functioning of the plugin.

    Michael: No problem, I’ve been called worse 😉 …Have you tried 3.2.7? I have fixed a lot of things. Also you may want to check under ‘Network Settings’ that your AdSense ID is listed? There was a bug in the upgrade that was wiping this. You can get it from the Google AdSense site, it’s in the top right of the screen. Just paste that in and save.

    Let me know how you get on, and thanks for the info.

  115. Michael said

    Sorry Martin, but still the same, no ads showing. You were right the adsense id was not there, I put it in and still no ads. But the ads on the old post do show up.

    Thanks for all you help, much appreciated.

  116. Michael said

    Thank you Martin – now it works great

  117. Claude said

    Hi Martin,

    I’m getting this inside the Edit Settings function for certain pre-existing ads:

    Fatal error: Call to undefined method stdClass::network() in /home/blackfiv/public_html/wp-content/plugins/adsense-manager/class-generic.php on line 253

    This seems to replace the “Apply” and “Save Changes” buttons, which do not show up.

    Also, trying to delete an ad results in this:

    Fatal error: Call to undefined method stdClass::network() in /home/blackfiv/public_html/wp-content/plugins/adsense-manager/class-admin.php on line 220

    I upgraded to 3.2.7.

    Thank you.

  118. Claude said

    Hi Martin,

    PS – Under Create Ads, AdSense Classic, then Link Units, there are no options under Appearance.

    Thank you.

  119. Claude said

    Hi Martin,

    Apologies for my repeat entries.

    Reporting one more thing:

    I get the Fatal error reported above for any new ad, including when I cut and paste from Google, and this error occurs upon attempting to Import To New Ad Unit.

  120. Aces said

    working fine now….

  121. Walt said

    Hi. I’ve been trying to get this working in 2.5 — but — I still can’t find the “Network Defaults” button. I like the old style of creating Adsense

  122. Lordras said

    Hi all.
    I have 2.5 wordpress with adsense mangaer 3.2.7 but i receive this erroe:

    Fatal error: Call to undefined function: network() in /home/xxxxxx/public_html/xxxxxxx/test/wordpress/wp-content/plugins/adsense-manager/class-admin.php on line 220

    Fatal error: Call to undefined function: network() in /home/xxxxxxx/public_html/xxxxxxx/test/wordpress/wp-content/plugins/adsense-manager/class-admin.php on line 546

    Thank vary much for the help!

  123. WEBLOG said

    AdSense Manager v3.2.7

    Warning: Invalid argument supplied for foreach() in /wp/wp-content/plugins/adsense-manager/class-admin.php on line 544

    I’m running WP 2.5 on FreeBSD / PHP v4.4.4 and mysql 4.1.18

  124. Walt: The Network Settings button appears when you create the first old-style ad unit. Just use the 3 buttons for Classic ads to create a unit and you will then be able to modify the settings.

    Aces: Thanks for letting me know!

    StdClass->network() Errors: Download 3.2.8 and upgrade. If you upgraded from version 2.x then log into your admin panel and add ?adsensem-revert-db=2 to your URL and press Enter. This will refresh the v2 database, and prompt you to upgrade. You should now get your ad units back.

    Public Service Ads: These appear when the account ID is not correct. There were bugs in earlier versions that wiped this when upgrading, but following the above instructions will fix this also.

    Any other bugs: Please try 3.2.8 they should all be fixed now 🙂

    Apologies for the bug and thanks for your patience.

  125. WEBLOG said

    AdSense Manager v3.2.8

    Warning: Invalid argument supplied for foreach() in /wp/wp-content/plugins/adsense-manager/class-admin.php on line 545

    I’m running WP 2.5 on FreeBSD / PHP v4.4.4 and mysql 4.1.18

    😦

  126. Walt said

    You’re saying I have to create the ad block first, and then add the pub ID to it? No offense, but isn’t that a bit bass-akwards? Every other product out there (except for the completely manual ones) makes sure the pub ID is resolved before proceeding. Your old setup was far less confusing on this particular point.

  127. Walt: It is bass-ackawards, completely… I hadn’t realised that was the way it was now working until your message. I’ll fix this in the next release (by allowing the account ID to be set at the same time as first set up). Should hopefully release tomorrow pm.

    Thanks for pointing it out 🙂

  128. 3.2.8: If you still receive the network->etc. error in 3.28 email me and I’ll talk you through how to fix it. Thanks.

  129. WEB LOG said

    Warning: Invalid argument supplied for foreach() in /wp/wp-content/plugins/adsense-manager/class-admin.php on line 451
    😦

    still

  130. WEB LOG said

    AdSense Manager v3.2.10

  131. jayeskenazi said

    i can’t get this plugin to work with WP remix. it’s installed fine but ads do not show properly. any suggestions?

Leave a reply to Claude Cancel reply