Latest Updates:
Very Hot Topic (More than 25 Replies) How to insert playable PGN games in your posts (Read 50681 times)
Gut Gambit
YaBB Newbies
*
Offline


I Love ChessPublishing!

Posts: 47
Location: Norway
Joined: 10/28/14
Gender: Male
Re: How to insert playable PGN games in your posts
Reply #83 - 01/31/16 at 19:38:58
Post Tools
An opponent told me after a team championship match some time ago. So maybe not that interesting  Smiley

I tried the PGN button and it worked well. So no bother. And thanks!

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


Mr Dynamic?

Posts: 3028
Location: Clermont-Ferrand
Joined: 12/19/02
Gender: Male
Re: How to insert playable PGN games in your posts
Reply #82 - 01/31/16 at 02:35:24
Post Tools
Gut Gambit wrote on 01/30/16 at 18:53:20:
I saw you modified my pgn post in the Daring Defences the other day ( thread the perunovic).  The thing is that I tried to do the same as always on this site if you want to give a playable game. I pressed Ctrl+Alt + 8, and then Ctrl+Alt + 9, and after that I copied the game in the middle of these two bars. That has always been working, but not lately. I just wondered WHY?  Smiley


I've never seen that before, interesting, where did you find that key combination? I just use the 'PGN' button, by the FEN board button.
  
Back to top
WWW  
IP Logged
 
Gut Gambit
YaBB Newbies
*
Offline


I Love ChessPublishing!

Posts: 47
Location: Norway
Joined: 10/28/14
Gender: Male
Re: How to insert playable PGN games in your posts
Reply #81 - 01/30/16 at 18:53:20
Post Tools
@GM Tony Kosten

I saw you modified my pgn post in the Daring Defences the other day ( thread the perunovic).  The thing is that I tried to do the same as always on this site if you want to give a playable game. I pressed Ctrl+Alt + 8, and then Ctrl+Alt + 9, and after that I copied the game in the middle of these two bars. That has always been working, but not lately. I just wondered WHY?  Smiley

GG

EDIT: Maybe there is others that can answer this question as well
  
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: How to insert playable PGN games in your posts
Reply #80 - 06/23/11 at 18:18:55
Post Tools
I just posted this in another thread, but perhaps it belongs here?

I've noticed a problem with the pgn reader. Please take a look at my comment on move 5. It should read, "I don't understand...."
  
Back to top
 
IP Logged
 
Charles Allen
YaBB Newbies
*
Offline


I Love ChessPublishing!

Posts: 23
Joined: 09/01/08
Re: How to insert playable PGN games in your posts
Reply #79 - 06/10/11 at 02:25:29
Post Tools
I do appreciate the pgn link.  A couple of notes:

Jesse Gersenson wrote on 05/30/11 at 12:17:23:
Vladimir wrote on 05/30/11 at 10:57:27:
What has everyone been doing in the meantime?


1. View source
2. search for pgndata
3. copy just the moves
4. import into scid or arena using Paste pgn from clipboard



Doesn't work for my combination (Firefox on Linux, no Flash plugin).  Whenever I see the pgn, it's been quoted, so all the spaces are %20, etc.

I'm kind of curious why folks want the board "inline" as it is.  When I *do* fire up scid on the pgn, I keep the board on one side of my screen and scroll through the various comments on the other.  With the Flash board fixed in place, you only have room for a few comments and the board.

Is it possible to have the Flash player appear in another window?  There would be two links:  One for the Flash version, one for the raw pgn. Of course, it would mean I wouldn't see all that wasted empty space, so I suppose I'm biased.
  
Back to top
 
IP Logged
 
Jesse Gersenson
Full Member
***
Offline


Piece value = Mobility
+ targets

Posts: 162
Joined: 09/12/09
Chessflash & game text
Reply #78 - 06/01/11 at 08:30:43
Post Tools
Edited:
download this game in pgn format - experimental


now appears below the board.

Download, or view, the pgn by clicking the text.

interested to hear feedback
« Last Edit: 06/01/11 at 17:55:06 by Jesse Gersenson »  
Back to top
WWW  
IP Logged
 
Jesse Gersenson
Full Member
***
Offline


Piece value = Mobility
+ targets

Posts: 162
Joined: 09/12/09
Re: How to insert playable PGN games in your posts
Reply #77 - 05/30/11 at 12:17:23
Post Tools
Vladimir wrote on 05/30/11 at 10:57:27:
What has everyone been doing in the meantime?


1. View source
2. search for pgndata
3. copy just the moves
4. import into scid or arena using Paste pgn from clipboard

I expect we will have a 'download as pgn' link soon. Sent code this morning.

Here is the prototype example using pgn data from a Stefan Buecker post (note to Stefan, evaluation symbols will be corrected after the download feature is working):
http://tinyurl.com/3nq6r8h
  
Back to top
WWW  
IP Logged
 
Vladimir
Junior Member
**
Offline



Posts: 60
Joined: 05/22/09
Re: How to insert playable PGN games in your posts
Reply #76 - 05/30/11 at 10:57:27
Post Tools
Jesse Gersenson wrote on 05/29/11 at 22:58:27:
Basic plan:
1. TONY: add "pgn download (experimental)" links into pgn function of YaBBC.pl. two will be perl based, one javascript based.

2. JESSE: recode php file as needed

3. TONY: (if broken) adjust YaBBC.pl and repeat steps 2-3

4. TONY: move php file to chesspub and repoint links in YaBBC to the chesspub pgn.php file

