My advertisements are killing my WYSIWYG.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Trickyphillips
    Member
    • Mar 2005
    • 31
    • 3.0.7

    My advertisements are killing my WYSIWYG.

    I'm running text ads on my website, and sometimes they seem to be in a continuous "loading" state, which leaves the WYSIWYG locked. Is there any place that I can put the ads so they won't show up on newthread.php or newreply.php?
  • Floris
    Senior Member
    • Dec 2001
    • 37767

    #2
    You can put this around your ads code in the template
    Code:
    <if condition="THIS_SCRIPT != 'newthread' OR THIS_SCRIPT != 'newreply'">
    Your ads code goes here
    </if>
    it will then only show on a page if the page isn't build from newthread.php or newreply.php

    Comment

    • Gearloose
      Member
      • Mar 2005
      • 66

      #3
      Floris, don't you think that it sould be AND instead of OR in the condition?

      Comment

      • Trickyphillips
        Member
        • Mar 2005
        • 31
        • 3.0.7

        #4
        Thanks, both of you.



        To anyone else that needs this script: Don't forget to add "AND
        THIS_SCRIPT != 'editpost'", so you won't have the problem while editing
        posts.

        Comment

        • Zachery
          Former vBulletin Support
          • Jul 2002
          • 59097

          #5
          A page can't be both.

          gear, using and would make that conditional fail 100% of the time

          everypage would be not a AND not b

          Comment

          • Matthew Gordon
            Senior Member
            • May 2002
            • 3243
            • 1.1.x

            #6
            Originally posted by Zachery
            A page can't be both.

            gear, using and would make that conditional fail 100% of the time

            everypage would be not a AND not b
            However, the code is checking whether or not the page isn't something. Using OR makes the condition true all the time.

            Comment

            • Gearloose
              Member
              • Mar 2005
              • 66

              #7
              Let's see...

              The problem:
              they won't show up on newthread.php or newreply.php

              Your solution (using OR): condition="THIS_SCRIPT != 'newthread' OR THIS_SCRIPT != 'newreply'"
              THIS_SCRIPT=newthread ==> false OR true ==> true ==> it shows the ads (we don't want this)
              THIS_SCRIPT=newreply ==> true OR false ==> true ==> it shows the ads (we don't want this)
              THIS_SCRIPT=anything_else ==> true OR true ==> true ==> it shows the ads (OK HERE!!!)

              My solution (using AND): condition="THIS_SCRIPT != 'newthread' AND THIS_SCRIPT != 'newreply'"
              THIS_SCRIPT=newthread ==> false AND true ==> false ==> it don't shows the ads (OK HERE!!!)
              THIS_SCRIPT=newreply ==> true AND false ==> false ==> it don't shows the ads (OK HERE!!!)
              THIS_SCRIPT=anything_else ==> true AND true ==> true ==> it shows the ads (OK HERE!!!)

              Am I evaluating something wrong?
              Last edited by Gearloose; Wed 15 Jun '05, 10:28pm.

              Comment

              • xmitchx
                Senior Member
                • May 2004
                • 257
                • 3.8.x

                #8
                I believe gear is correct in this case

                Comment

                • Dream
                  Senior Member
                  • Mar 2001
                  • 1898
                  • 3.6.x

                  #9
                  Code:
                  <if condition="THIS_SCRIPT != 'newthread' AND THIS_SCRIPT != 'newreply' 
                  AND THIS_SCRIPT != 'editpost'">
                  
                  </if>
                  it is. very useful anyway.
                  Radio and TV Player for vBulletin

                  Comment

                  • Matthew Gordon
                    Senior Member
                    • May 2002
                    • 3243
                    • 1.1.x

                    #10
                    Let me be a smartass and use in_array.

                    Code:
                    <if condition="!in_array(THIS_SCRIPT, array('newthread', 'newreply', 'editpost'))">
                    Stuff Here
                    </if>

                    Comment

                    • darnoldy
                      Senior Member
                      • Oct 2004
                      • 117

                      #11
                      Originally posted by squall14716
                      Let me be a smartass and use in_array.\
                      I hereby declare Squall the winner--not only is it more concise, but its more-easily editable.

                      --don
                      --don

                      Comment

                      • Zachery
                        Former vBulletin Support
                        • Jul 2002
                        • 59097

                        #12
                        Thus I am the winner for suggesting it to him!

                        Comment

                        • Trickyphillips
                          Member
                          • Mar 2005
                          • 31
                          • 3.0.7

                          #13
                          Originally posted by Zachery
                          Thus I am the winner for suggesting it to him!
                          I'm the winner, for posting the question.

                          Comment

                          • grundybin
                            Member
                            • Mar 2005
                            • 31

                            #14
                            OMG, you people are all so clever, you all need a hug
                            Luke
                            Cheap Web Hosting

                            Comment

                            • Mike Sullivan
                              Former vBulletin Developer
                              • Apr 2000
                              • 13327
                              • 3.6.x

                              #15
                              This probably isn't a problem in the new editor, BTW. I'm guessing it had to do with onload events, which we don't use anymore.

                              Comment

                              Related Topics

                              Collapse

                              Working...