GOSWF (c)gludion.com 2008 (Olivier Besson olive@gludion.com) Contents: - Questions & answers - HTML example - use Goswf in phpBB3 forum ____________________________________________________________________ VERSION 0.7 ____________________________________________________________________ New features: - graphics slightly different: 2 interface colors instead of 3 (it's more simple to adapt to a website, but I should also add text color parameter some day). - minor bug fixes - if the SGF can't load properly, Goswf displays a text explaining the possible causes (because many people have problem seeing sgf if they are not logged, or if they try to use it with a sgf located on another server). - in case of tsumego problems, possible variations are not displayed on the board by default. As a result, the user can play "guess next move". I detect this if the game has an initial stones setup, and if there are variations right from the stard (but I cant distingish between the correct solution and a wrong move). ____________________________________________________________________ QUESTIONS & ANSWERS: ____________________________________________________________________ Q: what has to be uploaded on my site? A: only the file "goswf.swf" has to be uploaded. You may put it in a custom sub-directory relative to your html page, but then update the EXAMPLE below accordingly ("movie" in OBJECT tag, "src" in EMBED tag). Example: (OBJECT) src="mysubdirectory/goswf.swf" (EMBED) Q: how to pass SGF url? A: edit in tag AND add param="url=motoki2.sgf" in tag Just replace "motoki2.sgf" with the name of your file. CAUTION 1: It is better to use an absolute path for the SGF url (eg: http://...) If you use a relative path, it should be relative to the goswf.swf file location (which can be different from the HTML page location). CAUTION 2: Because of flash player security issues, you cannot load a SGF located on another server. That is: www.mySite.com/goswf.swf cannot load www.anotherSite.com/someGame.sgf Q: My sgf doesn't display: why? A: the possible causes: - the sgf source file doesn't exist - url has not been specified in AND tags (see example) - the url is incorrect - the sgf source file is not a proper SGF, but a HTML error page (user not registered, error 404, etc..) - the sgf is correct, but located on a different server. Click in GOSWF viewer, + type SPACE and D keys simultaneously to open debug console and see what URL and SGF data GOSWF actually received. Q: How to customize colors? A: Currently, there are only 2 customizable colors: - c0 button color - c1 comment zone, help zone (and also white player background) - c2 bottom toolbar background (and also black player background) See the example below to see how to pass the color: in tag AND add param="c0=#83E9F3&c1=#E8F3FD&c2=#16AAD9&url=motoki2.sgf" in tag If no color is specified, GOSWF will keep the default colors (orange/brown theme). Q: Can I change the size of the viewer? A: Yes, but do it in both and tags (see example). Try to keep the same ratio (640/480 = 4/3) Q: While GOSWF loads, the background color is white, can I change it? A: change the bgcolor in OBJECT and EMBED tags. ____________________________________________________________________ HTML EXAMPLE ____________________________________________________________________ goswf example
____________________________________________________________________ USE GOSWF in PHPBB3 FORUM ( thanks to covay.org) ____________________________________________________________________ ## Title: view kifu with goswf.swf on forum PHPBB3 ## Author goswf.swf : Olivier Besson olive@gludion.com ## Author Mod view kifu with goswf.swf on forum PHPBB3: hikaru- website covay.org , email: covay.org@gmail.com Country: Vietnam. Thanks to Olivier Besson. ## Description: Allows users view kifu on forum PHPBB3 To require: web of users use flash player v8.0 ## Installation Level: Easy ## Installation Time: 1 minutes ## ## Files To Edit: 3 ## include/functions_content.php ## styles/prosilver/template/attachment.htm ## styles/subsilver2/template/attachment.htm Upload forum/goswf.swf #-----[ OPEN ]--------------------- # forum/include/functions_content.php # #-----[ FIND ]---------------------- $block_array += array( 'S_FILE' => true, ); #-----[In this code find]---------------- $block_array += array( #-----[ AFTER, ADD ]---------------- 'S_SGF' =>($attachment['extension'] == 'sgf') ? true : false, #-----[ OPEN ]--------------------- forum/styles/prosilver/template/attachment.htm #-----[ FIND ]---------------------- {_file.DOWNLOAD_NAME} [ {_file.FILESIZE} {_file.SIZE_LANG} | {_file.L_DOWNLOAD_COUNT} ]

#-----[ AFTER, ADD ]---------------- #-----[ OPEN ]--------------------- forum/styles/subsilver2/template/attachment.htm #-----[ FIND ]---------------------- {_file.UPLOAD_ICON} {_file.DOWNLOAD_NAME} [{_file.FILESIZE} {_file.SIZE_LANG}]
#-----[ AFTER, ADD ]---------------- #-----[ SAVE/CLOSE ALL FILES ]------ Login Admin CP: Allows users upload file .sgf # EoM