5. EVERYONE: test everything's working.

I have 80% of the process working properly on my machine. The remaining 20% is getting chesspub's server to encode the pgn data into a format which can be transfered via a url and then decoded by php.

Expect it will take a few iterations to get the encoding/decoding (base64) working properly.

Thanks for your work on this, Jesse.

What has everyone been doing in the meantime? For a post with the replayable board but no PGN, it's been simple enough to just hit quote and copy the text from between the PGN tags in the reply box and save it in a text editor.

Of course, that solution is very kludgy, so it's good that you're trying to solve this on the back-end.
  
Back to top
 
IP Logged
 
Jesse Gersenson
Full Member
***
Offline


Piece value = Mobility
+ targets

Posts: 162
Joined: 09/12/09
Re: How to insert playable PGN games in your posts
Reply #75 - 05/29/11 at 22:58:27
Post Tools
Basic plan:
1. TONY: add "pgn download (experimental)" links into pgn function of YaBBC.pl. two will be perl based, one javascript based.

2. JESSE: recode php file as needed

3. TONY: (if broken) adjust YaBBC.pl and repeat steps 2-3

4. TONY: move php file to chesspub and repoint links in YaBBC to the chesspub pgn.php file

5. EVERYONE: test everything's working.

I have 80% of the process working properly on my machine. The remaining 20% is getting chesspub's server to encode the pgn data into a format which can be transfered via a url and then decoded by php.

Expect it will take a few iterations to get the encoding/decoding (base64) working properly.
  
Back to top
WWW  
IP Logged
 
GMTonyKosten
YaBB Administrator
*****
Offline


Mr Dynamic?

Posts: 3028
Location: Clermont-Ferrand
Joined: 12/19/02
Gender: Male
Re: How to insert playable PGN games in your posts
Reply #74 - 05/29/11 at 15:56:34
Post Tools
Jesse Gersenson wrote on 05/21/11 at 17:50:09:
rough draft:

http://www.jesseo.com/chesspub/test.php?pgndata=1.e4

the system will automatically generate a downloading pgn file. i.e., no need to attach pgn files.

This does seem to work (at least for me), so how do  we apply it here?
  
Back to top
WWW  
IP Logged
 
Jesse Gersenson
Full Member
***
Offline


Piece value = Mobility
+ targets

Posts: 162
Joined: 09/12/09
Re: How to insert playable PGN games in your posts
Reply #73 - 05/21/11 at 17:50:09
Post Tools
rough draft:

http://www.jesseo.com/chesspub/test.php?pgndata=1.e4

the system will automatically generate a downloading pgn file. i.e., no need to attach pgn files.
  
Back to top
WWW  
IP Logged
 
GMTonyKosten
YaBB Administrator
*****
Offline


Mr Dynamic?

Posts: 3028
Location: Clermont-Ferrand
Joined: 12/19/02
Gender: Male
Re: How to insert playable PGN games in your posts
Reply #72 - 05/21/11 at 13:47:21
Post Tools
Actually, I wonder if it is worth going to the trouble of changing the code as a) the workaround is easy enough, and b) the site preference is to attach PGN files rather than clutter up the pages with bare PGN games.
  
Back to top
WWW  
IP Logged
 
GMTonyKosten
YaBB Administrator
*****
Offline


Mr Dynamic?

Posts: 3028
Location: Clermont-Ferrand
Joined: 12/19/02
Gender: Male
Re: Replayable chessgames
Reply #71 - 05/21/11 at 11:38:04
Post Tools
Charles Allen wrote on 05/20/11 at 15:41:00:
I do not enable javascript by default, and certainly not Flash (a security risk).

So... I see a big blank area with no option to get to the pgn.

I also have js and Flash switched off for most of my browsing (because of the potential security risks), but use an alternative browser with it switched on when I need it.
It's a slight hassle, but I figure that the security risk from one or two safe sites that I use a lot must be pretty insignificant.
  
Back to top
WWW  
IP Logged
 
Jesse Gersenson
Full Member
***
Offline


Piece value = Mobility
+ targets

Posts: 162
Joined: 09/12/09
Re: How to insert playable PGN games in your posts
Reply #70 - 05/21/11 at 07:09:02
Post Tools
you may want to wait - 'click here for pgn' took less than 5 minuets. it's working.

will fine tune and send by email during the weekend.
  
Back to top
WWW  
IP Logged
 
Jesse Gersenson
Full Member
***
Offline


Piece value = Mobility
+ targets

Posts: 162
Joined: 09/12/09
Re: How to insert playable PGN games in your posts
Reply #69 - 05/21/11 at 06:39:03
Post Tools
Hi Tony,

several users want the raw pgn.

here's a quick fix -
i appended <br>pgn text [XXXcode]$1[XXX/code], (remove the XXX), to get the pgn text to appear in the post, just after the flash viewer. add it to the modified line in YaBBC.pl.

should look something like this - hopefully the forum will display this...
[code]
$message =~ s~\[pgn\](.*?)\[/pgn\]~"<div><object type=\"application/x-shockwave-flash\" data=\"http://chessflash.com/releases/latest/ChessFlash.swf\" width=\"100%\" height=\"350\"><param name=\"movie\" value=\"http://chessflash.com/releases/latest/ChessFlash.swf\" /><param name=\"flashvars\" fffff&pgndata=".modify($1)."'/></object></div><br>pgn text [XXXcode]$1[XXX/code]"~isge;[/code]

