I receive so many email requests on how to insert flash or iframes in Google Sites. I do not have time to answering them as I should also be working once in a while. So i’ve decided to write this short guide. Note: this page is outdated, but may still be of some use …
Nothing here is guaranteed to work. In fact most the xml examples here are mostly untested simplifications of some of my working code. If you want to comment on the examples then please use this thread.
The simplest example is to make an iframe gadget where the content is simply some web adress. The xml for such a gadget would look something like this:
<?xml version="1.0" encoding="UTF-8" ?> <Module> <ModulePrefs title="Iframe test" directory_title="iframe test" description="iframe" author="name" author_email="testing" author_link="http://www.glaciology.net" scrolling="true" category="funandgames"> </ModulePrefs> <Content type="url" href="http://news.google.com/news"/> </Module>
Very simple, right? I am sure that most of the ModulePrefs are not even necessary if you dont want to distribute the gadget.
Inserting the gadget in a Google Sites page.
So, you upload this gadget to a place on the web. And then you insert it on your GS-page [insert]-[more]-[Add by URL…].
Where to host the gadget?
If you have a public site then you also want to host it a public place. You’d think a filecabinet or as an attachment on a GS-page would be ideal, but unfortunately there is some weird redirection going on that hinders that. I think they may have fixed that though so you’ll have to experiment. I’ve been using google pages myself, but google is terminating google pages at the end of the year. You may want to host your gadget xml files on google code.
Flash gadget using Googles cache feature
The above example shows that you can easily add your own html. This can ofcourse be used to embed flash or other media. However, google has made it possible to use their servers to cache the flash files and thus reducing the load on the servers where the swf files are hosted. Nice right. You should really check the documentation for it though.