Bug Why is the quote text obscured by the advertisement?

  • Thread starter Thread starter sylas
  • Start date Start date
AI Thread Summary
The discussion centers on the issue of quoted text being obscured by advertisements on a forum. Users have observed that while regular post text wraps appropriately around ads, quoted text does not, leading to visibility problems. A proposed solution involves simplifying the HTML structure by removing unnecessary tables, which would allow for better wrapping of quoted text around ads. This issue primarily occurs in the first post of a thread or at the top of subsequent pages, affecting users who are not logged in. The conversation highlights the need for a fix to enhance user experience and potentially increase ad placements.
sylas
Science Advisor
Messages
1,647
Reaction score
9
I have been looking at PF without being actually logged on, and so all the advertisements were in place. And I noticed a problem. I looked through a couple of threads, and it is a consistent problem. Consider this screen shot.
ad.JPG


There is a google advertisement, placed inside the first post of the page. The text in post is wrapped appropriately so that it is not obscured by the advertisement. However, the text inside the quote box is not wrapped, so gets partially obscured by the advertisement. Having a border around an advertisement in this position would also be an improvement.

Cheers -- sylas
 
Physics news on Phys.org
You call it a bug? Greg calls it a feature - this way more people want to pay for using forums.
 
It's a bug I've known about for awhile. Not quite sure how to fix it. Only happens when a quote is high enough in a first post. Not too common. thanks!
 
Borek said:
You call it a bug? Greg calls it a feature - this way more people want to pay for using forums.

:smile: The truth is finally out. :biggrin:
 
A quick and dirty fix is to put a table in:

so:
Code:
...
<td class="alt1" id="td_post_XXXXX" style="border-right: 1px solid #E3E3E3">
   <table>
      <tr>
         <td>
            <div id="message">
               ...
            </div>
         </td>
         <td>
            <span id="googlead">
               ...
            </span>
         </td>
      </tr>
   </table>
</td>
...
 
It's unlikely to happen in a first post, since the first post usually has nothing to quote.

It can of course happen in the 17th, 33rd, etc post … but the reader can always click the little arrow to see the original. :wink:
 
DavidSnider said:
A quick and dirty fix is to put a table in:

I've had a look at the code. The solution is to take a table out! Furthermore, if this is fixed, you will once more be able to place an advertisement inside every post, which I believe was the case previously. So you even get the advantage of more ads to the hoi polloi. (Any hoi polloi reading this: subscribe! You know you want to.)

Quoted text currently uses html where a quote appears inside a div, which is inside a table with a single cell, which is inside a div.

Inside that, you then have another div for the header indicating who is being quoted, and then a blockquote for the quoted text.

The problem is that the table has width 100%, and this is what prevents the stuff inside from properly wrapping around the ad.

There's probably some history of development here, but the fix is to simplify. Get rid of the table, and combine the two outer divs. The table here does nothing useful and only causes the bug.