this version will show the pgn file as the user entered it, line breaks and all. we have the option to show the pgn as one long line. this saves space, but some users may find it tough to use.

for the all on one line option, replace the $1, above, with this
".modify($1)."

all untested.

a better option is add a link below the flashviewer, which morphs the pgn data into a stand-along text file which can be downloaded - this will be done with javascript, perl, or php (easiest for me). something like, "click for pgn".

when i get a chance, i'll try making the link. there's a 50-50 chance it'll take me five minuets - if so, i'll do it - otherwise, may be a few months before I get around to making the php page.
  
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 #68 - 05/20/11 at 18:51:44
Post Tools
Charles Allen wrote on 05/20/11 at 15:41:00:
Please leave a "normal" link to the pgn file for those of us that can just click on it and have it automatically opened in scid (or whatever).


should be easy enough - anyone want to write the script to do it?

http://www.perlfect.com/articles/perlfile.shtml
  
Back to top
WWW  
IP Logged
 
Charles Allen
YaBB Newbies
*
Offline


I Love ChessPublishing!

Posts: 23
Joined: 09/01/08
Re: Replayable chessgames
Reply #67 - 05/20/11 at 15:41:00
Post Tools
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.

Yes, it will make it largely useless for many of us.

I do the vast majority of my forum browsing while not logged in.  I do not enable javascript by default, and certainly not Flash (a security risk).

So... I see a big blank area with no option to get to the pgn.

I do understand the desire for a playable board, but please don't disenfranchise those of us who do not wish to use it.

How about:  For every attached pgn or fen file (already allowed for, correct?), have an alternate "link" that executes the flash stuff on that file?  Please leave a "normal" link to the pgn file for those of us that can just click on it and have it automatically opened in scid (or whatever).
  
Back to top
 
IP Logged
 
GMTonyKosten
YaBB Administrator
*****
Offline


Mr Dynamic?

Posts: 3028
Location: Clermont-Ferrand
Joined: 12/19/02
Gender: Male
Re: How to insert playable PGN games in your posts
Reply #66 - 05/18/11 at 17:52:01
Post Tools
Maybe we can have a competition to make the best icons for the two functions?
  
Back to top
WWW  
IP Logged
 
Jesse Gersenson
Full Member
***
Offline


Piece value = Mobility
+ targets

Posts: 162
Joined: 09/12/09
Re: How to insert playable PGN games in your posts
Reply #65 - 05/18/11 at 16:31:55
Post Tools
Return it to 4 months as this keeps people from having to download the files every two days.

Both images are still blurry. Simply delete their height and width in Post.pl, leaving:

Code
Select All
document.write("<img src='http://www.chesspub.com/yabbfiles/Templates/Forum/default/pgn.gif' onclick='pgn();' "+HAND+" align='top' alt='Insert PGN Game' title='Insert PGN Game' border='0' />");
document.write("<img src='http://www.chesspub.com/yabbfiles/Templates/Forum/default/pgn2.gif' onclick='fen();' "+HAND+" align='top'  alt='Insert Fen Diagram' title='Insert Fen Diagram' border='0' />"); 



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


Mr Dynamic?

Posts: 3028
Location: Clermont-Ferrand
Joined: 12/19/02
Gender: Male
Re: How to insert playable PGN games in your posts
Reply #64 - 05/18/11 at 11:23:37
Post Tools
Jesse Gersenson wrote on 05/18/11 at 05:05:26:
Lower the application/x-javascript caching time with the htaccess file. Set it (and other lines which the javascript type) to 172800, which is two days.

OK, done, should I keep it like this or return it to 4 months in due course?
  
Back to top
WWW  
IP Logged
 
Jesse Gersenson
Full Member
***
Offline


Piece value = Mobility
+ targets

Posts: 162
Joined: 09/12/09
Re: How to insert playable PGN games in your posts
Reply #63 - 05/18/11 at 05:05:26
Post Tools
You're welcome.

Lower the application/x-javascript caching time with the htaccess file. Set it (and other lines which the javascript type) to 172800, which is two days.

Otherwise, it'll be 4 months before the change is available for most users. Wink
  
Back to top
WWW  
IP Logged
 
GMTonyKosten
YaBB Administrator
*****
Offline


Mr Dynamic?

Posts: 3028
Location: Clermont-Ferrand
Joined: 12/19/02
Gender: Male
Re: How to insert playable PGN games in your posts
Reply #62 - 05/17/11 at 19:27:14
Post Tools
Well, I think it is brilliant! Many thanks Jesse once again! Smiley
  
Back to top
WWW  
IP Logged
 
GMTonyKosten
YaBB Administrator
*****
Offline


Mr Dynamic?

Posts: 3028
Location: Clermont-Ferrand
Joined: 12/19/02
Gender: Male
Re: How to insert playable PGN games in your posts
Reply #61 - 05/16/11 at 22:36:50
Post Tools
No, it does work, I just needed to clear my cache! Cheesy
  
Back to top
WWW  
IP Logged
 
GMTonyKosten
YaBB Administrator
*****
Offline


Mr Dynamic?

Posts: 3028
Location: Clermont-Ferrand
Joined: 12/19/02
Gender: Male
Re: How to insert playable PGN games in your posts
Reply #60 - 05/16/11 at 22:26:29
Post Tools
I've added the two images, one for adding PGN games, and one for adding FEN diagrams, but they don't appear to be functional! Apart from combined.js and post.pl I've also altered post.lng (to get the screen tips), but obviously something else is needed?! Undecided
  
