PDA

View Full Version : PGN Viewer (Standard Starting Position)



skip to my lou
03-07-2004, 07:53 AM
PGN Viewer (Standard Starting Position)

Version: 1.0.0

Description: PGN Viewer embedded on the bulletin board, executed by BB Code. Must start at move one from standard starting position.

Usage:


moveString

Example Code:


1. e4 e5 {this is a comment} 2. f4 (2. f3 {this is a
variation}) 2...exf4 3. Bc4 Qh4+ 4. Kf1 Bc5 5. d4 Bb6 6. Nf3 Qf6 7. Nc3 Ne7
8. e5 Qc6 9. Bb5 Qh6 10. g3 c6 11. Bc4 Qh3+ 12. Kf2 fxg3+ 13. hxg3 Qf5
14. Be3 Ng6 15. Kg2 Bc7 16.Ng5 d5 17. exd6 Bd8 18. Bxf7+ Kd7 19. Be6+
Qxe6 20. Nxe6 Kxe6 21. Qg4+ Kxd6 1-0

Code Output:

1. e4 e5 {this is a comment} 2. f4 (2. f3 {this is a variation}) 2...exf4 3. Bc4 Qh4+ 4. Kf1 Bc5 5. d4 Bb6 6. Nf3 Qf6 7. Nc3 Ne7 8. e5 Qc6 9. Bb5 Qh6 10. g3 c6 11. Bc4 Qh3+ 12. Kf2 fxg3+ 13. hxg3 Qf5 14. Be3 Ng6 15. Kg2 Bc7 16.Ng5 d5 17. exd6 Bd8 18. Bxf7+ Kd7 19. Be6+ Qxe6 20. Nxe6 Kxe6 21. Qg4+ Kxd6 1-0

skip to my lou
05-07-2004, 06:22 AM
str_replace (V. 1.0.1)

