How to post chess games

General discussion about computer chess...
User avatar
Uly
Posts: 838
Joined: Thu Jun 10, 2010 5:33 am

Re: How to post chess games

Post by Uly » Thu Jan 05, 2012 8:59 pm

That's a weird request, as by the time the user scrolls down, he has missed the start of the game.

What about the auto-playing starts when the game appears on the screen?

Something like Google's image search:

https://www.google.com/search?hl=en&com ... sQKoyOiRCg

There, only the top images are loaded, others are loaded when you scroll down to see them.

User avatar
kingliveson
Posts: 1388
Joined: Thu Jun 10, 2010 1:22 am
Real Name: Franklin Titus
Location: 28°32'1"N 81°22'33"W

Re: How to post chess games

Post by kingliveson » Fri Jan 06, 2012 6:44 am

Uly wrote:That's a weird request, as by the time the user scrolls down, he has missed the start of the game.
I have seen it on other forums and kind of like the idea. It's sort of an attention grabber. And by the way, you assumed only guys are interested. :P
PAWN : Knight >> Bishop >> Rook >>Queen

Jeremy Bernstein
Site Admin
Posts: 1226
Joined: Wed Jun 09, 2010 7:49 am
Real Name: Jeremy Bernstein
Location: Berlin, Germany
Contact:

Re: How to post chess games

Post by Jeremy Bernstein » Fri Jan 06, 2012 6:47 am

kingliveson wrote:
Uly wrote:That's a weird request, as by the time the user scrolls down, he has missed the start of the game.
I have seen it on other forums and kind of like the idea. And by the way, you assumed only guys are interested. :P
Girls scroll faster.

I'll look into implementing those additional user commands in some reasonable manner, but it is (or was, when I last looked) non-trivial, due to phpBB's tag implementation.

User avatar
kingliveson
Posts: 1388
Joined: Thu Jun 10, 2010 1:22 am
Real Name: Franklin Titus
Location: 28°32'1"N 81°22'33"W

Re: How to post chess games

Post by kingliveson » Fri Jan 06, 2012 6:54 am

Jeremy Bernstein wrote:
kingliveson wrote:
Uly wrote:That's a weird request, as by the time the user scrolls down, he has missed the start of the game.
I have seen it on other forums and kind of like the idea. And by the way, you assumed only guys are interested. :P
Girls scroll faster.

I'll look into implementing those additional user commands in some reasonable manner, but it is (or was, when I last looked) non-trivial, due to phpBB's tag implementation.
Great, thanks!! Edited while you post. As I said above, when you see the pieces moving, it gets your immediate attention, at least for me it does.
PAWN : Knight >> Bishop >> Rook >>Queen

pgn4web
Posts: 97
Joined: Mon Jun 14, 2010 10:26 pm

Re: How to post chess games

Post by pgn4web » Fri Jan 06, 2012 11:01 am

Jeremy Bernstein wrote:
kingliveson wrote:
Uly wrote:That's a weird request, as by the time the user scrolls down, he has missed the start of the game.
I have seen it on other forums and kind of like the idea. And by the way, you assumed only guys are interested. :P
Girls scroll faster.

I'll look into implementing those additional user commands in some reasonable manner, but it is (or was, when I last looked) non-trivial, due to phpBB's tag implementation.
I'm no expert in phpbb bbcode, but it might be relatively easy to add the autoplay options and other options (like starting from a move in the middle of the game) if you define the tag following the template

Code: Select all

[pgn={TEXT1}]{TEXT2}[/pgn]
as

Code: Select all

[pgn=&autoplayMode=true&initialHalfmove=9] ... [/pgn]
Then you take TEXT1 and you append that to the URL of the pgn4web board.html iframe.
You probably need to do some validation of TEXT1, otherwise a bogus string might cause harm and I'm not sure phpbb would allow the = sign in TEXT1.

With some more pre-processing of the options you could get to this format

Code: Select all

