vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=192)
-   -   Forum Display Enhancements - Adsense after first post in postbit_legacy (https://vborg.vbsupport.ru/showthread.php?t=130081)

vietfancy 10-26-2006 10:00 PM

Adsense after first post in postbit_legacy
 
this is how it going to look like:


if you want to have the same thing:

add this code at the end of your "postbit_legacy" template

Code:


<!-- Start Google Ads -->
<if condition="$show['registerbutton']">
<if condition="!$GLOBALS['FIRSTPOSTID']">
<div style="padding-top: 6px;"></div>
<table id="post$post[postid]" class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center">
        <tr>
                <td class="thead" style="font-weight:normal; border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]" colspan="2">       
        Sponsored Links
            </td>

        </tr>
<tr valign="top">
                <td class="alt2" width="175" style="border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]; border-top: 0px">
           
                        <div id="postmenu_$post[postid]" align="center">
                                <a class="bigusername" href="#">inHandy.com</a>
                        </div>
               
            </td>

        <td class="alt1" id="td_post_$post[postid]" style="border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]; border-top: 0px; border-left: 0px">

           
            <if condition="$show['messageicon'] OR $post['title']">
            <div class="smallfont">
                <if condition="$post['title']"><strong>Sponsored links</strong></if>
            </div>
            <hr size="1" style="border-top: 1px #ff6e45 dotted"; />
        </if>
       
                <!-- message -->
                <div id="post_message_$post[postid]">
<table>
<tr align=center>
<td align=center>
<script type="text/javascript"><!--
google_ad_client = "pub-XXXXXXXXXXXXXXXX";
google_ad_width = 300;
google_ad_height = 250;
google_ad_format = "300x250_as";
google_ad_type = "text_image";
google_ad_channel = "";
google_color_border = "336699";
google_color_bg = "FFFFFF";
google_color_link = "0000FF";
google_color_text = "000000";
google_color_url = "008000";
//--></script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</td>
&nbsp;
<td align=center>
<script type="text/javascript"><!--
google_ad_client = "pub-XXXXXXXXXXXXXXXX";
google_ad_width = 300;
google_ad_height = 250;
google_ad_format = "300x250_as";
google_ad_type = "text_image";
google_ad_channel = "";
google_color_border = "336699";
google_color_bg = "FFFFFF";
google_color_link = "0000FF";
google_color_text = "000000";
google_color_url = "008000";
//--></script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</td>
</tr>
</table>

                </div>
                <!-- / message -->     
                <!-- sig -->
                        <div>
                                __________________<br />
                                This is a revenue sharing forum.<br />
Please <a href="login.php"><strong>log-in</strong></a> or <a href="register.php"><strong>register</strong></a> now to hide these posts.
                        </div>
<br />
                <!-- / sig -->
 
       
  </td>     


        </tr>
</table>
</if>
</if>
<!-- End Google Ads -->

The codes above is only show ads to guests. if you want to have ads visible to everyone then use this instead

Code:


<!-- Start Google Ads -->

<if condition="!$GLOBALS['FIRSTPOSTID']">
<div style="padding-top: 6px;"></div>
<table id="post$post[postid]" class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center">
        <tr>
                <td class="thead" style="font-weight:normal; border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]" colspan="2">       
        Sponsored Links
            </td>

        </tr>
<tr valign="top">
                <td class="alt2" width="175" style="border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]; border-top: 0px">
           
                        <div id="postmenu_$post[postid]" align="center">
                                <a class="bigusername" href="#">inHandy.com</a>
                        </div>
               
            </td>

        <td class="alt1" id="td_post_$post[postid]" style="border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]; border-top: 0px; border-left: 0px">

           
            <if condition="$show['messageicon'] OR $post['title']">
            <div class="smallfont">
                <if condition="$post['title']"><strong>Sponsored links</strong></if>
            </div>
            <hr size="1" style="border-top: 1px #ff6e45 dotted"; />
        </if>
       
                <!-- message -->
                <div id="post_message_$post[postid]">
<table>
<tr align=center>
<td align=center>
<script type="text/javascript"><!--
google_ad_client = "pub-XXXXXXXXXXXXXXXX";
google_ad_width = 300;
google_ad_height = 250;
google_ad_format = "300x250_as";
google_ad_type = "text_image";
google_ad_channel = "";
google_color_border = "336699";
google_color_bg = "FFFFFF";
google_color_link = "0000FF";
google_color_text = "000000";
google_color_url = "008000";
//--></script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</td>
&nbsp;
<td align=center>
<script type="text/javascript"><!--
google_ad_client = "pub-XXXXXXXXXXXXXXXX";
google_ad_width = 300;
google_ad_height = 250;
google_ad_format = "300x250_as";
google_ad_type = "text_image";
google_ad_channel = "";
google_color_border = "336699";
google_color_bg = "FFFFFF";
google_color_link = "0000FF";
google_color_text = "000000";
google_color_url = "008000";
//--></script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</td>
</tr>
</table>

                </div>
                <!-- / message -->           
  </td>     


        </tr>
</table>
</if>

<!-- End Google Ads -->


Remember to replace pub-XXXXXXXXXXXXXXXX with your id #

Selene 10-27-2006 08:39 AM

Is it allowed to do ? according to google TOS

Rich 10-27-2006 10:33 AM

Selene,

READ Googles TOS! He just released this, so he is either assuming it does, or he doesn't care and posted it anyways. Its YOUR responsibility to know what you can and cant add on your site in reference to google. Someone telling you the wrong thing can kill your account. Do the research.

Selene 10-27-2006 11:46 AM

Rich, ok thanks for ur reply. So can u kindly read it and let me know :lol:

canpare 10-27-2006 12:04 PM

thanks. installed...

Frapegliko 10-27-2006 12:36 PM

cool thank u

vietfancy 10-27-2006 12:50 PM

Quote:

Originally Posted by Selene
Is it allowed to do ? according to google TOS

I believe they allowed us to do this as long as your ads shows as ads. Good luck :laugh:

AMG021 10-27-2006 01:55 PM

Thanks

AMG021 10-27-2006 04:18 PM

It is possible to set this by usergroup ?

ChavMagnet 10-27-2006 05:34 PM

Already been released about a week ago https://vborg.vbsupport.ru/showthread.php?t=129449


All times are GMT. The time now is 10:02 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01043 seconds
  • Memory Usage 1,759KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete