Flash chess PGN viewer through AMFPHP

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
ivancar

Flash chess PGN viewer through AMFPHP

Post by ivancar »

Hi all
I'm making a Flash PGN viewer for my chess club site. I'm using CMSMS. I plan to use PHP to parse the PGN file (portable game notation) like AMFPHP service for the swf board, so it could easily managed from inside the CMS. I think that could be a nice add-on. All PGN viewers actually are in java/javascript. I know actionscript but i'm a PHP beginner.
Anyone of you would be interested in this project?

here's a typical example of PGN:

[Event "4th match"]
[Site "London"]
[Date "1834.??.??"]
[Round "62"]
[White "McDonnell,A"]
[Black "De La Bourdonnais,L"]
[Result "0-1"]

1.e4 c5 2.Nf3 Nc6 3.d4 cxd4 4.Nxd4 e5 5.Nxc6 bxc6 6.Bc4 Nf6 7.Bg5 Be7 8.Qe2 d5 9.Bxf6 Bxf6 10.Bb3 O-O 11.O-O a5 12.exd5 cxd5 13.Rd1 d4 14.c4 Qb6 15.Bc2 Bb7 16.Nd2 Rae8 17.Ne4 Bd8 18.c5 Qc6 19.f3 Be7 20.Rac1 f5 21.Qc4+ Kh8 22.Ba4 Qh6 23.Bxe8 fxe4 24.c6 exf3 25.Rc2 Bc8 26.Bd7 Qe3+ 27.Kh1 f2 28.Rf1 d3 29.Rc3 Bxd7 30.cxd7 e4 31.Qc8 Bd8 32.Qc4 Qe1 33.Rc1 d2 34.Qc5 Rg8 35.Rd1 e3 36.Qc3 Qxd1 37.Rxd1 e2 0-1

thanks
sloop

Re: Flash chess PGN viewer through AMFPHP

Post by sloop »

ivancar,

you'd like to be able to maintain the PGN data through a page on the user side, or the admin site?

sloop
ivancar

Re: Flash chess PGN viewer through AMFPHP

Post by ivancar »

Hi sloop!

look at http://www.ivancar.com/treeclub


I'd like to maintain the pgn data stored in a MySql database too. Since every PGN can contain a variable number of chess game/openings/puzzles, would be a considerable delay to have all them stored in the swf, i think. The swf  could works like that:

1) a admin or a editor of the new page inserts the swf board and upload the related PGN file using the normal filemanager.

2) at the first execution a simple interface ask the name/apathof the pgn file (relative to "uploads" folder) and some few options to customize the board (color, hide solution ...etc). Then the variable of the name/path it's passed to a PHP script as service of AMFPHP gateway..

3) The PHP script create a index of the content of the pgn and store it in the database, then pass it back to the swf. This index its showed in the board like a list.

4) when a user  select one item from the list, the swf calls the php service that check if it exist in the records, if not parse the related content, send it back to the swf, and store it to the database.
Trough the swf the user can download the PGN.

that it's about all...

a lot of things to do, though  :)
Last edited by ivancar on Wed Mar 01, 2006 1:20 pm, edited 1 time in total.
chrizb

Re: Flash chess PGN viewer through AMFPHP

Post by chrizb »

Hi,

I would be interested. You can see that my phpchess site is up and running fine (including pgn elements) have a look at

http://www.phpchess.net
http://www.phpchess.net/phpchess  <- sample chess server using php

collaboration on this would benefit both, I guess. Let me know what you think
Kind regards
Christian
ivancar

Re: Flash chess PGN viewer through AMFPHP

Post by ivancar »

Hi Christian

You're welcome. We should just find the right way to communicate/collaborate.
I'll send you a email about that. Let me know your opinion..

best regards

Ivan
Post Reply

Return to “Developers Discussion”