Quick Reply Bug?!?! (Adsense) - HELP!

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Dannyloski
    Member
    • Jun 2006
    • 53

    Quick Reply Bug?!?! (Adsense) - HELP!

    Alright guys, so I believe I found a bug (if that's what it would be called, I dunno) in the Quick Reply feature of vB 3.6.7 PL1 (maybe on other versions as well, I have no idea). Before I go on and explain it, I want to make note that it only occurs on FireFox, but on Internet Explorer the problem does not occur (I have not tested other browsers, so I don't know if others show or don't show the problem).

    Now, I had recently added Adsense to my forums, so that it would display after the first post of each page, using the Tutorial here on vB.com (LINK). The <if> statement I used is below, as shown on the Tutorial page.

    Code:
    <if condition="$post[postcount] % $vboptions[maxposts] == 1">
    Here is where it gets tricky. I currently have my forum setup so that it shows 15 Posts per Thread Page. So lets say that I have a thread already that has 15 posts, when I go to post the 16th post via Quick Reply after clicking on the "Post Quick Reply" button is when the error occurs. Here's the error: I receive a blank page. Before the blank page is displayed, I see the "Posting Quick Reply - Please Wait" message under the Quick Reply Box and the page does the refresh (to display the actual reply), the background loads and it looks like its about to load the rest of the page, but then it all goes blank into a white page with nothing on it. If I hit refresh, then it'll display the page like normal.

    After doing some digging, I found out that the cause of the error is due to the Adsense Code. I'm guessing when the post gets added its trying to load the Adsence Script as well, since it would be the start of a New Thread Page as it's post 16 and below it must be an Adsence Code due to the conditional, but while loading the Code it freezes and causes me to get a blank page (again, this is only on FireFox). If I replace the Adsense Code with plain text (such as "Testing" for example) and do a Quick Reply as post 16, then the page loads fine and I do not get a blank page on FireFox.

    Can anyone enlighten me, on why this is happening on FireFox and is there a way that I can get around it so that this conditional works in FireFox without me getting the blank page?

    I know that this might have nothing to do with vB itself as its more of FireFox's Bug or Google Adsense's "faulty" script (Blaming can go on and on, I just want some help from you guys), but maybe I can do something in vB so that it fixes it. Any suggestions are welcome. Thanks.

    Regards,
    Danny

    PS. Oh, if I do a reply via the "Post Reply" button I do not get the blank page ... The blank page is only displayed when using the Quick Reply as post 16 (or 31, or 46, or 61, etc) in a thread when using FireFox as the Browser.
  • Smoothie
    Senior Member
    • Oct 2001
    • 250

    #2
    It's been a known issue for quite some time.

    Comment

    • Dannyloski
      Member
      • Jun 2006
      • 53

      #3
      Oh really? LMAO ... I did not know, thanks for pointing it out, how long has it been "known" for? Has there been any "fixes" or something to prevent this from occuring?

      Comment

      • Dannyloski
        Member
        • Jun 2006
        • 53

        #4
        Anyone care to help?? I did some searching and found out it's due to AJAX in the QuickReply, but I cannot find a solution for the Adsense After First Post ... There is only a solution for Adsense After Last Post ... Can anyone please help me out? Thanks ...

        Comment

        • Dannyloski
          Member
          • Jun 2006
          • 53

          #5
          Well I figured it out, since apparently no one cared to help me out ... thanks for viewing the thread and not posting anything ... that's really great support and help guys ...

          Anyways, for those who might still have this issue happening on their forums and want to have Adsense Banners shown after the First Post of every Thread Page insert the following as your <if> statement ...

          Code:
          <if condition="(($post[postcount] % $vboptions[maxposts] == 1 AND !$GLOBALS['vbulletin']->GPC['ajax']))">

          Comment

          • Smoothie
            Senior Member
            • Oct 2001
            • 250

            #6
            I've decide to take a different approach to solve the ajax problem. Instead of having adsense after the first post, I integrated into the top of the first post. Additionally, I integrated adsense into the bottom of the last post, but will only show if there is more than 1 post, and only show in non-private forums (where xx is the forum id) using this:

            Code:
            <if condition="THIS_SCRIPT == 'showthread' AND $post['islastshown'] and !$GLOBALS['vbulletin']->GPC['ajax'] AND $post[postcount]!=1 AND !in_array($forum[forumid], array(xx,xx))">

            Comment

            • Dannyloski
              Member
              • Jun 2006
              • 53

              #7
              ^ Pretty cool, thanks for replying ... I just wanted it to show after the first post of each thread, and didnt want to place it anywhere else (at the end of the last post, on top of the first post, etc.) ... So I tried some conditionals, until I found then !$GLOBALS['vbulletin']->GPC['ajax'] one that helps get rid of the problem. That way I can keep it like I want without the problem. Thank for your's though, might help others who are looking into doing something like that ...

              Comment

              • woodysfj40
                Senior Member
                • May 2004
                • 144
                • 3.8.x

                #8
                thanks....that fixed the bug i was having as well....gotta love SEARCH!!

                Comment

                widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                Working...