Latest Updates:
Page Index Toggle Pages: 1 2 3 [4] 5 6 
Topic Tools
Very Hot Topic (More than 25 Replies) How to insert playable PGN games in your posts (Read 67136 times)
GMTonyKosten
YaBB Administrator
*****
Offline


Mr Dynamic?

Posts: 3152
Location: Clermont-Ferrand
Joined: 12/19/02
Gender: Male
How to insert playable PGN games in your posts
Reply #38 - 04/13/11 at 00:48:49
Post Tools
Copy the PGN information from ChessBase to your post, and then 'surround' it with
Code
Select All
[pgn] and [/pgn] 

Wink
  
Back to top
IP Logged
 
GMTonyKosten
YaBB Administrator
*****
Offline


Mr Dynamic?

Posts: 3152
Location: Clermont-Ferrand
Joined: 12/19/02
Gender: Male
Re: Replayable chessgames
Reply #37 - 04/13/11 at 00:32:59
Post Tools
Jesse has improved the code and now everything works as it should. Smiley
Now it just remains to decide on the best colour, I'm just about to alter this from green, but if anyone has any good ideas then please let me know!
Many, many thanks to Jesse for all the work he's put into this! Smiley
  
Back to top
IP Logged
 
Jesse Gersenson
Full Member
***
Offline


Piece value = Mobility
+ targets

Posts: 162
Joined: 09/12/09
Re: Replayable chessgames
Reply #36 - 04/12/11 at 14:54:36
Post Tools
test C:

without header info (this is because i'm pretty sure the double quotes will still be breaking things - this test should show the pgn does accept line breaks.

test B [b]checked[/b], Check this if you'll be adding code (or don't like smilies).

[pgn]

1. e4 c5 2. Nc3 e6 3. f4 Nc6 4. Nf3 d5 5. Bb5 d4 6. Bxc6+ bxc6 7. Nb1 Nf6
8. d3 Be7 9. Na3 Ba6 10. Ne5 Qc7 11. O-O O-O 12. Bd2 Rab8 13. Nac4 Bxc4 14.
Nxc4 Qc8 15. a4 Qa6 16. g4 Nxe4 17. b3 Nxd2 18. Qxd2 Qc8 19. Rae1 Qc7 20.
Re4 Rbd8 21. Rfe1 Bd6 22. Qa5 Bxf4 23. Qxc7 Bxc7 24. Kg2 {Jesse offers a
draw} Rd5 25. R1e2 g6 26. h4 Kg7 27. Kh3 h5 28. g5 Rf5 29. Re1 Rd8 30. R4e2 Rf3+ 31. Kg2 Rg3+ 32. Kf1 Rd5 33.
Re4 Rf5+ 34. Ke2 Rg2+ 35. Kd1 Rff2 36. R4e2 Rxe2 37. Rxe2 Rxe2 38. Kxe2 f6
39. gxf6+ Kxf6 40. Nd2 Kf5 41. Kf3 Bd8 42. Kg3 Be7 43. Nf3 Bd6+ 44. Kf2 Kg4
45. Ke2 Bg3 46. Ng5 Bxh4 47. Nxe6 Be7 48. c3 dxc3 49. d4 Kf5 50. Ng7+ Ke4
51. dxc5 Bxc5 52. Ne6 Be7 0-1[/pgn]
  
Back to top
WWW  
IP Logged
 
Jesse Gersenson
Full Member
***
Offline


Piece value = Mobility
+ targets

Posts: 162
Joined: 09/12/09
Re: Replayable chessgames
Reply #35 - 04/12/11 at 14:30:15
Post Tools
test B [b]checked[/b], Check this if you'll be adding code (or don't like smilies).

[pgn]
[Event "OPJ 2011"]
[Site "Hradec Kralove"]
[Date "2011.03.31"]
[Round "?"]
[White "Gersenson"]
[Black "Rozkovec"]
[Result "0-1"]
[BlackElo "1690"]
[ECO "B23"]
[Opening "Sicilian"]
[Variation "Closed, Grand Prix, 3...e6 4.Nf3 d5"]
[WhiteElo "1750"]
[TimeControl "120+6"]
[PlyCount "105"]
[WhiteType "human"]
[BlackType "human"]

