Results 1 to 6 of 6

Thread: Ads within first post

  1. #1
    Experienced vBulletin User wenchupover's Avatar
    Join Date
    Nov 2006
    Posts
    174

    Ads within first post

    At the moment I have google ads appearing within the first post, to the right, just as you do on these forums. It has been so long since I put that coding in that I forget what it is I need to do to have it viewable to ALL. At the moment the ads are only viewable by guests. Can someone tell me what I need to delete or edit please. Thanks guys.

    <if condition="(($post[postcount] % $vboptions[maxposts] == 1)) and ($show['guest'])">
    <span style="margin: 2px; float: right; width: 301px; height: 251px;">
    <script type="text/javascript"><!--
    google_ad_client = "pub-xxxxxxxxxxxxxxxx";
    /* 300x250, created 2/15/08 */
    google_ad_slot = "xxxxxxxxxx";
    google_ad_width = 300;
    google_ad_height = 250;
    //-->
    </script>
    <script type="text/javascript"
    src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
    </script></span>
    </if>

  2. #2
    vBFAQ Adminstrator Joeychgo's Avatar
    Join Date
    Jan 2005
    Location
    Chicago, IL
    Posts
    6,501
    eliminate the IF statements in the beginning and end.

    <if condition="(($post[postcount] % $vboptions[maxposts] == 1)) and ($show['guest'])">

    </if>

    Use the ad manager and you just need this:

    <script type="text/javascript"><!--
    google_ad_client = "pub-xxxxxxxxxxxxxxxx";
    /* 300x250, created 2/15/08 */
    google_ad_slot = "xxxxxxxxxx";
    google_ad_width = 300;
    google_ad_height = 250;
    //-->
    </script>
    <script type="text/javascript"
    src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
    </script>

  3. #3
    Experienced vBulletin User wenchupover's Avatar
    Join Date
    Nov 2006
    Posts
    174
    Thanks Joey

    I haven't in the past been able to use anything else much other than what I have when it comes to ads in the first post as anything else I do to achieve this messes with other hacks that I need to have for my particular forum.

  4. #4
    Experienced vBulletin User wenchupover's Avatar
    Join Date
    Nov 2006
    Posts
    174
    Quote Originally Posted by Joeychgo View Post
    eliminate the IF statements in the beginning and end.

    <if condition="(($post[postcount] % $vboptions[maxposts] == 1)) and ($show['guest'])">

    </if>
    I tried doing this and it messes up all other posts in the threads by having quote: in text, then a large gap before whatever was in the post. It was as if it was leaving a space in the position the ads in the first post held. Hope that made sense. Any advice?

    I wish I could use the ad manager but I run 3.6 still due to the amount of hacks I have and wish to keep. Anything else seems to mess with hacks I do have.

  5. #5
    vBFAQ Adminstrator Joeychgo's Avatar
    Join Date
    Jan 2005
    Location
    Chicago, IL
    Posts
    6,501
    You didnt tell me this was for 3.6
    To upgrade, You just have to update the hacks. Most hacks either were updated for 3.8x or already work with 3.8.



    Ok - try this:

    In postbit template replace

    PHP Code:
     <!-- message -->
      <
    div id="post_message_$post[postid]">$post[message]</div>
       <!-- / 
    message --> 
    with

    PHP Code:
    <!-- message -->
    <if 
    condition="(($post[postcount] % $vboptions[maxposts] == 1)) and ($show['guest'])">
    <
    span style="margin: 2px; float: right; width: 301px; height: 251px;">
            
    ADSENSE CODE HERE
    </span>
    </if>
        <
    div id="post_message_$post[postid]">$post[message]</div>
                  <!-- / 
    message --> 

    you will have to replace ADSENSE CODE HERE with the actual code.
    The code is for 300 * 250 Medium Rectangle Format,Edit width & height parameters if you want to use any other format.
    Ad is shown on the first and last post (modify if you want)
    Ad is shown to guests Only ( remove "and ($show['guest'])" to show to all)

  6. #6
    I thought they were usually the persons address number, anniversary or birthday.

Similar Threads

  1. How to put the avatars aside the post instead of above the post
    By ivankan in forum vBulletin Discussion and Questions
    Replies: 4
    Last Post: 07-21-2006, 07:15 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •