• portfolio
  • flash
  • microbe
  • go
  • blog
  • contact

back to GOSWF page

How to include Goswf in a google site?

Google site creation step

  • create a google site.
  • click on More Actions/ Manage Site, and then click on Attachments.
  • upload goswf.swf (located in goswf.zip)
  • upload your game (for example "myGame.sgf")
  • In another browser window, check that http://sites.google.com/site/yourSiteName/goswf.swf correctly displays the GOSWF viewer. It's normal that no SGF game is displayed.

Customizing the Google gadget:

  • customize goswf_gadget.xml for your need:
    • line 3: [optional] default height and width
    • line 6: default Goswf URL (http://sites.google.com/site/yourSiteName/goswf.swf)
    • line 16: [optional] custom colors (see tutorial here).
  • save the file goswf_gadget.xml and upload it in the attachments of your Google site.

Create your page:

  • now, create a page on your Google site.
  • Type the title (for example page1) , click ok.
  • In the page editor, menu "Insert/More Gadgets..."
  • click on "Add gadget by URL"
  • type "http://sites.google.com/site/yourSiteName/goswf_gadget.xml"
  • if the "Add" button below is not active (it happens to me occasionally c ???), try renaming "google.com" in "googl.com", then correct it to "google.com" again: the "Add" button should now be active. Then click on "Add" !!
  • Now you can setup GOSWF for this page:
    • the "goswf file URL" should be correct if you wrote it correctly in the goswf_gadget.xml above. No need to change this parameter, then.
    • type the local path of the SGF : myGame.sgf if the game was uploaded at the root of the site, or page1/myGame.sgf if it was uploaded in page page1/.
    • you can change the dimensions, but it will apply only to this page. If you want dimensions applied to all pages of the site, it's better to set height and width in the goswf_gadget.xml.
  • click "ok" to save gadget settings.
  • save the page ("SAVE" in Google site toolbar )
  • voila, it's done! You have successfully set your first page up.

For subsequent pages:

  • create a new page (page2 for example)
  • upload the SGF file (myGame2.sgf) in the attachments for this page
  • in the parameters of the gadget, type page2/myGame2.sgf for the SGF url path.

Example:

This test site.

 

back to Tutorial list