July 2, 2006
Adsense Injection MOD
Dax Herrera had written a great Adsense Injection Wordpress plugin that injects Google ads in Wordpress.
The only problem that it tends to break the code if a post does not begin with a <p> tag.
This prompted me to start modding the plugin and I got a bit carried away and after about four hours added some more stuff to it. So here we go:
Added
- $marker into replacement procedure instead of <p> so it won’t be breaking the whole thing if a post starts with something other than <p>
- 336×280 Large Rectangle format
- Alternative Colour and Alt URL options (if no URL - goes for color, if no color - goes FFFFFF)
- text, text_image, image, options
- CSS formatting - top bottom inner outer
- ads not shown in preview
Changed
- increased the number of ads from 3 to 4 (probably pointless)
- ad channel outputs only when channel is set
- re-ordered formats (as in Google) plus added format names
- minor cosmetic HTML changes
Download it here: Adsense Injection MODed by LZZR
tags: google adsense, wordpress, wordpress plugin
































hi I downloaded you mod of the adsense but i have observed that whenever i clicked on the large rectangle option the settings could not be saved…
any ideas? my webby is Got Recipe!
Comment by jaja — July 6, 2006 @ 8:08 pm
Could you be just a bit more specific?
Just which large rectangle do you mean?
Comment by lzzr — July 12, 2006 @ 4:38 pm
As far as I know the max number of ad blocks allowed is three.
but you are also allowed to have a link ad block as well for a total of 4.
that’s per page, if your article is split across a few pages this rule won’t matter.
Comment by scoby: entrepreneur — November 25, 2006 @ 9:49 am
If I understand you right you are worried about Google’s 3 blocks limitation. Well my version does not force 4 blocks - you can choose the number of ad blocks yourself. Is this what you are asking about or I missed the point?
so honestly can’t remember what exactly I did to Dax’s plugin (just know that I made it a bit better than it was) but I know he released a couple of new versions since. AFAIK he did not implement everything I did so as soon as I’l have time I’ll take a look at his updates and most likely will mod it again and release my fork.
You see, i’ve been under a bit a bit of a pressure lately
Comment by lzzr — November 27, 2006 @ 3:22 pm
That’s exactly what I was talking about. It seemed strange to me to give people the option to try and put 4 ads on a page when it’s against the Goog’s TOS.
I’m not really complaining
but if there are people who don’t bother knowing these things before signing up I wouldn’t like to see them get banned or reprimanded.
Comment by scoby: entrepreneur — November 28, 2006 @ 7:02 am
Just got back to this - I don’t think Google will punish anyone for having a block or two extra
LOL
It’s like shooting oneself in the foot.
After all they will simply stop showing their ad in 5th block.
There is one possible drawback though. Having too many blocks may dilute your click value, so that you’ll be getting cheaper clicks.
Use it at your own risk anyway.
PS I will definetly check and re-mod this plugin again since I am at the moment modding everything because of the upgrade to Wordpress 2.1
Comment by lzzr — January 31, 2007 @ 5:02 am