adsense after 1 post and last post but not to show in one forum id=69

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Kristijan[cro]
    Member
    • Oct 2005
    • 52
    • 3.5.x

    adsense after 1 post and last post but not to show in one forum id=69

    <if condition="((($post[postcount]==1) or ($post[islastshown] and !$GLOBALS['vbulletin']->GPC['ajax'])) and $foruminfo['forumid'] != 69">
    <div align="center">
    <!-- START: Google Code -->
    <script type="text/javascript"><!--
    google_ad_client =
    google_ad_width = 728;
    google_ad_height = 90;
    google_ad_format = "728x90_as";
    google_ad_type = "text_image";
    //2007-04-24: forumdisplay_728
    google_ad_channel =
    google_color_border = "B4D0DC";
    google_color_bg = "ECF8FF";
    google_color_link = "0000CC";
    google_color_text = "6F6F6F";
    google_color_url = "008000";
    //-->
    </script>
    <script type="text/javascript"
    src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
    </script>
    <!-- END: Google Code -->
    </div></if>



    anybody knwos why this not working

    2 if is the problem

    when i put just this <if condition="$foruminfo['forumid'] != 69"> it works, adsense are not shown in that forum

    but when i put this <if condition="(($post[postcount]==1) or ($post[islastshown] and !$GLOBALS['vbulletin']->GPC['ajax']))">
    <if condition="$foruminfo['forumid'] != 69">


    not working?
  • Kristijan[cro]
    Member
    • Oct 2005
    • 52
    • 3.5.x

    #2
    i also try this and doesnt work

    <if condition="(($post[postcount]==1) or ($post[islastshown] and !$GLOBALS['vbulletin']->GPC['ajax']))">
    <!-- adsence block start -->
    <if condition="!in_array($forumid, array(69))">
    <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
    <tbody>
    <tr>
    <td class="tcat">
    </td>
    </tr>
    <tr>
    <td class="alt1">
    <!-- code start -->
    <center>
    <script type="text/javascript"><!--
    google_ad_client =
    google_ad_width = 728;
    google_ad_height = 90;
    google_ad_format = "728x90_as";
    google_ad_type = "text_image";
    //2007-04-24: forumdisplay_728
    google_ad_channel = "2541613169";
    google_color_border = "B4D0DC";
    google_color_bg = "ECF8FF";
    google_color_link = "0000CC";
    google_color_text = "6F6F6F";
    google_color_url = "008000";
    //-->
    </script>
    <script type="text/javascript"
    src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
    </script>
    </center>
    <!-- code end -->
    </td>
    </tr>
    </tbody>
    </table>
    <br />
    </if>
    <!-- /adsence block end --></if>

    Comment

    • Colin F
      Senior Member
      • May 2004
      • 17689

      #3
      Try breaking that conditional apart and see which of those three elements makes it not work.
      Best Regards
      Colin Frei

      Please don't contact me per PM.

      Comment

      • Kristijan[cro]
        Member
        • Oct 2005
        • 52
        • 3.5.x

        #4
        this work <if condition="(($post[postcount]==1) or ($post[islastshown] and !$GLOBALS['vbulletin']->GPC['ajax']))">



        and solo this work <if condition="$foruminfo['forumid'] != 69">


        but together the problem is showning to the forum id=69 it works but show to forum id=69

        Comment

        • Colin F
          Senior Member
          • May 2004
          • 17689

          #5
          In post #2 you said that the longer conditional alone doesn't work?
          Best Regards
          Colin Frei

          Please don't contact me per PM.

          Comment

          • Tannim
            Member
            • Mar 2007
            • 34

            #6
            I am interested in the answer to this as well. As I am looking to adding adsense in such a way in my forums.

            Comment

            • Kristijan[cro]
              Member
              • Oct 2005
              • 52
              • 3.5.x

              #7
              i am sorry it works but not works, it showning in forum id=69

              i want not to sho

              Comment

              • Kristijan[cro]
                Member
                • Oct 2005
                • 52
                • 3.5.x

                #8
                i want google adsense to show after 1 post, and last post, on every page, and except one forum id=69 thats all?

                Comment

                • Colin F
                  Senior Member
                  • May 2004
                  • 17689

                  #9
                  Try combining them to one conditional:

                  <if condition="(($post[postcount]==1) or ($post[islastshown] and !$GLOBALS['vbulletin']->GPC['ajax'])) AND $foruminfo['forumid'] != 69">
                  Best Regards
                  Colin Frei

                  Please don't contact me per PM.

                  Comment

                  • Kristijan[cro]
                    Member
                    • Oct 2005
                    • 52
                    • 3.5.x

                    #10
                    its working but also show in forum id=69

                    Comment

                    • John the Artist
                      New Member
                      • Jun 2005
                      • 4
                      • 3.0.7

                      #11
                      Where are you placing this code? Somewhere in SHOWTHREAD?

                      =)

                      Comment

                      • Kristijan[cro]
                        Member
                        • Oct 2005
                        • 52
                        • 3.5.x

                        #12
                        nou

                        postbit

                        Comment

                        • peterska2
                          Senior Member
                          • Oct 2003
                          • 8869
                          • 3.7.x

                          #13
                          With a conditional, if the whole thing works as separates, but does not works as a whole, then more brackets to split it up are normally the solution.

                          try this, which has more brackets.

                          <if condition="(($post[postcount]==1) or ($post[islastshown] and !$GLOBALS['vbulletin']->GPC['ajax'])) AND ($foruminfo['forumid'] != 69)">

                          Comment

                          • Kristijan[cro]
                            Member
                            • Oct 2005
                            • 52
                            • 3.5.x

                            #14
                            do u know how can i instead of X enter forum ID to only show to this forum

                            example: i want to show adsense only to forum ID 88, not to other forums, in other forums i want to put something else. its easier instead X put just one ID then to put all others ID from rest forum category ( i have 100 forum categorys )

                            just code for that, not to show to the guests, first post...just for this thanks

                            Comment

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