[pgn= autoplayMode=true initialHalfmove=9] ... [/pgn]
If you stick to the options as defined by board.html the implementation of a number of features is relatively straightforward.

The request to start the autoplay only when the user scrolls to the chessboard and makes it visible, that's A LOT more tricky, I have no easy suggestions for that...

User avatar
Uly
Posts: 838
Joined: Thu Jun 10, 2010 5:33 am

Re: How to post chess games

Post by Uly » Fri Jan 06, 2012 4:26 pm

Well, that's great from the poster's perspective, but from the user's perspective I'd like an option to shut down generally all boards that play themselves (without user input), it'd be annoying if I want to watch some games and have to stop and restart them to watch them at my own pace, from the start, every time.

Can pgn4web be linked to the User Control Panel to set such options?

pgn4web
Posts: 97
Joined: Mon Jun 14, 2010 10:26 pm

Re: How to post chess games

Post by pgn4web » Fri Jan 06, 2012 4:51 pm

Uly wrote:Well, that's great from the poster's perspective, but from the user's perspective I'd like an option to shut down generally all boards that play themselves (without user input), it'd be annoying if I want to watch some games and have to stop and restart them to watch them at my own pace, from the start, every time.

Can pgn4web be linked to the User Control Panel to set such options?
The current pgn4web based chessboards are generated using the phpbb facility for "custom bbcodes". As far as I can tell (but I'm no phpbb expert) within that facility there's nothing that would allow settings based on viewer's preferences.
It *might* be possible to support the functionality you are looking for using (instead of a custom bbcode) a "phpbb mod" i.e. a custom code package enhancing the phpbb functionality; I believe that within a phpbb mod you can define user based settings. But it's a lot more work to write a "phpbb mod" than a "custom bbcode".

pgn4web
Posts: 97
Joined: Mon Jun 14, 2010 10:26 pm

Re: How to post chess games

Post by pgn4web » Tue Jan 17, 2012 11:51 am

Just fixed a small bug with Internet Explorer 9 with the chess font selection and display.
Nothing more than a cosmetic issue, I believe it's IE9 fault to apply some styles under certain conditions.

Since you are using customized code, you should apply following corrections:

1) for each of the fonts/*.css files, look at the lines referring to *.eot files, such as

Code: Select all

src: url('LiberationSans-Bold.eot');
and change them by adding a format option like this:

Code: Select all

src: url('LiberationSans-Bold.eot') format('embedded-opentype');
2) in the file board.html change the .header css definition from

Code: Select all

.header {
  color: black;
  font-weight: bold;
}
adding the font-family definition to

Code: Select all

.header {
  color: black;
  font-family: 'pgn4web Liberation Sans', sans-serif;
  font-weight: bold;
}

pgn4web
Posts: 97
Joined: Mon Jun 14, 2010 10:26 pm

Re: How to post chess games

Post by pgn4web » Wed Jan 18, 2012 4:46 pm

pgn4web wrote:Just fixed a small bug with Internet Explorer 9 with the chess font selection and display.
Nothing more than a cosmetic issue, I believe it's IE9 fault to apply some styles under certain conditions.

Since you are using customized code, you should apply following corrections
On second thought, it seems this fix is not really working as expected... I'll try figuring out why...

Jeremy Bernstein
Site Admin
Posts: 1226
Joined: Wed Jun 09, 2010 7:49 am
Real Name: Jeremy Bernstein
Location: Berlin, Germany
Contact:

Re: How to post chess games

Post by Jeremy Bernstein » Wed Jan 18, 2012 4:48 pm

pgn4web wrote:
pgn4web wrote:Just fixed a small bug with Internet Explorer 9 with the chess font selection and display.
Nothing more than a cosmetic issue, I believe it's IE9 fault to apply some styles under certain conditions.

Since you are using customized code, you should apply following corrections
On second thought, it seems this fix is not really working as expected... I'll try figuring out why...
Thanks for the heads up!

Post Reply