www.seety.org 昇級為 Plone 2.1 了,事實上是重建,所以許多舊有的資料還懶得搬過去;舊的 www.seety.org/seety.org 換了個名字 oracle.seety.org 繼續存活,這樣就不一定得遷移資料了,哈哈。

趁著轉移系統之便,就順手把以前想試的 adsense 加進去。從 linkmark 看到了一個簡單的 adsense portlet for Plone,不過它仍用 pre-2.1 的語法,所以 portlet 格式與 2.1 有點不相合。為德應卒,所以我就參考了 Plone 自己的 navigation tree portlet,改寫成 definition list (<dl />) 版的 portlet:

<html xmlns:tal="http://xml.zope.org/namespaces/tal"
      xmlns:metal="http://xml.zope.org/namespaces/metal"
      i18n:domain="plone">
<body>
<div metal:define-macro="portlet">
  <dl class="portlet" id="portlet-adsense">
    <dt class="portletHeader">
      advertisement
    </dt>

    <dd class="portletItemSingle">

<script type="text/javascript"><!--
google_ad_client = "pub-0677063667891579";
google_ad_width = 120;
google_ad_height = 600;
google_ad_format = "120x600_as";
google_ad_type = "text_image";
google_ad_channel ="";
google_color_border = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_link = "0000FF";
google_color_url = "008000";
google_color_text = "000000";
//--></script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

    </dd>
  </dl>
</div>
</body>
</html>

至於效果如何,請參考 seety

Posted by yungyuc at 16:19, 0 comment, 0 trackback.
Navigate
Add a trackback
Add a comment

Your name. (required)

Your personal website. (optional)

Your email address. Will not show in page. (suggested, but optional)

Text format is "Plain Text".

Enter "MLCQo"
© hover year to navigate month: powered by django