Announcement

Collapse
No announcement yet.

My advertisements are killing my WYSIWYG.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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?

  • #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


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

      Comment


      • #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


        • #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


          • #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


            • #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, 11:28pm.

              Comment


              • #8
                I believe gear is correct in this case

                Comment


                • #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


                  • #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


                    • #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


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

                        Comment


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

                          Comment


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

                            Comment


                            • #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...
                              X