Back to top
WWW  
IP Logged
 
Jesse Gersenson
Full Member
***
Offline


Piece value = Mobility
+ targets

Posts: 162
Joined: 09/12/09
Re: How to insert playable PGN games in your posts
Reply #59 - 05/16/11 at 20:37:33
Post Tools
PGN text-only


Chessboard image


  
Back to top
WWW  
IP Logged
 
Smyslov_Fan
YaBB Moderator
Correspondence fan
*****
Offline


Progress depends on the
unreasonable man. ~GBS

Posts: 6902
Joined: 06/15/05
Re: How to insert playable PGN games in your posts
Reply #58 - 05/16/11 at 20:24:31
Post Tools
Jesse, "File not found".
  
Back to top
 
IP Logged
 
Jesse Gersenson
Full Member
***
Offline


Piece value = Mobility
+ targets

Posts: 162
Joined: 09/12/09
Re: How to insert playable PGN games in your posts
Reply #57 - 05/16/11 at 20:22:59
Post Tools
to add a 'pgn' button to the message window, in place of the current hr button:

1. upload the pgn.gif image to the server - perhaps to this destination:
http://www.chesspub.com/yabbfiles/Templates/Forum/default/pgn.gif

two mock up images - pick one:
[img]http://www.jesseo.com/chesspub/pgn.gif[/img]

[img]http://www.jesseo.com/chesspub/pgn2.gif[/img]


2. in Post.pl edit this line
[edit]document.write("<img src='$imagesdir/hr.gif' onclick='hr();' "+HAND+" align='top' width='23' height='22' alt='$post_txt{'531'}' title='$post_txt{'531'}' border='0' />");[/edit]

to
[quote]
document.write("<img src='$imagesdir/pgn.gif' onclick='pgn();' "+HAND+" align='top' width='23' height='22' alt='$post_txt{'531'}' title='$post_txt{'531'}' border='0' />");[/quote]

3. add a pgn function to http://www.chesspub.com/yabbfiles/ubbc.js

[code]function pgn(){AddSelText("[pgn]","[/pgn]")}[/code]

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


Chesspub gives you strength!

Posts: 1302
Joined: 11/04/07
Re: How to insert playable PGN games in your posts
Reply #56 - 04/15/11 at 10:09:50
Post Tools
Quote:
I'd love to suggest a possible future to have a edit board facility and setup a position from move X and play the moves from there on.


  
Back to top
 
IP Logged
 
8arms
Full Member
***
Offline


If you don't shoot, you
won't score!

Posts: 136
Location: Redcar
Joined: 05/16/05
Re: How to insert playable PGN games in your posts
Reply #55 - 04/15/11 at 06:50:40
Post Tools
Thought I'd give this whole thing a test myself and what can I say but WOW... congratulations to the developers so far!



I'd love to suggest a possible future to have a edit board facility and setup a position from move X and play the moves from there on.
  
Back to top
 
IP Logged
 
Stefan Buecker
God Member
*****
Offline



Posts: 1381
Location: Germany
Joined: 02/11/09
Gender: Male
Re: How to insert playable PGN games in your posts
Reply #54 - 04/15/11 at 01:46:35
Post Tools

I like it, makes it easier to keep the overview, in particular if there are longer comments.
  
Back to top
 
IP Logged
 
GMTonyKosten
YaBB Administrator
*****
Offline


Mr Dynamic?

Posts: 3028
Location: Clermont-Ferrand
Joined: 12/19/02
Gender: Male
Re: How to insert playable PGN games in your posts
Reply #53 - 04/15/11 at 01:13:23
Post Tools
Stefan Buecker wrote on 04/14/11 at 15:06:28:
Would it improve the readability, btw, to give sidelines in grey color instead of black?

What do you think? Undecided
  
Back to top
WWW  
IP Logged
 
Jesse Gersenson
Full Member
***
Offline


Piece value = Mobility
+ targets

Posts: 162
Joined: 09/12/09
Re: How to insert playable PGN games in your posts
Reply #52 - 04/14/11 at 20:14:30
Post Tools
GMTonyKosten wrote on 04/14/11 at 18:50:51:
16...Rxh2+ was prettier! Roll Eyes


!!

Tony, variation color to gray with
Edited:
mtforeground=666666


333333 is a darker gray - seems too dark. pick the one you want.
  
Back to top
WWW  
IP Logged
 
GMTonyKosten
YaBB Administrator
*****
Offline


Mr Dynamic?

Posts: 3028
Location: Clermont-Ferrand
Joined: 12/19/02
Gender: Male
Re: How to insert playable PGN games in your posts
Reply #51 - 04/14/11 at 18:50:51
Post Tools
Smyslov_Fan wrote on 04/14/11 at 17:11:45:
Btw Stefan, I really enjoy your choice of games!

16...Rxh2+ was prettier! Roll Eyes
  
Back to top
WWW  
IP Logged
 
Smyslov_Fan
YaBB Moderator
Correspondence fan
*****
Offline


Progress depends on the
unreasonable man. ~GBS

Posts: 6902
Joined: 06/15/05
Re: How to insert playable PGN games in your posts
Reply #50 - 04/14/11 at 17:11:45
Post Tools
Btw Stefan, I really enjoy your choice of games!
  
Back to top
 
IP Logged
 
Stefan Buecker
God Member
*****
Offline



Posts: 1381
Location: Germany
Joined: 02/11/09
Gender: Male
Re: How to insert playable PGN games in your posts
Reply #49 - 04/14/11 at 15:06:28
Post Tools