1. e4 c5 2. Nc3 e6 3. f4 Nc6 4. Nf3 d5 5. Bb5 d4 6. Bxc6+ bxc6 7. Nb1 Nf6
8. d3 Be7 9. Na3 Ba6 10. Ne5 Qc7 11. O-O O-O 12. Bd2 Rab8 13. Nac4 Bxc4 14.
Nxc4 Qc8 15. a4 Qa6 16. g4 Nxe4 17. b3 Nxd2 18. Qxd2 Qc8 19. Rae1 Qc7 20.
Re4 Rbd8 21. Rfe1 Bd6 22. Qa5 Bxf4 23. Qxc7 Bxc7 24. Kg2 {Jesse offers a
draw} Rd5 25. R1e2 g6 26. h4 Kg7 27. Kh3 h5 28. g5 Rf5 29. Re1 Rd8 30. R4e2 Rf3+ 31. Kg2 Rg3+ 32. Kf1 Rd5 33.
Re4 Rf5+ 34. Ke2 Rg2+ 35. Kd1 Rff2 36. R4e2 Rxe2 37. Rxe2 Rxe2 38. Kxe2 f6
39. gxf6+ Kxf6 40. Nd2 Kf5 41. Kf3 Bd8 42. Kg3 Be7 43. Nf3 Bd6+ 44. Kf2 Kg4
45. Ke2 Bg3 46. Ng5 Bxh4 47. Nxe6 Be7 48. c3 dxc3 49. d4 Kf5 50. Ng7+ Ke4
51. dxc5 Bxc5 52. Ne6 Be7 0-1[/pgn]
  
Back to top
WWW  
IP Logged
 
Jesse Gersenson
Full Member
***
Offline


Piece value = Mobility
+ targets

Posts: 162
Joined: 09/12/09
Re: Replayable chessgames
Reply #34 - 04/12/11 at 14:28:40
Post Tools
test A: button unchecked, Check this if you'll be adding code (or don't like smilies).

  
Back to top
WWW  
IP Logged
 
Stigma
God Member
*****
Offline


There is a crack in everything.

Posts: 3265
Joined: 11/07/06
Gender: Male
Re: Replayable chessgames
Reply #33 - 04/07/11 at 23:10:51
Post Tools
Jesse Gersenson wrote on 04/07/11 at 22:49:35:
My primitive 3-minuet-initial-coding-quickie,
the thing which has us so excited - couldn't wait for banal niceties such as line breaks.

It wanted to finish and go - display a board and one move, done!

So it does this (and not much else).

A lasting version will be available next week.


Ah, I didn't realize you had to do coding to allow line breaks; I assumed the problem was internal to Chessflash. I don't know anything about programming really.

Thanks a lot for your efforts to get this up and working!
  

Improvement begins at the edge of your comfort zone. -Jonathan Rowson
Back to top
 
IP Logged
 
Jesse Gersenson
Full Member
***
Offline


Piece value = Mobility
+ targets

Posts: 162
Joined: 09/12/09
Re: Replayable chessgames
Reply #32 - 04/07/11 at 22:49:35
Post Tools
Stigma wrote on 04/07/11 at 14:25:17:
Btw. why does Chessflash insist on avoiding these line shifts? They're usually treated as part of the pgn standard, so seems a bit unneccesary to not accept them.


My primitive 3-minuet-initial-coding-quickie,
the thing which has us so excited - couldn't wait for banal niceties such as line breaks.

It wanted to finish and go - display a board and one move, done!

So it does this (and not much else).

A lasting version will be available next week.
  
Back to top
WWW  
IP Logged
 
Jesse Gersenson
Full Member
***
Offline


Piece value = Mobility
+ targets

Posts: 162
Joined: 09/12/09
Re: Replayable chessgames
Reply #31 - 04/07/11 at 22:24:19
Post Tools
progress report:
chesspub player development



changes made:

  • assume user will paste a normal pgn file - one which includes line breaks and single/double quotes, and header info
  • colors updated to match diagrams
 


to do:
  • gather user feedback from forum members
  • add link below board, 'copy pgn to clipboard'
  • test double quotes. current version on my machine handles double quotes correctly, but I expect the forum software may send the script something other than double quotes, depending on how one answers the checkbox question, "Check this if you'll be adding code (or don't like smilies)."

Smyslov_Fan wrote on 04/07/11 at 14:03:31:
Tony, once this becomes widely available and usable, it will revolutionise the entire site. Do we have enough memory available if everyone starts using it?

And, will people be able to copy and paste the moves into their own files if they so desire?


This feature does not use memory from the forum's server. The flash file is served by chessflash.com and will use (strain?) the chessflash server's memory.

