如何在Google code项目页面上投放google adsense广告

1、先在本地创建一个xml文件,内容大致如下:

 

 

<?xml version="1.0" encoding="UTF-8"?>
<Module>
  <ModulePrefs 
    title="Example code.google.com Gadget"
    description="Demonstrates a gadget that lives happily on iGoogle, Google Code, and embedded on other web pages.">
    <Require feature="setprefs"/>
    <Require feature="dynamic-height"/>
  </ModulePrefs>
  <UserPref name="projectName" defaultvalue=""/>

  <Content type="html"><![CDATA[
 <table><tr><td>
<script type="text/javascript"><!--
google_ad_client = "ca-pub-6993130757086286";
/* 336x280, 创建于 09-6-9 */
google_ad_slot = "8556798497";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></td><td>
<script type="text/javascript"><!--
google_ad_client = "ca-pub-6993130757086286";
/* 336x280, 创建于 09-6-9 */
google_ad_slot = "8556798497";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></td><td>
<script type="text/javascript"><!--
google_ad_client = "ca-pub-6993130757086286";
/* 336x280, 创建于 09-6-9 */
google_ad_slot = "8556798497";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></td></tr></table>
]]>
</Content> 
</Module>

 

 

2、选择“DOWNLOADS” 标签页点击 【NEW DOWNLOAD】后上传第一步中创建的XML文件,然后在下载页面中右键复制文件URL;

 

3、在“ADMINISTER ” 标签中的Description中输入如下内容,其中的文件路径为上面说的URL。

 

<wiki:gadget url="http://cosplay.googlecode.com/files/GA_336x280.xml" up_projectName="support" width="100%" height="300" />

 

4、点保存后即可显示。附演示http://code.google.com/p/cosplay/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

jxjnice

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值