It doesn't look like this problem was reported - I will confirm the bug as described here, although I'll just bail on the module for now:

http://drupal.org/node/173051

Had the site looking great; after installing AdSense attached images would display below text, despite proper CSS inline styling.

CommentFileSizeAuthor
#8 adsense_help.txt8.91 KBbcobin
#2 without_adsense.jpg48.2 KBbcobin
#2 with_adsense.jpg54.94 KBbcobin

Comments

kbahey’s picture

Status: Active » Postponed (maintainer needs more info)

Your chance of getting this fixed are far better if you

a) attach a screen shot with and without adsense.

b) list the relevant css you used.

bcobin’s picture

StatusFileSize
new54.94 KB
new48.2 KB

And so I shall!

Here's the relevant CSS - from /image/contrib/image_attach/image_attach.css:

.image-attach-teaser {
  display: inline;
  float: right;
  margin-left: 1em;
}

The display:inline styling is not in core; I added that manually; to no avail. This is on a local test site; I can't fool around on the live site. Thanks in advance for looking into this - it's pretty much a show-stopper for me.

kbahey’s picture

Well, adsense does not add its own css file that may conflict with other styling that you have done.

There are a bunch of <div style=...></div> but that is only when you display a placeholder, and should only affect the ad itself.

The only advice I can offer is that you use FireFox's Firebug extension to see what exact styling you have for these elemets with the adsense module and without it, and that will help you narrow down where the problem is.

bcobin’s picture

I am using Firebug. It's not a styling issue per-se - it looks like AdSense is transposing the first paragraph of node content with attached images. Note where the text "Friday, February 15th," etc. appears in the output of each instance.

Bizarre. I would say this definitely qualifies as a bug - can't think of any reason why you'd want the module to do this.

----without adsense----

    <div class="content">
      <div class="image-attach-teaser" style="width: 80px;"><a href="/~username/sitename/node/3"><img width="80" height="100" class="image image-thumbnail" title="YoungSusanB.jpg" alt="YoungSusanB.jpg" src="http://localhost/~username/sitename/files/images/YoungSusanB.thumbnail.jpg"/></a></div>
<p>Friday, February 15th is Womens' Day! Bring your Sister, Mother, Friend, Neighbour to Celebrate this Historic Year for Women in Our Country’s History.</p>
    </div>  

---end excerpt-----

---with adsense-----

<div class="content">
      <!-- google_ad_section_start --><p>Friday, February 15th is Womens' Day! Bring your Sister, Mother, Friend, Neighbour to Celebrate this Historic Year for Women in Our Country’s History.</p>
<div class="image-attach-teaser" style="width: 80px;"><a href="/~username/sitename/node/3"><img width="80" height="100" class="image image-thumbnail" title="YoungSusanB.jpg" alt="YoungSusanB.jpg" src="http://localhost/~username/sitename/files/images/YoungSusanB.thumbnail.jpg"/></a></div>
<!-- google_ad_section_end -->    </div>

The code makes it clear the browser is doing exactly what it's told. Eep.

kbahey’s picture

What I see is that Adsense adds the section targeting comments <!-- google_ad_section_start -->. That should have no bearing on CSS or anything related to presentation.

But, the order of things is different in two cases:

With Adsense:
1. section targeting comment.
2. <p> with text after it.
3. <div> for image attach.

Without Adsense:
1. <div> for image attach.
2. <p> with text after it.

That reordering is not done by Adsense. It may be that image attach is messing up things, or the sequence each module is called (controlled by Drupal) is causing this.

You can try two things:

1. Try going into adsense's settings, under Advanced, and uncheck section targeting.

2. Install this module http://drupal.org/project/moduleweight and change the order of adsense and image_attach one way then the other way and see the effect.

bcobin’s picture

You can try two things:

1. Try going into adsense's settings, under Advanced, and uncheck section targeting.

2. Install this module http://drupal.org/project/moduleweight and change the order of adsense and image_attach one way then the other way and see the effect.

1. Probably not possible on the test (local) site. I'm fairly certain that Google won't generate an ID for an IP-only local site.

2. Yes, this works. Setting the Image_attach module to a lighter weight than Adsense solves the problem.

That reordering is not done by Adsense. It may be that image attach is messing up things, or the sequence each module is called (controlled by Drupal) is causing this.

I would say that this is worth looking into - it shouldn't behave this way.

Thank you for your help! I LOVE the Drupal community... keep up the great work!

kbahey’s picture

Drupal determines the order in which modules are called.

Because the adsense module starts with the letter "a", while image_attach starts with "i", then Drupal calls adsense first when inserting stuff in content.

There is no way to have a generic solution that will work on all sites with all module combinations.

I think this should go in the documentation.

Can you please spend a few minutes writing the solution in the adsense_help.inc file and attach it here (as a .txt file)?

bcobin’s picture

StatusFileSize
new8.91 KB

My pleasure. See text file, attached. Do with it what you will and thanks!

kbahey’s picture

Status: Postponed (maintainer needs more info) » Fixed

Thanks for this.

Included with some expansion.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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