Jesse,
new pgn: above. - Would it improve the readability, btw, to give sidelines in grey color instead of black?
  
Back to top
 
IP Logged
 
Jesse Gersenson
Full Member
***
Offline


Piece value = Mobility
+ targets

Posts: 162
Joined: 09/12/09
Re: How to insert playable PGN games in your posts
Reply #48 - 04/14/11 at 13:58:50
Post Tools
Stefan,

post another chessbase generated pgn, without using the 'email' feature. include the few symbols you want, and add text after each, explaining as you did in your previous email-generated post, which symbol is supposed to be showing up.

i'll use the code from this to build something but it will take me a a week to get to.
  
Back to top
WWW  
IP Logged
 
Stefan Buecker
God Member
*****
Offline



Posts: 1381
Location: Germany
Joined: 02/11/09
Gender: Male
Re: How to insert playable PGN games in your posts
Reply #47 - 04/14/11 at 13:08:49
Post Tools
Great, Jesse - thanks.

HTML codes for math symbols: http://webdesign.about.com/od/localization/l/blhtmlcodes-math.htm

There is the infinity sign, and the plusminus. Instead of the "infinity over equal" sign (meaning compensation) we could perhaps take the "approximately equal" sign, or would that be confusing?
  
Back to top
 
IP Logged
 
GMTonyKosten
YaBB Administrator
*****
Offline


Mr Dynamic?

Posts: 3028
Location: Clermont-Ferrand
Joined: 12/19/02
Gender: Male
Re: How to insert playable PGN games in your posts
Reply #46 - 04/14/11 at 11:11:58
Post Tools
[quote author=38332122373C7F3F372B3720520 link=1293637916/45#45 date=1302768841]Try adding this line to YaBBC as per the block of code below
[edit]  $s =~ s/\+/\%2B/g;[/edit][/quote]
Done! :)
  
Back to top
WWW  
IP Logged
 
Jesse Gersenson
Full Member
***
Offline


Piece value = Mobility
+ targets

Posts: 162
Joined: 09/12/09
Re: How to insert playable PGN games in your posts
Reply #45 - 04/14/11 at 08:14:01
Post Tools
Hi Tony, the chessflash developer explained why the checks are not displaying. he wrote
[quote]
I entered 1. e4 e5 2. Bc4 Nf6 3. Bf7+ Kf7 at:
http://chessflash.com/chessflash.html and clicked preview.  Within the generated html is:
1. e4 e5 2. Bc4 Nf6 3. Bf7%2B Kf7
and it displays in the the notation window.  (And checking the page source I am converting + to %2B -- I believe that otherwise the + may get eaten).[/quote]

Try adding this line to YaBBC as per the block of code below
[edit]  $s =~ s/\+/\%2B/g;[/edit]

[code]sub modify {
  my $s = $_[0];
  $s =~ s/\n+/ /g;
  $s =~ s/\'/’/g;
  $s =~ s/\+/\%2B/g;

  return $s;
}
[/code]
  
Back to top
WWW  
IP Logged
 
Stefan Buecker
God Member
*****
Offline



Posts: 1381
Location: Germany
Joined: 02/11/09
Gender: Male
Re: How to insert playable PGN games in your posts
Reply #44 - 04/13/11 at 13:45:32
Post Tools
It doesn't really matter whether there is a "plus over minus" sign or +/-. But I'd prefer to have the + sign after a move to indicate "check", and maybe the "infinity" sign for "unclear" and the "infinity over equal" sign for "compensation". The other signs are quite unimportant.
  
Back to top
 
IP Logged
 
Jesse Gersenson
Full Member
***
Offline


Piece value = Mobility
+ targets

Posts: 162
Joined: 09/12/09
Re: How to insert playable PGN games in your posts
Reply #43 - 04/13/11 at 11:41:24
Post Tools
Seems like some, but not all, symbols work when exported via the chessbase email feature.

3...a6 compensation symbol doesn't seem to appear, though it's in the html code
Code
Select All
3... a6 $44 &#123;compensation&#125; 



researching, writing and testing 25 find/replace commands to patch chessbase symbols is too much work for me. if someone wants to put together a 3 column data table i'll do the rest.
  • column 1 chessbase eval symbol
  • column 2 the $44-type character currently appearing in pgn
  • column 3 proper html equivalent


  
Back to top
WWW  
IP Logged
 
Stefan Buecker
God Member
*****
Offline



Posts: 1381
Location: Germany
Joined: 02/11/09
Gender: Male
Re: How to insert playable PGN games in your posts
Reply #42 - 04/13/11 at 10:49:59
Post Tools
Thanks, Jesse and Tony.



This pgn file was made with ChessBase 8.0, using the command "E-Mail". Also note that castling appears as O-O (as in "Oslo") instead of 0-0 (like zero).
  
Back to top
 
IP Logged
 
GMTonyKosten
YaBB Administrator
*****
Offline


Mr Dynamic?

Posts: 3028
Location: Clermont-Ferrand
Joined: 12/19/02
Gender: Male
Re: How to insert playable PGN games in your posts
Reply #41 - 04/13/11 at 10:37:47
Post Tools
Jesse Gersenson wrote on 04/13/11 at 10:28:51:
(Tony, update to black with: mtforeground=000000)

Done! Smiley
  
Back to top
WWW  
IP Logged
 
Jesse Gersenson
Full Member
***
Offline


Piece value = Mobility
+ targets

