The Chess Variant Pages
Custom Search

[ Help | Earliest Comments | Latest Comments ]
[ List All Subjects of Discussion | Create New Subject of Discussion ]
[ List Latest Comments Only For Pages | Games | Rated Pages | Rated Games | Subjects of Discussion ]

Comments/Ratings for a Single Item

Later Reverse Order EarlierEarliest
This item is a desktop publishing resource
It belongs to categories: Orthodox chess, 
It was last modified on: 2016-04-09
 By Fergus  Duniho. Diagram Designer. Lets you display diagrams without uploading any graphics.[All Comments] [Add Comment or Rating]
Greg Strong wrote on 2020-09-20 UTC

Ok, I have removed extra whitespace from all piece sets and verified that they all now work in diagram designer.

Fergus Duniho wrote on 2020-09-20 UTC

Ok, maybe I see. Since the space is outside the ?> it gets incorporated into the output stream?

Yes. Unlike Game Courier, which saves an image file to the server, drawdiagram.php simply becomes the image file. So, it's output has to be a pure image file. Since the set file gets included in it, that set file must be free of any text output.

Greg Strong wrote on 2020-09-19 UTC

I am referring to a space in the php file that defines the piece set, not the image file created by the script. The diagram designer executes php code to dynamically create and return a binary image, right? Why would whitespace in the php source code of a program affect its output?

Update: Ok, maybe I see. Since the space is outside the ?> it gets incorporated into the output stream?

Fergus Duniho wrote on 2020-09-19 UTC

The piece sets that don't work with diagram designer all have an extra carriage return at the end.

That makes perfect sense. While the Game Courier scripts create an HTML page, the drawdiagram.php script used by the Diagram Designer produces an image file. If that image file contains any text, even a white space, it is corrupted.

Greg Strong wrote on 2020-09-19 UTC

With some extensive testing I've been able to figure out the issue, although I don't understand it. The piece sets that don't work with diagram designer all have an extra carriage return at the end. Remove it, and they work fine. Take a file that works, put an extra blank line after the ?> line, and it breaks. Very odd for whitespace to break code...

Greg Strong wrote on 2020-09-18 UTC

Oh, ok. I guess that makes sense. Unfortunately, that means the diagram designer can't show uncheckered boards, but that's not critical.

Fergus Duniho wrote on 2020-09-18 UTC

Also, in Game Courier, if there is only one square color, it will draw outlines around the squares as shown in this preset: But Diagram Designer doesn't do this. It just shows a solid board with nothing to separate the squares.

That's a feature of the Table rendering method, which the Diagram Designer does not use. Game Courier does not do this for the GIF, JPG, or PNG methods.

Greg Strong wrote on 2020-09-18 UTC

Some piece sets still won't render a board with diagram designer although all the individual pieces show correctly. My earlier speculation that it involves sets with "for" in the title appears to be incorrect, or there is more to it. The ones that fail all seem to have "for" in the name, but some others containing "for" do work.

Also, in Game Courier, if there is only one square color, it will draw outlines around the squares as shown in this preset: But Diagram Designer doesn't do this. It just shows a solid board with nothing to separate the squares.

Greg Strong wrote on 2020-08-28 UTC

Ah! I think I found the commonality...

The Diagram Designer does not work if the name of the set contains the word "for", such as "Alfaerie for Bifold Chess". Must be a reserved word that is not being escaped somewhere.

Greg Strong wrote on 2020-08-28 UTC

Some piece sets will not work with the diagram designer for some reason, including sets that work fine with game courier.

For example, change the piece set to Alfaerie for Grand Betza. All the pieces show correctly, but the board produces a bad link. But here is a Game Courier preset that uses that same set and works fine:

Whatever it is is not related to the PNG graphics. There are other piece sets that have this problem also.

Fergus Duniho wrote on 2020-04-24 UTC

Yes, just change the set being used. The Alfaerie pieces are not a single set. There are multiple sets that use Alfaerie pieces. To change to another set using Alfaerie pieces, you will need to change the Set Group first. You may select "All" for a complete listing of all sets, or you may select a specific group of sets. The Automatic group contains script generated sets of all images in the same style, and each set in it bases labels on file names. The other groups contain manually written sets using more abbreviated labels. When you change the set, each piece in the new set will show up on the page with the label you need to use for it. Note that all pieces you use must be from the same set. Besides the Automatic sets, the "Alfaerie: Many" set will contain all or most Alfaerie pieces with short, but frequently cryptic, labels. Depending on what pieces are in your game, you might find a smaller set that includes them all.

Thomas wrote on 2020-04-24 UTC

Is it possible to use other pieces from the alfaerie set than those 26 which are displayed and acessible by one letter? I tried around with braces, e.g. {squirrel} or {bsquirrel.gif} but it doesn't work.