...Q -> ... Q
` -> '
() -> {}
[] -> {}
$x -> null
– -> -
" -> "

skip to my lou
27-07-2004, 02:35 PM
Client-Side Viewer Updated.

If you have any problems or come across any errors please let me know: karths@gmail.com

skip to my lou
30-10-2004, 03:46 PM
Client-Side Viewer Updated.

Should be very fast now. Also, you need to press 'Load Game' every time you want to view a game.

pax
11-04-2005, 09:33 PM
I believe the chesschat viewer is based on LT-pgn-viewer by Lutz Tautenhahn.

It's really a very nice piece of work and much more useful in my opinion than more popular viewers like Palview. The big plus being that the LT script reads pgn files directly, without any need to preprocess the files.

I'm a bit surprised that STML hasn't acknowledged Lutz in this thread with a link, so here is one:
http://home.t-online.de/home/lutz.tautenhahn/pgn/ltpgnviewer.html

skip to my lou
11-04-2005, 09:43 PM
I believe the chesschat viewer is based on LT-pgn-viewer by Lutz Tautenhahn.

It's really a very nice piece of work and much more useful in my opinion than more popular viewers like Palview. The big plus being that the LT script reads pgn files directly, without any need to preprocess the files.

I'm a bit surprised that STML hasn't acknowledged Lutz in this thread with a link, so here is one:
http://home.t-online.de/home/lutz.tautenhahn/pgn/ltpgnviewer.html

Yes, I did switch the JS engine to Lutz's code, before it was not. I worked with Lutz to improve the speed and functionality of the CC viewer.

Actually Lutz is also behind much of the code (and ideas) of ChessLib. (And also the PGN viewer that Lutz help me customise built specifically for ChessLib) It's all still in development till I get some more free time, which is not happening at all these days.

Lutz never mentioned posting a link, and it never occured to me either... Thanks for posting it.

Btw, his site is listed #1 for "PGN Viewer" so I guess he did not consider it a big deal.

pax
11-04-2005, 10:09 PM
He is a good guy. I emailed him this afternoon with a suggested improvement, and he came back to me this evening (morning his time) having already implemented it!

And you're right. His software is the freest freeware I've ever seen. No restrictions on how you use it, no restrictions on modifying the code, no requests for link backs.

skip to my lou
11-04-2005, 11:23 PM
Yes, he's very quick! I can't keep up with his speed.

1min_grandmaster
20-04-2005, 05:15 PM
Whenever a game has a castling move, I cannot view those moves after that move (including the castling move). I have tried on 3 different computers and this is the case. I have tried typing 0-0 and O-O (zero and capital letter 'o') and neither works. How do I fix it?

skip to my lou
20-04-2005, 05:36 PM
Test:

1.Nf3 Nf6 2.g3 g6 3.Bg2 Bg7 4.O-O O-O 5.e4 e5 6.d3 d6 7.Nc3 Nc6 8.Be3 Be6 9.a4 b5 10.h4 g5 11.hxg5 h6 12.gxh6 Bh8 13.h7+ Kg7 14.Nh4 Nh5 15.Qg4+ Kf6 16.Qf5+ Kg7 17.Qf6+ Qxf6 18.f4 Qxf4 19.gxf4 Bf5 20.Ng6 Ng3 21.Bc5

skip to my lou
20-04-2005, 05:37 PM
Works for me, what browser/computer/settings are you using?

Spiny Norman
20-04-2005, 07:29 PM
Works for me, what browser/computer/settings are you using?

Works for me too. STML, is the PGN/FEN viewer implemented through a Java applet, and if so, is 1MGM suffering from a caching problem on the client-side perhaps (i.e. maybe his cache holds an 'old' applet somehow)?

skip to my lou
20-04-2005, 07:33 PM
No, it's JavaScript. It's been the same for about 5 months now so I don't think it's a caching problem.

1min_grandmaster
21-04-2005, 01:38 PM
Ok, I have found a computer in a library at uni that seems to work no problem. However, on another computer in the same library, at my terminal in my lab, and at my home computer, I cannot view the castling move and beyond. And I have tried many times on those computers, each time, it has failed. Yet I think they all have Internet Explorer 6. Any ideas on how to get it to work?

Garvinator
21-04-2005, 02:47 PM
Yet I think they all have Internet Explorer 6. Any ideas on how to get it to work?
dont use ie ;) use mozilla firefox instead ;)

sleepless
11-10-2007, 12:44 AM
1 e4 c5 2 nf3 nc6 3 d4 cxd4 4 nxd4 nf6 5 nc3 d6 6 bc4 e6 7 be3 be7 8 bb3 0-0 9 qe2 a5 10 0-0-0 bd7 11 a3 qb8 12 f3 rc8 13 g4 nxd4 14 rxd4 e5 15 rdd1 15 rd2 15 ... b5 16 nd5 nxd5 17 bxd5 bc6 18 h4 b4 19 bxc6 rxc6 20 a4 qc7 21 b3 rc8 22 rd2 rc3 23 kb1 qc6 24 g5 qd7 25 qf2 qe6 26 bb6 rxb3+ 27 cxb3 qxb3+ 28 rb2 qd3+ 29 ka2 29 ka1 -0.33 v -1.28 29 ... qa3+ 30 kb1 qd3+ 29 ... qa3+ 30 kb1 qd3+ 31 ka1 qa3+ 32 kb1 1/2

Basil
11-10-2007, 12:53 AM
Hi Sleepless

I've had a look at your coding.
You need to add full stops after each move number.
You need to change piece letters into capitals.
I copied your first 6 moves and made the changes and this is what happens.

Good luck.

1. e4 c5 2. Nf3 Nc6 3. d4 cxd4 4. Nxd4 Nf6 5. Nc3 d6 6. Bc4 e6

sleepless
11-10-2007, 08:02 PM
thanks, I'll know what to do next time.

jesseo
02-02-2008, 06:40 AM
test

1. d4 Nf6 2. Nf3 d6 3. g3 Bg4 4. Bg2 g6 5. c3 c6 6. Qb3 Qb6 7. Nbd2 d5 8. O-O (
{Crafty 19.19:} 8. Qxb6 axb6 9. O-O Nbd7 10. h3 Bxf3 11. Nxf3 Bg7 12. Bf4 O-O-O
13. Ng5 Rhf8 {[%eval 34,10]}) 8... Qc7 9. Re1 ({Crafty 19.19:} 9. e4 Nbd7 10.
exd5 Nxd5 11. h3 Bxf3 12. Nxf3 e6 13. c4 N5b6 14. Bg5 Bd6 {[%eval 50,10]}) 9...
Nbd7 10. e3 ({Crafty 19.19:} 10. e4 e6 11. exd5 Nxd5 12. c4 N5f6 13. Ne4 Nxe4
14. Rxe4 Nf6 15. Bf4 Qd8 {[%eval 47,10]}) 10... h6 {
...a to byl muj zlaty tah, obracejici partii do remizy...} 11. a4 a5 12. h3 Be6
13. Qd1 Bg7 {...a uz jsem v aktivu...} 14. b4 g5 ({Crafty 19.19:} 14... axb4
15. cxb4 O-O 16. e4 Nb6 17. a5 {[%eval -13,10]}) ({Crafty 19.19:} 14... O-O 15.
e4 Nb6 16. e5 Nfd7 17. Nh4 axb4 18. cxb4 Nc4 19. Nxc4 dxc4 {[%eval -17,9]}) 15.
Nh2 h5 16. Bb2 ({Crafty 19.19:} 16. e4 g4 17. e5 Nh7 18. hxg4 hxg4 19. Nxg4
axb4 20. cxb4 Qb6 21. Bb2 Qxb4 {[%eval -9,10]}) 16... g4 {Crafty 19.19:} 17. h4
Nb6 (17... O-O-O 18. bxa5 Qxa5 19. c4 dxc4 20. Qc2 Nb6 21. Rac1 Kb8 {
[%eval -44,9]}) 18. Bf1 Ne4 19. Nxe4 {Crafty 19.19:} dxe4 20. Qc2 f5 ({
Crafty 19.19:} 20... f5 21. c4 Bf6 22. bxa5 Nc8 23. Bc3 Nd6 24. c5 Nc4 {
[%eval 152,9]}) (20... Bc4 21. Red1 Bxf1 22. Nxf1 axb4 23. cxb4 Nd5 24. Qc4 Qd8
25. Nd2 {[%eval 52,10]}) 21. b5 {Crafty 19.19:} Bc4 22. Bxc4 ({Crafty 19.19:}
22. Bxc4 Nxc4 23. Qb3 cxb5 24. Qxb5+ Qc6 25. Qxc6+ (25. Qxf5 Nxb2) 25... bxc6
26. Ba3 Bf6 27. Bc5 O-O 28. Rab1 Rab8 29. Nf1 {[%eval -80,11]}) 22... Nxc4 23.
Qb3 ({Crafty 19.19:} 23. Qb3 cxb5 24. Qxb5+ Qc6 25. Qxc6+ bxc6 26. Ba3 Bf6 27.
Bc5 O-O 28. Rab1 Rab8 29. Nf1 {[%eval -81,10]}) 23... Nd2 {
zde se na partii díval uculující se Radek a náhle zbledlý pan Nun} ({
Crafty 19.19:} 23... cxb5 24. Qxb5+ Qc6 25. Qb3 Nd2 26. Qc2 Nc4 27. Ba3 Qd5 28.
Rf1 b6 29. Rfc1 e5 {[%eval 10,12]}) ({Crafty 19.19:} 23... Nd2 24. Qe6 Qd6 25.
Qxf5 Qf6 26. Qxf6 Bxf6 27. bxc6 bxc6 28. Bc1 Nc4 29. Rb1 O-O 30. Rb7 {
[%eval 98,12]}) (23... cxb5 24. Qxb5+ Qc6 25. Qxc6+ bxc6 26. Ba3 Bf6 27. Bc5
O-O 28. Rab1 {[%eval 28,10]}) {Crafty 19.19:} 24. Qe6 Bf6 ({Crafty 19.19:}
24... Bf6 25. Bc1 (25. Rad1 Nf3+ 26. Nxf3 gxf3 27. Qxf5 Bxh4 28. gxh4 Rg8+ 29.
Kh1 Qd6 30. Rg1 Rf8 31. Qxe4 Rd8 32. Rg5 Kd7 33. Rxh5 Kc7 34. bxc6 bxc6 35.
Rxa5 Rh8 36. h5 Ra8 37. Qf5 Rxa5 38. Qxa5+ Kd7 39. Rg1 Qf6 40. Rg5 Qe6 41. Qa7+
Kc8 42. Qa8+ Kd7 43. Qxh8 Qh3+ 44. Kg1 Qh4 45. Qe5 Qh3 46. Rg6) 25... Nf3+ 26.
Nxf3 exf3 (26... gxf3 27. Qxf5 Bxh4 28. gxh4 Rg8+ 29. Kh1 Rg2 30. Qh3 Rxf2 31.
Rg1 Qd7 32. Rg8+ Kf7 33. Qxd7 Rxg8 34. Ba3 Rgg2 35. Qxe7+ Kg6 36. Bd6 Re2 37.
Be5 Rh2+ 38. Bxh2 f2 39. Qe8+ Kh6 40. Bf4+ Kg7 41. Be5+ Kh6 42. Qe6+ Kh7 43.
Qf7+ Kh6 44. Bg7+ Kh7 45. Bf6+ Kh6 46. Qg7#) 27. Qxf5 cxb5 28. Qxb5+ Qc6 29.
Rb1 e6 30. Qxb7 Qd5 {[%eval 195,10]}) (24... Rh6 25. Qxf5 e6 26. Qg5 cxb5 27.
Qxb5+ Kd8 28. d5 Be5 29. dxe6 Rxe6 {[%eval 13,10]}) {Crafty 19.19:} 25. Kg2 Nf3
({Crafty 19.19:} 25... Qc8 26. Qxc8+ Rxc8 27. b6 Nc4 28. Reb1 f4 29. exf4 c5
30. dxc5 Rxc5 31. Nf1 Nxb2 32. Rxb2 Bxc3 {[%eval 19,10]}) (25... Qc8 26. Qxc8+
Rxc8 27. Bc1 Nc4 28. Nf1 cxb5 29. axb5 Kd7 30. Nd2 b6 31. Nxc4 Rxc4 {
[%eval -74,9]}) 26. Rh1 ({Crafty 19.19:} 26. Rf1 Qc8 27. Qxc8+ Rxc8 28. bxc6
Rxc6 29. Nxf3 exf3+ 30. Kg1 Kf7 31. Ra3 Rd8 32. Rb3 Rc7 33. Rd1 {[%eval -56,11]
}) {Crafty 19.19:} 26... Qd7 27. Qxd7+ Kxd7 28. c4 (28. bxc6+ bxc6 29. Ba3 Nxh2
30. Kxh2 Rab8 31. Rab1 e5 32. Bc5 exd4 33. Bxd4 Ke6 34. Bxf6 Kxf6 {
[%eval 50,10]}) 28... c5 29. Nxf3 gxf3+ 30. Kf1 b6 31. Rb1 {
nabizim remizu, souper neprijima} Rac8 32. d5 Bxb2 33. Rxb2 Kd6 34. Ke1 Rhg8
35. Rg1 Rg4 36. Rh1 Rd8 37. Rd2 Rd7 {zde skoncila partie remizou} (37... Rd7
38. Kd1 e6 39. Kc2 exd5 40. Rxd5+ Ke6 41. Rxd7 Kxd7 42. Rd1+ Ke6 43. Rd8 Rg6
44. Kc3 Ke7 45. Rh8 Rxg3 46. Rh7+ Kf6 47. Rb7 Rg7 48. Rxb6+ Ke5 49. Rc6 Rb7 50.
Rxc5+ Kf6 51. Kd4 Rd7+ 52. Rd5 Re7 53. c5 Rc7 54. b6 Rb7 55. c6 Rxb6 56. c7 Rc6
57. Rc5 Rxc7 58. Rxc7 {prohrál bych ono otevření sloupce}) 1/2-1/2

Kevin Bonham
02-02-2008, 11:24 AM
Probably too many comments in above test. It tends not to work when too many comments are included.

TIMMIK
05-11-2008, 06:04 PM
White: Deanhogg 1993 - Black :IM David Smerdon 2470

1. d4 Nf6 2. c4 e6 3.Nc3 Bb4 4.Qc2 d5 5.cxd5 exd5 6.Bg5 h6 7. Bxf6 Qxf6
8.e3 0-0 9.a3 Bxc3 10.Qxc3 Bf5 11.Nf3 Nd7 12.Rc1 a5 13.Be2 c6 14.0-0 a4
15.Qb4 b5 16.Rc3 Re8 17.Rfc1 Re6 18.Bd3 Bxd3 19.Rxd3 g5 20.Qc3 g4
21.Ne5 Nxe5 22.dxe5 Qg5 23.Qd4 Qf5 24.R3c3 Rc8 25.g3 f6 26.Qb6 Qxe5
27.Rxc6 Rxc6 28. Rxc6 Rf8 29.Rxg6+ Kh7 30.Rxh6+ Kg7 31. e4 only move !
32 Rh5 Qb1+ agreed a draw black's move 26 ?
white's move 29 ?

Kevin Bonham
05-11-2008, 06:24 PM
You need to type moves in full, eg cxd5 not cxd. Also you're missing black's 31st.

TIMMIK
05-11-2008, 06:36 PM
White: Deanhogg 1993 - Black :IM David Smerdon 2470

1. d4 Nf6 2. c4 e6 3.Nc3 Bb4 4.Qc2 d5 5.cxd5 exd5 6.bg5 h6 .7 Bxf6 Qxf6
8.e3 0-0 9 .a3 Bxc3 10.Qxc3 Bf5 11.Nf3 Nd7 12.Rc1 a5 13.Be2 c6 14.0-0 a4
15.Qb4 b5 16.Rc3 Re8 17.Rfc1 Re6 18.Bd3 Bxd3 19.Rxd3 g5 20.Qc3 g4
21.Ne5 Nxe5 22.de5 Qg5 23 .Qd4 Qf5 24 .Rc3(3) Rc8 25.g3 f6 26.Qb6 Qxf5
27.Rxc6 Rxc6 28. Rxc6 Rf8 29 .Rxg6+ Kh7 30.Rxh6+ Kg7 31 e4 only move !Qxe4
32 Rh5 Qb1+ agreed a draw
Capitalise piece names
Make sure full stop follows immediately after move number
See my post above.

Zwischenzug
05-11-2008, 09:04 PM
Perhaps a mod can move this game to a more relevant thread? [corrected version of game so moved - mod]

Basil
05-11-2008, 09:16 PM
[corrected version of game so moved - mod]
I second that.

Garvinator
06-11-2008, 08:22 PM
I second that.
Thirded.

Bill Gletsos
06-11-2008, 08:24 PM
7k/1n3r2/RB2q2p/1pp1p1pP/3NP3/6Q1/5PP1/4b1K1 b - - 0 45

Kaitlin
18-11-2008, 08:29 PM
1. Nf3 Nc6 2. d4 d6 3. c4 a6 4. Nc3 Na7 5. Bf4 b5 6. e3 c6 7. Be2 b4 8. Nb1
a5 9. O-O Nf6 10. Nbd2 Bg4 11. Qc2 d5 12. Rfe1 e6 13. Bg5 Be7 14. Rac1 Ne4
15. Bxe7 Qxe7 16. Nxe4 dxe4 17. Qxe4 f5 18. Qc2 O-O 19. Qb3 c5 20. Rcd1
Bh5 21. Rd2 Nc6 22. dxc5 f4 23. Red1 Bg6 24. Nd4 a4 25. Nxc6 Qxc5 26. Ne7+
Qxe7 27. Rd7 axb3 28. Rxe7 bxa2 29. Ra1 Bb1 30. exf4 Rae8 31. Rb7 Rb8 32. Re7
Rf6 33. g3 Kf8 34. Rd7 Rf7 35. Rd6 Re8 36. Rb6 e5 37. fxe5 Rxe5 38. Bf1
Re1 39. Rxb4 Rd7 40. Rb8+ Ke7 41. Kg2 Rdd1 42. Rb7+ Kd6 43. c5+ Kxc5 44. Ba6
Be4+ 45. Kh3 Rxa1
{White resigns} 0-1