Well, I have done it. Now I will try to explain how you can do the same. I remember that I had some problems to implement it myself. Mostly because I was not sure how the whole process works. After some trial and error I figured it out.
I found my first clues on the Eidogo homepage. This information is probably enough if you have a single copy of the board on your personal homepage. This description is not really enough if you want several boards with different games on your blog. At least not to my experience.
So this is how I did...
First we want to add the eidogo javascript to the blog. The first you might thing of is to add it to the html part of your post. That doesn't work for more than one board and post. Instead you want to add it to the header so it is included only once for your whole blog. Then you will never have to do this part again.
So go to the Layout section of your blog and click on Edit HTML. Maybe you already have done some of your own cusomizations there. At least I've made a lot of them. Before you start you want to do a backup of your template if you by mistake break anything. Then you can do your changes.
Down there in the later parts of the code you will see a row saying:
</head>
Just above this line you add:
<script src='http://eidogo.com/player/js/all.compressed.js' type='text/javascript'/>
Then save the template.
The next step you need to do for every blog post you want to add a weiqi board to. So you start writing a new blog entry. Write any free text and when it is time for your Eidogo board you hit Edit HTML.
Where you want to have your board you enter the text:
<div class="eidogo-player-auto">
(;GM[1]FF[4]CA[UTF-8]AP[CGoban:3]ST[2]
RU[Chinese]SZ[19]KM[7.50]
PW[Boywing]PB[Juãn]WR[5k]BR[4k]RE[W+Resign]
;B[dp]
;W[qp]
;B[dd]
;W[pd]))
</div>
The red code in the middle between the div-lines is the content of an sgf-file. Mine here only have four moves. You can use a complete game of course.
Notice that it doesn't work to preview your post...
Now publish your post and you will see something like this!
(;GM[1]FF[4]CA[UTF-8]AP[CGoban:3]ST[2]
RU[Chinese]SZ[19]KM[7.50]
PW[Boywing]PB[Juãn]WR[5k]BR[4k]RE[W+Resign]
;B[dp]
;W[qp]
;B[dd]
;W[pd]))
8 comments:
Hi. This is Biondy from GD.
Thank you for the information. It works :)
Also wanted to thank you for your howto, works great. - AmbyR00 @ KGS
Trying to post a game of mine from this file. It is from a game of go that I played on my phone but it does not seem to work. I followed the examples, so I am sending you everything that is inside the sgf file. Maybe you can get it to work or tell me why it is not working and how I can solve this problem. Thx:
(;GM[1]FF[4]
SZ[19]
GN[GNU Go @VERSION@ load and print]
DT[2010-08-26]
KM[5.5]HA[0]RU[Japanese]AP[GNU Go:@VERSION@]AW[ea][ga][ia][eb]
[fb][hb][ec][hc][pc][fd][gd][ld][ee][qe][cf][df][ef][ag][bg][cg]
[ch][qh][di][ei][ki][li][mi][ni][aj][dj][kj][nj][ck][ek][hk][ik]
[jk][mk][nk][ok][al][bl][cl][dl][el][gl][ml][ol][bm][cm][fm][gm]
[nm][om][cn][dn][en][nn][pn][qn][do][no][ro][dp][ep][rp][eq][fq]
[rq][sq][sr]
AB[da][db][dc][dd][ed][be][ce][de][af][bf][ah][bh][dh][bi][ci]
[cj][ej][lj][mj][ak][bk][kk][lk][hl][il][jl][ll][am][hm][lm][mm]
[an][bn][fn][gn][in][mn][on][bo][co][eo][fo][ho][mo][oo][po][qo]
[cp][fp][mp][np][op][qp][dq][gq][hq][mq][oq][qq][dr][er][fr][ir]
[lr][or][pr][rr][gs][hs][ms][ns][ps][rs][ss]
PL[B]IL[fa][ha][dk][nl]
)
@Mavlock: Your file is only a description of how the board looks after the last stone is played, not how each move was played to get to this position.
Look at your file and locate AW. That is the command "Add White" and after that you can see coordinates to where all the white stones are. Later you see AB for "Add Black" and the cordinates for all the black stones.
You can not see in what order they were placed. In my short example you can see in what order they were played and the coordinates.
;B[dp]
;W[qp]
;B[dd]
;W[pd]
So you exported the sgf in the wrong way. Maybe you used some kind of print function? See if you can use save or save as. That might work better.
Thanks. I got the player to somewhat work, lol. The only issue now is that I have to click like 5 times for every move and like 10 times to start the game. Thanks a lot for the help.
No mean to nag but I finally got it to work perfectly. Thanks a lot for the help. Now I can focus on my game! ^^
Googling how to do just this, and your post popped up. Just letting you know, it's still helping; helped me, anyways.
3 years later,
still works :)
Thanks
Costel
Post a Comment