資訊科技‎ > ‎

google sites裡加入iframe 及Grooveshark音樂框架

張貼者:2009年12月10日 凌晨12:01未知的使用者   [ Bryan Fan 已於 2012年12月14日 凌晨12:22 更新 ]
自訂插入外部頁面的的IFRAME小工具   

http://jkfiledownload.googlecode.com/files/jkgsiframe.xml

程式碼如下:
按我

利用頁面中的插入==>更多小工具

最後成功範例


Iframe

找不到這個小工具說明網址


Grooveshark音樂框架

以下為區塊碼,今日推薦曲下游標點後,上功能鍵按html,尋找原始碼中"今日推薦曲"後,複製在它下面,然後再回到編輯頁面,點選區塊的內容編輯,將音樂網的碼複製到Embedding snippet:框內


<div style="text-align:center"><img src="https://www.google.com/chart?chc=sites&amp;cht=d&amp;chdp=sites&amp;chl=%5B%5BGoogle+%E5%B0%8F%E5%B7%A5%E5%85%B7%27%3D16%27f%5Cbf%5Chv%27a%5C%3D123%270%27%3D122%270%27dim%27%5Cbox1%27b%5CDBD9BB%27fC%5CDBD9BB%27eC%5C15%27sk%27%5C%5BEmbed+gadget%27%5Dh%27a%5CV%5C%3D12%27f%5Cbf%5C%5DV%5Cta%5C%3D124%27%3D0%27%3D123%27%3D37%27dim%27%5C%3D124%27%3D0%27%3D123%27%3D37%27vdim%27%5Cbox1%27b%5Cva%5CFFFEF0%27fC%5CDBD9BB%27eC%5Csites_gadget%27i%5Chv-0-0%27a%5C%5Do%5CLauto%27f%5C&amp;sig=-Y0oUYb1FwAP_EqeYYIrdrogE20" igsrc="http://14.gmodules.com/ig/ifr?mid=14&amp;synd=trogedit&amp;url=http%3A%2F%2Fwww.gstatic.com%2Fsites-gadgets%2Fembed%2Fembed.xml&amp;up_embed_snippet=%3Cobject%20width%3D%22250%22%20height%3D%2240%22%3E%3Cparam%20name%3D%22movie%22%20value%3D%22http%3A%2F%2Fgrooveshark.com%2FsongWidget.swf%22%20%2F%3E%3Cparam%20name%3D%22wmode%22%20value%3D%22window%22%20%2F%3E%3Cparam%20name%3D%22allowScriptAccess%22%20value%3D%22always%22%20%2F%3E%3Cparam%20name%3D%22flashvars%22%20value%3D%22hostname%3Dcowbell.grooveshark.com%26songIDs%3D22288999%26style%3Dmetal%26p%3D0%22%20%2F%3E%3Cembed%20src%3D%22http%3A%2F%2Fgrooveshark.com%2FsongWidget.swf%22%20type%3D%22application%2Fx-shockwave-flash%22%20width%3D%22250%22%20height%3D%2240%22%20flashvars%3D%22hostname%3Dcowbell.grooveshark.com%26songIDs%3D22288999%26style%3Dmetal%26p%3D0%22%20allowScriptAccess%3D%22always%22%20wmode%3D%22window%22%20%2F%3E%3C%2Fobject%3E%0A&amp;h=40&amp;w=250" type="ggs-gadget" props="align:center;borderTitle:Embed gadget;height:40;igsrc:http#58//14.gmodules.com/ig/ifr?mid=14&amp;synd=trogedit&amp;url=http%3A%2F%2Fwww.gstatic.com%2Fsites-gadgets%2Fembed%2Fembed.xml&amp;up_embed_snippet=%3Cobject%20width%3D%22250%22%20height%3D%2240%22%3E%3Cparam%20name%3D%22movie%22%20value%3D%22http%3A%2F%2Fgrooveshark.com%2FsongWidget.swf%22%20%2F%3E%3Cparam%20name%3D%22wmode%22%20value%3D%22window%22%20%2F%3E%3Cparam%20name%3D%22allowScriptAccess%22%20value%3D%22always%22%20%2F%3E%3Cparam%20name%3D%22flashvars%22%20value%3D%22hostname%3Dcowbell.grooveshark.com%26songIDs%3D22288999%26style%3Dmetal%26p%3D0%22%20%2F%3E%3Cembed%20src%3D%22http%3A%2F%2Fgrooveshark.com%2FsongWidget.swf%22%20type%3D%22application%2Fx-shockwave-flash%22%20width%3D%22250%22%20height%3D%2240%22%20flashvars%3D%22hostname%3Dcowbell.grooveshark.com%26songIDs%3D22288999%26style%3Dmetal%26p%3D0%22%20allowScriptAccess%3D%22always%22%20wmode%3D%22window%22%20%2F%3E%3C%2Fobject%3E%0A&amp;h=40&amp;w=250;mid:14;scrolling:no;showBorder:false;showBorderTitle:null;spec:http#58//www.gstatic.com/sites-gadgets/embed/embed.xml;up_embed_snippet:&lt;object width=&quot;250&quot; height=&quot;40&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http#58//grooveshark.com/songWidget.swf&quot; /&gt;&lt;param name=&quot;wmode&quot; value=&quot;window&quot; /&gt;&lt;param name=&quot;allowScriptAccess&quot; value=&quot;always&quot; /&gt;&lt;param name=&quot;flashvars&quot; value=&quot;hostname=cowbell.grooveshark.com&amp;songIDs=22288999&amp;style=metal&amp;p=0&quot; /&gt;&lt;embed src=&quot;http#58//grooveshark.com/songWidget.swf&quot; type=&quot;application/x-shockwave-flash&quot; width=&quot;250&quot; height=&quot;40&quot; flashvars=&quot;hostname=cowbell.grooveshark.com&amp;songIDs=22288999&amp;style=metal&amp;p=0&quot; allowScriptAccess=&quot;always&quot; wmode=&quot;window&quot; /&gt;&lt;/object&gt; ;width:250;wrap:false;" style="display:block;margin:5px auto;text-align:center;" class="igm" height="40" width="250">

Google 協作平台插入 Flash

所以像是 iframe、object、embed 都不行就是了。不過, 有一個方法可以騙過它...

  1. <iframe class=igm style="DISPLAY: block;  
  2.   MARGIN: 5px auto 5px 0px; TEXT-ALIGN: left"  
  3.   height=180 igsrc="http:///" width=400  
  4.   src="http://xxx.xxx.xxx/flash.swf" frameborder="0">  
  5. </iframe>  

關鍵就在 class=igm 及 igsrc="http:///" 的部分。Google 的協作平台, 是可以插入 widget 的。插入的內容就是 iframe。所以, 為了要識別是允許的項目, 插入的 iframe 就會包括上面那二組資訊。而我們只需要在加入的元件一樣加入相關的資訊, 就可以正常的顯示啦。

ċ
Bryan Fan,
2010年1月4日 上午8:11
ċ
Bryan Fan,
2011年7月28日 上午8:00
Comments