I recently installed Paging module (http://drupal.org/project/paging) which allows you to break long nodes into several chunks with a pagination tag. Things work nicely except that AdSense ads aren't displaying quite right: I'm getting shorted.
My site is set up with 2 'permanent' AdSense ads (1 in right sidebar, 1 in top block) that show on every node, plus 1 AdSense ad embedded in node content in para 1 of the node (so Para #1 on Page #1 after it is broken into 2+ pages with Paging module).
If things were working right, Page #1 of the 'paged' node would show 3 AdSense ads (1 ea. for top block, sidebar, para 1). Subsequent pages would show 2 (1 ea. top block, sidebar).
But Page #1 is only showing 2 ads (sidebar, para 1). In the Page #1 top block where the ad is missing, it says in source: <!--adsense: ad limit reached for type-->.
Subsequent pages are showing 2 (top block, sidebar), as expected.
I can understand how the module might get confused by this set up, but I don't think any AdSense rule is being violated by showing 3 ads per page in this situation. Is there a way to tweak the module to show a 3rd ad on any 'paged' node?
Thank you for your help.
Comments
Comment #1
jcnventuraHi,
I guess that the problem is that the paging module creates the page internally, and it calls the ad display function, and then when it shows the actual paged version, it calls the ad display again.. From the point of view of the adsense module, for the same page you're trying to show 4 ads, and this is against the AdSense TOS, so it doesn't allow you to do it.
I don't really see how this could get solved, except by a collaboration between the paging module author and us.. It would require that the pager module create a "build mode" or something similar which can be detected during the ad display function so that calls during that part wouldn't get counted towards the maximum limit.
João Ventura
Comment #2
john.kenney commentedok, thank you very much.
that sounds like a reasonable explanation of what's going on.
i have posted an issue over there and asked them if they'd be interested to work on this.
http://drupal.org/node/848500
Comment #3
jcnventuraWaiting for #848500: Problem when using Paging module with AdSense module