Posts: 162
Joined: 09/12/09
Re: How to insert playable PGN games in your posts
Reply #40 - 04/13/11 at 10:28:51
Post Tools
Hi Stefan,

Thanks for the feedback.

seems the variation is currently white text on a white background. black text will make variations visible.

(Tony, update to black with: mtforeground=000000)

Was the pgn made by chessbase?

Compensation symbols appear in your pgn, but they, with the exception of one = sign, are not intelligible to the web browser.

Does anyone have a method to get a usable pgn file, with compensation symbols, from chessbase.

Currently Stephan's pgn includes the characters: $2, $44, $11 where the symbols are meant to appear.

otherwise, I could make a bunch of find/replaces to replace the useless chessbase characters with their proper html counterpart.

An '=' character appears beside seems to appear correctly
  
Back to top
WWW  
IP Logged
 
Stefan Buecker
God Member
*****
Offline



Posts: 1381
Location: Germany
Joined: 02/11/09
Gender: Male
Re: How to insert playable PGN games in your posts
Reply #39 - 04/13/11 at 07:25:07
Post Tools

Many thanks for your excellent work, Jesse! However, my comments after 10...Ne5? are invisible and the "compensation" symbol included twice in the comment is absent. Did I make a mistake?
« Last Edit: 04/13/11 at 10:33:43 by GMTonyKosten »  
Back to top
 
IP Logged
 
GMTonyKosten
YaBB Administrator
*****
Offline


Mr Dynamic?

Posts: 3028
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
WWW  
IP Logged
 
GMTonyKosten
YaBB Administrator
*****
Offline


Mr Dynamic?

Posts: 3028
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
WWW  
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: 2984
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: 2984
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: 3028
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
WWW  
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
 
Smyslov_Fan
YaBB Moderator
Correspondence fan
*****
Offline


Progress depends on the
unreasonable man. ~GBS

Posts: 6902
Joined: 06/15/05
Re: Replayable chessgames
Reply #23 - 04/06/11 at 13:03:12
Post Tools
Woo hoo! Great job Jesse! (It's not too early to celebrate yet, is it?)
  
Back to top
 
IP Logged
 
Klick
God Member
*****
Offline



Posts: 528
Joined: 01/31/03
Re: Replayable chessgames
Reply #22 - 04/06/11 at 08:46:29
Post Tools
Regular expression? Should be relatively simple.

Edit: Changing the regular expression
Code
Select All
[pgn\](.*?)\[/pgn\]
 

in
Code
Select All
$message =~ s~\[pgn\](.*?)\[/pgn\]~<div><object type="application/x-shockwave-flash" data="http://chessflash.com/releases/latest/ChessFlash.swf" width="100%" height="350"><param name="movie" value="http://chessflash.com/releases/latest/ChessFlash.swf" /><param name="flashvars" fffff&pgndata=$1'/></object></div>~isg;

 

should do the trick, but I think it`s best if someone familiar with Perl tests it, just as Jesse requests.
  

There just isn't enough televised chess - DAVID LETTERMAN
Back to top
 
IP Logged
 
Jesse Gersenson
Full Member
***
Offline


Piece value = Mobility
+ targets

Posts: 162
Joined: 09/12/09
Re: Replayable chessgames
Reply #21 - 04/06/11 at 07:34:58
Post Tools
[highlight]Attention Perl Programers: help needed[/highlight]

For the chessflash feature to work correctly, Line breaks need to be removed and single quote characters need to be converted to single right quotation marks from $1 in this block:
[code]$message =~ s~\[pgn\](.*?)\[/pgn\]~<div><object type="application/x-shockwave-flash" data="http://chessflash.com/releases/latest/ChessFlash.swf" width="100%" height="350"><param name="movie" value="http://chessflash.com/releases/latest/ChessFlash.swf" /><param name="flashvars" fffff&pgndata=$1'/></object></div>~isg;[/code]

must work with perl version: 5.8.8

quick online search suggests these find/replace to remove the line breaks:
[code]$pgn =~ s/\015?\012?$//;[/code]
or
[code]$pgn =~ s/[\r\n]+//g;[/code]
  
Back to top
WWW  
IP Logged
 
Matemax
God Member
*****
Offline


Chesspub gives you strength!

Posts: 1302
Joined: 11/04/07
Re: Replayable chessgames
Reply #20 - 04/06/11 at 07:17:58
Post Tools


nice - only needs a bit correcting - all " " have to be deleted
  
Back to top
 
IP Logged
 
Klick
God Member
*****
Offline



Posts: 528
Joined: 01/31/03
Re: Replayable chessgames
Reply #19 - 04/06/11 at 06:48:35
Post Tools


Wow, way beyond cool.
Kudos to Jesse for the effort and Tony for adding the code.

Testing if this interfers with posting board-image:
* * * * * * * *
* * * * * * * *
* * * * * * * *
* * * * * * * *
* * * * * * * *
* * * * * * * *
* * * * * * * *
* * * * * * * *
*

As I post this there are 4 games being shown on the page. I`m not noticing that page-loading is getting particularly slow.
  

There just isn't enough televised chess - DAVID LETTERMAN
Back to top
 
IP Logged
 
Stigma
God Member
*****
Offline


There is a crack in everything.

Posts: 2984
Joined: 11/07/06
Gender: Male
Re: Replayable chessgames
Reply #18 - 04/06/11 at 02:14:01
Post Tools
Can you also get the pgn headers embedded in the viewer? Let me try:



This seems to work. But only if there are no line shifts ("enter") between the first pgn header and the first move. Maybe there's also some limitation on which headers are accepted.
  

Improvement begins at the edge of your comfort zone. -Jonathan Rowson
Back to top
 
IP Logged
 
GMTonyKosten
YaBB Administrator
*****
Offline


Mr Dynamic?

Posts: 3028
Location: Clermont-Ferrand
Joined: 12/19/02
Gender: Male
Re: Replayable chessgames
Reply #17 - 04/06/11 at 01:10:17
Post Tools
OK, I've added the code and now I'm going to give it a try:

Averbakh - Kotov, 1953



  
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 #16 - 04/05/11 at 12:42:23
Post Tools
should show a board with 2 moves

  
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 #15 - 04/05/11 at 06:49:01
Post Tools
[b]testing ... why [b]was there an unclosed tag
[/b]
  
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 #14 - 04/04/11 at 13:10:18
Post Tools
Markovich,

Yabb 2.4 is open source code written in Perl.

http://sourceforge.net/projects/yabb/files/YaBB%202/2.4/
  
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 #13 - 04/03/11 at 18:56:13
Post Tools
Hi Tony,

attached is the (untested) code needed to enable a pgn] tag which displays the pgn with the chessflash viewer.

