Liquid Egg Product
The Shawn Bradley of Weblogs
"Besides, being a mascot has its advantages. Like you can randomly hug cute chicks and no one's going to freak out. But you have to touch some men, too, so no one gets suspicious."
-- The Mascot

Modifying Chess Publisher

I’ve had a couple questions regarding the handy PGN viewer Chess Publisher. A bit of code can be used to change the default formatting; here are the steps:

1. The move list should be prefaced by: <div style='height:270px;overflow:auto;'> and end with: </div>. This causes the moves not to wrap under the board.

2. If you want a move to start on its own line, preface it with <br>.

3. (optional) Do #3 only if you don’t want the scroll bar! You’ll need to change the height so it contains the whole move list. This also means you need to change the height in the “iframe” code Chess Publisher has you paste on your site. The iframe height should be 70 more than the div height specified in step 1.

That’s it!

It’s possible to use HTML tags in the move list as well (<b>1. e4</b> bold, etc.) However, using HTML formatting in the bracketed comments may interfere with the play button functionality. I don’t remember which tag triggered that problem.

November 27th, 2007 5 comments
Posted by Donnie Filed under Chess

  1. Blue Devil Knight posted the following on 27 November 2007 at 4:08 pm.

    Awesome!!! I’ll test it out tonight…

        Reply to Blue Devil Knight
  2. Derek Slater posted the following on 27 November 2007 at 4:30 pm.

    Handy tho it is, I am surprised that I haven’t seen others noting that embedding a chesspublisher game or two DRAMATICALLY slows down your page loading time. Is it just me?

        Reply to Derek Slater
  3. gorckat posted the following on 28 November 2007 at 10:19 am.

    @DS: I was wondering the same thing. I’m just starting my blog and in my first attempt to share a game, used several diagrams from Chessup.net (I think that’s the right site/url) and then found ChessPublisher.

    Posts on Chessaholic and BDK’s site loaded well enough on my PC at work just now, and our connection is a hideous T1 cobbled together with what I’m guessing are copper plated midget whiskers.

    I’m probably gonna keep PGN viewer stuff ‘after the jump’ so my main page isn’t affected.

        Reply to gorckat
  4. Donnie posted the following on 28 November 2007 at 1:56 pm.

    For me, the speed difference is there, but not extremely noticeable. The more annoying thing for me that using Chess Publisher throws in extra links for the back button (at least in Opera, haven’t tested with another browsers).

    I’ll try to keep only one game up at a time in the future.

    I do plan on moving away from CP to something I can stick on my own server. In other words, combining the convenience of CP, without taking the hit of accessing someone else’s page. Just haven’t been motivated enough yet.

        Reply to Donnie
  5. Blue Devil Knight posted the following on 28 November 2007 at 6:45 pm.

    Derek’s concern voices why I resisted posting games for so long. Now that they have switched from applets to scripts, the problem has abated a large degree. Also, they don’t cause the browser to completely just hang like applets. It just takes a bit of time for the somewhat klunky Chesspublisher 2.0 to load while the rest of the content sits and stares at the white box.

        Reply to Blue Devil Knight

Leave a reply