如何在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/

猜你喜欢

转载自jxjnice.iteye.com/blog/1576421