post the file to
[code]cgi-bin/yabb2/Sources/YaBBC.pl [/code]


note: if several boards appear on the same page, the page may get slow. There is a simple workaround which requires a few js's to be added to the site.

the line i added is a simple find and replace
[code]
$message =~ s~\[pgn\](.*?)\[/pgn\]~<div><object type="application/x-shockwave-flash" data="http://chessflash.com/releases/latest/ChessFlash.swf" width="100%" height="350"><param name="movie" value="http://chessflash.com/releases/latest/ChessFlash.swf" /><param name="flashvars" fffff&pgndata=$1'/></object></div>~isg;
[/code]


[Event "Ed vs. Bob"]
[Site "Ed's garage"]
[Date "2011.04.03"]
[Round "1"]
[White "Bob"]
[Black "Ed"]
[Result "*"]
[BlackElo "400"]
[ECO "A00"]
[Opening "Kadas (Desprez) Opening"]
[Time "21:36:59"]
[Variation "Grand Prix, Tal Defence, 1.e4 c5 2.f4 d5"]
[WhiteElo "2400"]
[TimeControl "120+6"]
[PlyCount "22"]
[WhiteType "human"]
[BlackType "human"]

[pgn] 1. h4 {The wild west of opening theory.} g5 {an unsound gambit.} 2. f4 e5 3. d4 d5 4. e4 c5 5. b4 a5 6. a4 b5 7. c4 f5 8. Rh3 h5 9. g4 Rh6 10. Ra2 Rha6 11. Rb3 R8a7 [/pgn]
« Last Edit: 04/06/11 at 00:55:53 by GMTonyKosten »  

YaBBC.txt ( 22 KB | Downloads )
Back to top
WWW  
IP Logged
 
Markovich
God Member
*****
Offline



Posts: 6099
Location: Columbus, Ohio
Joined: 09/17/04
Re: Replayable chessgames
Reply #12 - 04/03/11 at 16:25:42
Post Tools
Frankly I think the forum would need to be re-written outside Yabb to make this possible.  Perhaps I am wrong.
  

The Great Oz has spoken!
Back to top
 
IP Logged
 
Jesse Gersenson
Full Member
***
Offline


Piece value = Mobility
+ targets

Posts: 162
Joined: 09/12/09
Re: Replayable chessgames
Reply #11 - 04/03/11 at 09:13:06
Post Tools
Here's the response from Glenn Wilson, the developer of chessflash.

Hi Jesse,

I appreciate your interest in ChessFlash and in trying to get it to work on your forum.  I have no particular Yabb knowledge and probably can't help with the specifics.  Many forums restrict what html and embedding users may post to make sure the forum continues to work -- I can't blame anyone for that.   But, that also means in some cases that ChessFlash can't be used.

I don't know if it is of any help but here is an example of a forum where they were able to make ChessFlash work.
http://icsdiscussion.forumotion.net/t40-display-testing-ground#200

I have looked at the links you sent and read your discussion and think you are likely on the right track -- the Yabb developers may need to add the functionality.  Another possibility (which may or may not apply to Yabb) is that an administrator can turn on/off certain restrictions which would allow the "normal" ChessFlash code to be embedded and interpreted correctly.

Regards and Good Luck,
Glenn
  
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 #10 - 04/02/11 at 06:39:16
Post Tools
i read through yabb's [media] code. seems like it's only able to recognize a .swf file as a swf file if the file name ends with .swf. this means .swf?pgndatahere wouldn't work out of the box. but that it could work.

someone should write the yabb developers and ask them to build a [pgn] function. would be simple for them. they take the pgn and build this

Code
Select All
<object type="application/x-shockwave-flash" data="http://chessflash.com/releases/latest/ChessFlash.swf" width="100%" height="350">

<param name="movie" value="http://chessflash.com/releases/latest/ChessFlash.swf" />

<param name="flashvars" tbackground=ffffff&pgndata=_pgn_'/>

</object> 

  
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 #9 - 04/02/11 at 05:55:31
Post Tools
base code:
[code][media]http://chessflash.com/releases/latest/ChessFlash.swf[/media][/code]

i'd guess the pgn data needs to be appended to the url. maybe something like
http://chessflash.com/releases/latest/ChessFlash.swf?flashvars='pgndata'