Issues of memory and performance do surface but they occure on the end user's machine and not on the chesspub server. There is a chance users with a slow computer, using internet explorer, may feel "damn-it, my machine is slow today" feelings on pages with multiple chessflash instances. The page will be slow, scrolling will feel slow, maybe the mouse will stagger about.

I wrote the chessflash developer (again, he responded to me the first time) and asked him if he plans to add a download button to chessflash. He hasn't responded.

Either he adds a download button, or I'll add a link below the board to 'copy pgn to clipboard'.

  
Back to top
WWW  
IP Logged
 
Stigma
God Member
*****
Offline


There is a crack in everything.

Posts: 3265
Joined: 11/07/06
Gender: Male
Re: Replayable chessgames
Reply #30 - 04/07/11 at 14:25:17
Post Tools
@Smyslov_fan: people can easily get the pgn that was used for a flash board, by using the "Quote" button.

I just took the Karpov-Jussupow game I posted above and successfully copy-and-pasted it back into an open Chessbase board. I only had to add a couple of spaces between moves that I had carelessly removed earlier, and reinstate line shifts between all the pgn headers.

Btw. why does Chessflash insist on avoiding these line shifts? They're usually treated as part of the pgn standard, so seems a bit unneccesary to not accept them.
  

Improvement begins at the edge of your comfort zone. -Jonathan Rowson
Back to top
 
IP Logged
 
Smyslov_Fan
YaBB Moderator
Correspondence fan
*****
Offline


Progress depends on the
unreasonable man. ~GBS

Posts: 6902
Joined: 06/15/05
Re: Replayable chessgames
Reply #29 - 04/07/11 at 14:03:31
Post Tools
Tony, once this becomes widely available and usable, it will revolutionise the entire site. Do we have enough memory available if everyone starts using it?

And, will people be able to copy and paste the moves into their own files if they so desire?
  
Back to top
 
IP Logged
 
Klick
God Member
*****
Offline



Posts: 528
Joined: 01/31/03
Re: Replayable chessgames
Reply #28 - 04/06/11 at 17:11:22
Post Tools
The colours sync fine with my blue/white YABB-theme, but changing the colours to the diagram-colours could be even more stylish. We could test it and see ?

Jesse; you should send Glenn an email with a link to the forum, so he can see how we added chessflash to the site.
  

There just isn't enough televised chess - DAVID LETTERMAN
Back to top
 
IP Logged
 
GMTonyKosten
YaBB Administrator
*****
Offline


Mr Dynamic?

Posts: 3152
Location: Clermont-Ferrand
Joined: 12/19/02
Gender: Male
Re: Replayable chessgames
Reply #27 - 04/06/11 at 16:13:09
Post Tools
The size of the board and game data look fine to me, but we can change the colour if we want. Any thoughts? We could make it the same as the diagrams for instance? Undecided
Incidentally, to see this you must have Flash installed and switched on.
  
Back to top
IP Logged
 
Matemax
God Member
*****
Offline


Chesspub gives you strength!

Posts: 1302
Joined: 11/04/07
Re: Replayable chessgames
Reply #26 - 04/06/11 at 15:10:44
Post Tools
Jesse Gersenson wrote on 04/06/11 at 14:14:59:
Matemax, what caused you to say all double quotes need to be removed?

sorry - misunderstanding - I meant that space (or better to call it "blancs"?) has/have to be revomed and expressed it with " "

well I am not a native speaker  Undecided
  
Back to top
 
IP Logged
 
Jesse Gersenson
Full Member
***
Offline


Piece value = Mobility
+ targets

Posts: 162
Joined: 09/12/09
Re: Replayable chessgames
Reply #25 - 04/06/11 at 14:14:59
Post Tools
Yes, celebrate!

Am blindly working out the kinks - the new feature will be in a usable form next week.

Perl programers - get back to work. we don't need your help anymore Wink

Matemax, what caused you to say all double quotes need to be removed?
  
Back to top
WWW  
IP Logged
 
Klick
God Member
*****
Offline



Posts: 528
Joined: 01/31/03
Re: Replayable chessgames
Reply #24 - 04/06/11 at 14:10:28
Post Tools
It already works, this is just fine-tuning  Smiley
  

There just isn't enough televised chess - DAVID LETTERMAN
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1 2 3 [4] 5 6 
Topic Tools
Bookmarks: del.icio.us Digg Facebook Google Google+ Linked in reddit StumbleUpon Twitter Yahoo