Aurelian Florea wrote on 2020-03-22 UTC

The diagram designer has a columns option. That is in relationship with the fen code where the number of blank spaces and pieces added up give the total board size.

Anders Gustafson wrote on 2020-03-22 UTC

Is it possible to adjust the number of ranks and files, on the board, independently?  I can't figure out how to increase the number of ranks without decreasing the number of files, and vice verse. 

Aurelian Florea wrote on 2020-02-19 UTC

Sorry, I knew about that. I meant HG's interactive diagram :)! And thanks for the info :)!

Fergus Duniho wrote on 2020-02-19 UTC

It can handle hexagonal boards and custom boards with spaces arranged in a grid, but I have not added in code for circular boards or for custom boards with custom spaces.

H. G. Muller wrote on 2020-02-19 UTC

The 'diagram designer' was not made by me, but by Fergus. I am only responsible for the 'Interactive Diagram'. Because you explicitly address me, I will answer for the latter:

It is certainly not possible in the Interactive Diagram to use other board topologies, such as hexagonal bords, or circularly deformed boards. All boards must consist of a corner-connected grid of squares. Irregular shapes of such boards (such as e.g. in Omega Chess, with its wizzard squares, or the citadel of Tamerlane Chess) can be emulated by declaring some squares in the smallest surrounding rectangle to be inaccessible 'holes'. The Design Wizard in the Interactive Diagram article has no provisions for defining those, though. But you can just edit the HTML code that it delivers to add the holes; you only need to define an extra 'piece' with the name 'hole', followed by a list of squares that should be holes.

Aurelian Florea wrote on 2020-02-19 UTC


Is it possible to make with the diagram designer  boards that are not rectangular?

Greg Strong wrote on 2019-07-09 UTC

Good job tracking down those pages!  Fortunately not too bad.  Gilman has over 250 pages so I was afraid it could be much worse...

Given the scope, I don't mind taking it on, probably manually.  I'll probably take me a couple weeks to get through them but they've been broken for a while so I don't think fixing them is super urgent, so long as it gets accomplished.

Ben Reiniger wrote on 2019-07-08 UTC

The change of interpretation of the period from movement-marker to single empty square has affected a few pages.  (The changes were documented in this comment thread; a bug report was made at .) 

I have added the new functionality's description to the introduction here.

I've identified 25 affected pages, all but one of them by Charles Gilman.  (I only ran the search on member-submitted pages' Pieces section.  There were 4 false positives in the regex [from another author], so perhaps not all of these actually have problems.  The other affected page is an old never-published submission.)


There might be a regex solution to fixing all of these pages, which seems superior to doing them by hand or splitting off a version of this script for the old period-markers, but I don't want to accidentally break anything more.  I think the periods that need to be replaced can be described as those following `drawdiagram.php`...`code=`, before any closing `>` or argument-separating `&`.  I'll think/look at it more later, but comments are eagerly solicited.

Ben Reiniger wrote on 2019-05-28 UTC

Background images work for the "Custom Grid" Shape.

Greg Strong wrote on 2019-05-25 UTC

Is it possible to get a background image with the diagram desiginer?  It has a pick-list for the option, but it doesn't seem to do anything.

I tried adding &bgimage=marble-gw.png to the code it generated but that didn't do it for some reason.

H. G. Muller wrote on 2018-11-21 UTC

Uploading images would defeat the purpose of having an on-line generator, as you would have to fix the color and sizes at generation time.

Kevin Pacey wrote on 2018-11-19 UTC

Apparently with Game Courier you can create your own piece set (i.e. a collection of images), which could then be used with GC or Diagram Designer (which uses pieces sets currently available from GC), but if you wish to upload images to this website (for use by GC/DD, at least) you ought to ask Fergus or perhaps another editor to do that for you, I gather from the following GC instruction sub-link (I've never tried to create my own piece set as yet, and it may be beyond my current know-how if I ever wished to do so):

H. G. Muller wrote on 2018-11-18 UTC

I don't know anything about GC. But if it allows the use of off-site image files for the pieces (like http://...) it would also be possible to put the URL of the SVG generator there, requesting the desired piece. If the requested 'FEN' is 1x1, it will be rendered with transparent background, as the generator will assume you just want an individual piece to be used in a larger image. This is what I actually did below.

I know this works for the Interactive Diagram. This is what I actually used in the 'Board Editor' posted in the Alfaerie comments; it uses an Interactive Diagram to let the user set up the desired board position, and it uses the SVG generator to supply the individual pieces in it.

25 comments displayed

Later Reverse Order EarlierEarliest

Permalink to the exact comments currently displayed.