working example:
[url]http://chessflash.com/releases/latest/ChessFlash.swfFlashVars='orientation=H&tabmode=false&light=f4f4fF&dark=0072b9&bordertext=494949&headerforeground=ffffff&mtforeground=000000&mtvariations=FF0000&mtmainline=000000&mtbackground=ffffff&boardonly=true&autoplay=true&pgndata=[Event "Computer chess game"] [Site "somewhere"] [Date "2011.01.23"] [Round "?"] [White "Gersenson"] [Black "Bohuslav Krouzek "] [Result "1-0"] [BlackElo "1737"] [ECO "B19"] [Opening "Caro-Kann"] [Time "15:26:14"] [Variation "Classical, Spassky, 10.Qxd3 e6 11.Bf4"] [WhiteElo "1750"] [TimeControl "180"] [Termination "normal"] [PlyCount "149"] [WhiteType "human"] [BlackType "human"] 1. e4 d5'[/url]

i wrote the developer of chessflash - will report back if he says anything interesting. another option would be to make a plugin for the Yabb forum software which is running this site. such a plug exists for wordpress.

then, we could post a pgn and simply wrap it in the tags [pgn] ... [/pgn]
  
Back to top
WWW  
IP Logged
 
Klick
God Member
*****
Offline



Posts: 528
Joined: 01/31/03
Re: Replayable chessgames
Reply #8 - 04/01/11 at 20:55:03
Post Tools
Seems you are on to something here Jesse, whats the code you used?
  

There just isn't enough televised chess - DAVID LETTERMAN
Back to top
 
IP Logged
 
Klick
God Member
*****
Offline



Posts: 528
Joined: 01/31/03
Re: Replayable chessgames
Reply #7 - 03/20/11 at 08:05:55
Post Tools
Thank you TalJechin for posting the links, I wasn`t aware of them. Didn`t seem like Tony thought it was a good idea.
  

There just isn't enough televised chess - DAVID LETTERMAN
Back to top
 
IP Logged
 
Uhohspaghettio
God Member
*****
Offline


I Love ChessPublishing!

Posts: 510
Joined: 02/23/11
Re: Replayable chessgames
Reply #6 - 03/11/11 at 20:27:32
Post Tools
I would like this as well. Even Super GMs like to have the board, because it is just better than plain algebraic notation or algebraic notation with diagrams. I read about how Fischer liked to bring around a pocket set with him, even though he could obviously analyze "blindfold" if he wanted to. However much you can see, I think you could see a little more with a moveable board.
  

"I don't recall saying good luck."
Back to top
 
IP Logged
 
TalJechin
God Member
*****
Offline


There is no secret ingredient.

Posts: 2892
Location: Malmö
Joined: 08/12/04
Gender: Male
Re: Replayable chessgames
Reply #5 - 03/10/11 at 22:08:43
Post Tools
  
Back to top
 
IP Logged
 
Jupp53
God Member
*****
Offline


be

Posts: 845
Location: Frankfurt/Main
Joined: 01/04/09
Gender: Male
Re: Replayable chessgames
Reply #4 - 03/10/11 at 21:53:00
Post Tools
I can't remember.
  

Medical textbooks say I should be dead since April 2002.
Dum spiro spero. Smiley
Back to top
 
IP Logged
 
Klick
God Member
*****
Offline



Posts: 528
Joined: 01/31/03
Re: Replayable chessgames
Reply #3 - 03/10/11 at 12:25:24
Post Tools
Quote:
It has been proposed earlier. I'd like it, but why repeat this?


I for one haven`t seen it proposed elsewhere on the forum, where did you see it?
  

There just isn't enough televised chess - DAVID LETTERMAN
Back to top
 
IP Logged
 
Jupp53
God Member
*****
Offline


be

Posts: 845
Location: Frankfurt/Main
Joined: 01/04/09
Gender: Male
Re: Replayable chessgames
Reply #2 - 03/10/11 at 09:10:58
Post Tools
It has been proposed earlier. I'd like it, but why repeat this?
  

Medical textbooks say I should be dead since April 2002.
Dum spiro spero. Smiley
Back to top
 
IP Logged
 
Klick
God Member
*****
Offline



Posts: 528
Joined: 01/31/03
Re: Replayable chessgames
Reply #1 - 03/09/11 at 18:54:25
Post Tools
I`m rather perplexed. Nobody else would like to be able to post and play through games directly in the forum?
  

There just isn't enough televised chess - DAVID LETTERMAN
Back to top
 
IP Logged
 
Klick
God Member
*****
Offline



Posts: 528
Joined: 01/31/03
How to insert playable PGN games in your posts
12/29/10 at 15:51:56
Post Tools
I found a reference to Chessflash (at chessflash.com) which takes a pgn file and makes a replayable chessgame which can be posted to a webpage at the end of this thread: http://www.chesspub.com/cgi-bin/yabb2/YaBB.pl?num=1264171694/0#5

Adding the option of posting replayable chess-games really is an excellent suggestion! My programming experience tells me that it should be a piece of cake to make such posting in the forum possible.

Here is an example: http://roadtograndmaster.com/?p=219

« Last Edit: 04/13/11 at 00:50:03 by GMTonyKosten »  

There just isn't enough televised chess - DAVID LETTERMAN
Back to top
 
IP Logged
 
Bookmarks: del.icio.us Digg Facebook Google Google+ Linked in reddit StumbleUpon Twitter Yahoo