I don't understand the reason for replacing "adsense" with "" in the following line of code in block--adsense-managed.tpl.php...

<div id="jcv <?php print str_replace('adsense', '', $block_html_id); ?>" class="<?php print str_replace('adsense', '', $classes); ?>"<?php print $attributes; ?>>

It is causing the ids and classes to end up like this...

<div id="jcv block--managed-0" class="block block--managed">

Also, a bit deeper into the DIV hierarchy, there's a DIV that ends up with the following classes...

<div class="adsense adsense_managed_" style="display:inline-block;width:728px;height:90px;">

I assume there's either supposed to be a number after "adsense_managed_", or the trailing "_" should not be there.

Comments

jcnventura’s picture

It's all on purpose, to circumvent some adblocker rules, that search for block-adsense-managed.

The 'jcv' in the ID is something I need to remove, as it was left-over debug info.

jcnventura’s picture

Status: Active » Fixed
ExTexan’s picture

Well, couldn't you come up with a better result than leaving it as "block--managed" and "block--managed-0"? That just makes it look like a bug.

And what about "adsense_managed_"... is something supposed to follow? ...like the managed ad number, perhaps ("0" in this case)?

jcnventura’s picture

ExTexan: no I couldn't. Feel free to suggest something else that:

a) doesn't collide with any other Drupal module, and
b) will not immediately be added to the AdBlock lists.

Nothing is supposed to follow "adsense_managed_". It was just a way to avoid being blacklisted. It's already blacklisted as well, so I'll probably remove it altogether. One possibility would be to generate a random class, and have that class be known inside Drupal, but I don't think it's worth the effort.

jcnventura’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.