Chia Sẽ Kinh Nghiệm Về IT



Tìm Kiếm Với Google
-


Gởi Ðề Tài Mới  Gửi trả lời
 
Công Cụ Xếp Bài
Tuổi 14-08-2009, 10:58 AM   #1
hoctinhoc
Guest
 
Trả Lời: n/a
Setup - Một số cách chèn mã Google Adsense vào VBB
Setup - Một số cách chèn mã Google Adsense vào VBB

Mơi kiếm được cái GA nên tiện thể bày nhặt mấy cách chèn mã vào VBB cho ai có nhu cầu quan tâm

1. Đặt GA dưới menu
Vào Header, Chèn code GA xuống dưới dòng


Quote:
$_phpinclude_output



Quote:
<center>
<script type="text/javascript"><!--
google_ad_client = "pub-8408701883082973";
//728x90, dich vu web 27/12/2007
google_ad_slot = "0722353143";
google_ad_width = 728;
google_ad_height = 90;
google_cpa_choice = ""; // on file
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</center></template>


2. Adsense above Quick reply
template "SHOWTHREAD" tìm


Quote:
<if condition="$show['multiquote_global']">
<script type="text/javascript" src="clientscript/vbulletin_multi_quote.js?v=$vboptions[simpleversion]"></script>
<script type="text/javascript">
var mqlimit = $vboptions[mqlimit];
</script>
</if>

Thêm vào bên trên nó


Quote:
<!-- 728x90 Leaderboard below Thread above Quick Reply -->
<div style="border: 2px dashed rgb(11, 25, 140); padding: 8px; background: rgb(245, 245, 255) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; text-align: left; font-size: 80%;">
<center>
<!-- Google Adsense Leaderboard above Quick Reply start -->
<script type="text/javascript"><!--
google_ad_client = "pub-5988350962952956";
google_alternate_color = "F5F5FF";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
google_ad_channel = "0062568152";
google_color_border = "F5F5FF";
google_color_bg = "F5F5FF";
google_color_link = "000000";
google_color_text = "000000";
google_color_url = "000000";
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<!-- Google Adsense Leaderboard above Quick Reply end -->
</center>
</div><br />
<!-- 728x90 Leaderboard below Thread above Quick Reply -->

Tiếp tục tìm

Quote:
<if condition="$show['multiquote_global']">
<script type="text/javascript" src="clientscript/vbulletin_multi_quote.js?v=$vboptions[simpleversion]"></script>
<script type="text/javascript">
var mqlimit = $vboptions[mqlimit];
</script>
</if>
Thêm vào dưới nó



Quote:
<!-- 728x90 Leaderboard below Thread above Quick Reply -->
<table class="tborder" align="center" border="0" cellpadding="6" cellspacing="1" width="100%">
<tbody><tr>
<td class="thead" align="center">
<div class="normal">
&nbsp;
</div>
</td>
</tr>
<tr>
<td class="alt1" align="center">
<div>
<center>
<!-- Google Adsense Leaderboard above Quick Reply start -->
<script type="text/javascript"><!--
google_ad_client = "pub-5988350962952956";
google_alternate_color = "F5F5FF";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
google_ad_channel = "0062568152";
google_color_border = "F5F5FF";
google_color_bg = "F5F5FF";
google_color_link = "000000";
google_color_text = "000000";
google_color_url = "000000";
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<!-- Google Adsense Leaderboard above Quick Reply end -->
</center>
</div>
</td>
</tr>
</tbody>
</table>
<br />
<!-- 728x90 Leaderboard below Thread above Quick Reply -->

Lưu ý thay các đoạn code của GA bằng code GA của bạn và chọn màu cho phù hợp với forum




Increase Adsense above post reply
Increase Adsense above post reply

Go to --> showthread ---> find:
Quote:
<!-- / start content table -->
And below add:
Quote:
<table width="100%" border="0" align="center" cellpadding="0">
<tr>
<td bgcolor="#E0E0F6" scope="row">
<center><script type="text/javascript"><!--
google_ad_client = "pub-your id";
google_ad_width = 728;
google_ad_height = 15;
google_ad_format = "728x15_0ads_al";
google_color_border = "E1E4F2";
google_color_bg = "E1E4F2";
google_color_link = "22229C";
google_color_url = "226C22";
google_color_text = "000000";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></center>
</tr>
</table>

2. Adsense inside the post

In postbit template

Replace:

Quote:
!-- message -->
<div id="post_message_$post[postid]">$post[message]</div>
<!-- / message -->
With:

Quote:
<!-- 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)
Version History:
v 1.0.1 :Ads displayed after the first post on every page (instead of just the first page)

Theo: Admin (Hackingart)

  Trả lời ngay kèm theo trích dẫn này
Gửi trả lời



Quyền Hạn Của Bạn
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is Mở
Hình Cảm xúc đang Mở
[IMG] đang Mở
Mã HTML đang Tắt




Bây giờ là 12:31 AM. Giờ GMT +7



Diễn đàn tin học QuantriNet
quantrinet.com | quantrimang.co.cc
Founded by Trương Văn Phương | Developed by QuantriNet's members.
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.