Here I give a complete example in html, with the original and the revised methods, but all the other guff for the page stripped out. This contains what is effectively a post with two quoted sections, and a floating ad. I put the current method first, and the proposed version after, with headings to say which is which. You can see that the quotes have one div replacing what was two divs and a table, all nested. Observe the difference in the attached screen shot. Margin widths still give the same spacings as at present.
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<style type="text/css">
.quote {
    margin:15px 10px;
    background: url([PLAIN]https://www.physicsforums.com/images/misc/q.gif)[/PLAIN]  0 0 no-repeat;
    padding-left:25px}
.smallfont
{
    color: #26353F;
    font: 10px verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif;
}
blockquote.bq {
    font: italic 10pt verdana, geneva, lucida;
    background: #dbdada;
    border-left:2px solid #cacaca;
    border-right:0px solid #81ba3c;
    border-top:0px solid #81ba3c;
    border-bottom:3px solid #cacaca;
    margin:0px;
    padding:5px}
</style>
<body>

<h3>Original version</h3>

<!-- Here is the advertisement -->

<span style="margin: 2px; float: right; width: 301px; height: 251px;">
<!-- =================== CODE FOR RECTANGLE  300x250 ============== -->
<!-- sylas commented out the script: <script  src="http://tag.contextweb.com/TagPublish/getjs.aspx?action=VIEWAD&cwrun=200&cwadformat=300X250&cwpid=####&cwwidth=300&cwheight=250&cwpnet=1&cwtagid=####"></script>--><div style="border: 1px black solid; width:300px; height: 251px;">This is text to use in place of the script that calls up something to get hold of an advertisement. The actual add comes with a background color, I think, which obscures the text underneath. I've added a border.</div></span>

<!-- Here is the post -->

<div id="post_message_6666">Prefix<br />
  <div style="margin:3px; margin-top:5px; ">
    <table cellpadding="6" cellspacing="0" border="0" width="100%">
    <tr>
        <td><div class="quote" style="margin-bottom:2px">
            <div class="smallfont" style="margin-bottom:2px">
                Originally Posted by <strong>PosterName</strong>
                <a href="showthread.php?p=6666#post6666" rel="nofollow"><img class="inlineimg" src="[PLAIN][PLAIN][PLAIN]https://www.physicsforums.com/Prime/buttons/viewpost.gif"[/PLAIN]   [/URL] border="0" alt="View Post" /></a>
            </div>
            <blockquote class="bq" style="font-style:italic">This is a bit of quoted text from the post linked just above, with the author indicated just above as well.</blockquote>
        </div></td>
    </tr>
    </table>
</div>This is a response to the first quoted portion, which sets the stage for the next bit.<br />

<div style="margin:3px; margin-top:5px; ">
    <table cellpadding="6" cellspacing="0" border="0" width="100%">
    <tr>
        <td><div class="quote" style="margin-bottom:2px">
            <div class="smallfont" style="margin-bottom:2px">
                Originally Posted by <strong>PosterName</strong>
                <a href="showthread.php?p=6666#post6666" rel="nofollow"><img class="inlineimg" src="[PLAIN][PLAIN][PLAIN]https://www.physicsforums.com/Prime/buttons/viewpost.gif"[/PLAIN]   [/URL] border="0" alt="View Post" /></a>
            </div>
            <blockquote class="bq" style="font-style:italic">This is another bit of quoted text, but this time it is a bit longer so that it spills over two lines at least.</blockquote>
        </div></td>
    </tr>
    </table>
</div>This is more response from the post, to finish up with an incisive contribution to the discussion that puts the two quoted extracts into context where they are immediately understood by everyone reading.</div>

<h3>Corrected version</h3>

<!-- Here is the advertisement -->

<span style="margin: 2px; float: right; width: 301px; height: 251px;">
<!-- =================== CODE FOR RECTANGLE  300x250 ============== -->
<!-- sylas commented out the script: <script  src="http://tag.contextweb.com/TagPublish/getjs.aspx?action=VIEWAD&cwrun=200&cwadformat=300X250&cwpid=####&cwwidth=300&cwheight=250&cwpnet=1&cwtagid=####"></script>--><div style="border: 1px black solid; width:300px; height: 251px;">This is text to use in place of the script that calls up something to get hold of an advertisement. The actual add comes with a background color, I think, which obscures the text underneath. I've added a border.</div></span>

<!-- Here is the post -->

<div id="post_message_6666">Prefix<br />
    <div class="quote" style="margin: 19px; margin-top: 25px; margin-bottom:12px">
            <div class="smallfont" style="margin-bottom:2px">
                Originally Posted by <strong>PosterName</strong>
                <a href="showthread.php?p=6666#post6666" rel="nofollow"><img class="inlineimg" src="[PLAIN][PLAIN][PLAIN]https://www.physicsforums.com/Prime/buttons/viewpost.gif"[/PLAIN]   [/URL] border="0" alt="View Post" /></a>
            </div>
            <blockquote class="bq" style="font-style:italic">This is a bit of quoted text from the post linked just above, with the author indicated just above as well.</blockquote>
</div>This is a response to the first quoted portion, which sets the stage for the next bit.<br />

<div class="quote" style="margin: 19px; margin-top: 25px; margin-bottom:12px">
            <div class="smallfont" style="margin-bottom:2px">
                Originally Posted by <strong>PosterName</strong>
                <a href="showthread.php?p=6666#post6666" rel="nofollow"><img class="inlineimg" src="[PLAIN][PLAIN][PLAIN]https://www.physicsforums.com/Prime/buttons/viewpost.gif"[/PLAIN]   [/URL] border="0" alt="View Post" /></a>
            </div>
            <blockquote class="bq" style="font-style:italic">This is another bit of quoted text, but this time it is a bit longer so that it spills over two lines at least.</blockquote>
</div>This is more response from the post, to finish up with an incisive contribution to the discussion that puts the two quoted extracts into context where they are immediately understood by everyone reading.</div>

</body></html>

The essential replacement is this only. Replace:
Code:
<div style="margin:3px; margin-top:5px; ">
    <table cellpadding="6" cellspacing="0" border="0" width="100%">
    <tr>
        <td><div class="quote" style="margin-bottom:2px">
            <div class="smallfont" style="margin-bottom:2px">
                Originally Posted by <strong>PosterName</strong>
with
Code:
<div class="quote" style="margin: 19px; margin-top: 25px; margin-bottom:12px">
            <div class="smallfont" style="margin-bottom:2px">
                Originally Posted by <strong>PosterName</strong>

The last two lines in the above extracts are identical, just given for context. The difference looks like this:
FixQuotes.JPG


The fix requirements for existing code should be very easy, I think, and it will let you put in more advertisements.

Cheers -- sylas
 
Last edited by a moderator:
tiny-tim said:
It's unlikely to happen in a first post, since the first post usually has nothing to quote.

It can of course happen in the 17th, 33rd, etc post … but the reader can always click the little arrow to see the original. :wink:

It happens only in the first post in the thread or top of the subsequent pages. Those are the only posts that have adverts in the right-hand corners. That's one reason why I log in every time I wander over here, so I can read the entirety of the top post. But then I miss out on the Physorg links, which I actually liked and didn't mind at all in the second post spot.

But, yeah. No, the adverts messing with the first post when you're not logged in and/or don't have a subscription isn't new.
 
sylas said:
you will once more be able to place an advertisement inside every post, which I believe was the case previously

Can't be, no more than 3 AdSense frames per page allowed by Google contract.
 
  • #10
Borek said:
Can't be, no more than 3 AdSense frames per page allowed by Google contract.

Ah... well there are comments associated with every post marked google_ad_section_start and google_ad_section_end. I guess they must be placeholders.

Still, I've given the bug fix, if programmers (hi chroot) would like to get rid of this behaviour some time.

Cheers -- sylas
 
Back
Top