Check out Balbo's Chess, our featured variant for October, 2024.


[ 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
Diagram Designer. Lets you display diagrams without uploading any graphics.[All Comments] [Add Comment or Rating]
Kevin Pacey wrote on Sat, Jan 20 03:19 PM UTC in reply to Fergus Duniho from 01:20 PM:

Last night I did open links on the details section on Diagram Designer Page, but I still could not quite get my head around what the showpiece.php script was all about. It looked like something a Diagram Designer really ought to be able to generate by putting a piece into the diagram somehow, but I was afraid it's something you have to type in character by character somewhere, and then cut and paste somewhere. Maybe there was technical stuff a user should know about (e.g. HTML knowledge assumed).

Whatever the old way of generating an individual piece was, I could not get my head around that either, and technical stuff is not always easy to explain to someone unfamiliar with modern computers/software, unless a ready example or two is available. I was quite happy when I realized I could put an individual piece on a 1x1 'board' (i.e. single square) using the drawdiagram.php. The method is quick and easy, if not 'brilliant', though it produces an image of the sort you seem to no longer be quite satisfied with, after second thoughts (maybe years later[?]). Too bad drawdiagram.php does not work if a 0x0 board were specified, to leave out the image of a single 'square'.


🕸💡📝Fergus Duniho wrote on Sat, Jan 20 01:20 PM UTC in reply to Kevin Pacey from 03:37 AM:

The showpiece.php script is not the old way. It is newer than even shortcodes. Both are described on this page in a details section that you have to click on to open. Unlike this script, which draws a piece on a colored space surrounded by a colored border, showpiece.php will draw nothing but the piece, and it will be against a transparent background. While displaying individual pieces with showpiece.php is preferable to using drawdiagram.php, it is mainly intended for use with Game Courier or Interactive Diagrams, and shortcodes remain the best thing to use for illustrating member-submitted rules pages.


Kevin Pacey wrote on Sat, Jan 20 03:37 AM UTC in reply to Fergus Duniho from Fri Mar 11 2016 04:04 PM:

Here's a post with a bit of history. In case there was doubt, it wasn't my imagination that I/other(s) had been allowed since long ago to use drawdiagram.php to display individual pieces in submissions:

Fergus wrote (on 11 Mar 2016):

"Since some contributors have been using drawdiagram.php to display individual pieces, I have made a couple changes.

  1. When drawdiagram.php is used to display a single piece image, it will not display coordinate labels.

  2. The Diagram Designer now includes code you can cut and paste for displaying the piece images used in your diagram. This code places piece images within FIGURE.piece tags with a caption, and I have added CSS to the global css files for formatting the piece class for FIGURE..."

[edit: Where did I more recently get the idea I was no longer allowed to display individual pieces my old way?:

Fergus wrote on Tue, Jan 16 04:28 PM EST (in a Comment to my Waffle Chess rules page): "I used shortcodes to display the Waffle piece image, as drawdiagram.php is meant for diagrams, not for displaying individual pieces..."]

edit2: to be fair, displaying an individual piece with shortcodes these days (don't think it was always an available option) is fairly easy (once I saw Fergus' example on my rules page), I hadn't noticed that method. Displaying individual pieces with the showpiece.php script (or whatever Fergus' old way was, if different), on the other hand, is a process I never understood, and it seemed lengthy however it is done.


🕸💡📝Fergus Duniho wrote on Wed, Nov 29, 2023 04:52 PM UTC:

I have fixed this so that setting the group changes the available sets like it does in Game Courier, using JavaScript without any need to reload the page.


🕸💡📝Fergus Duniho wrote on Thu, Nov 23, 2023 02:47 AM UTC:

I've reorganized this page to be less cluttered and more mobile-friendly, and I've updated the details on how to display individual pieces. I'll continue work on it tomorrow.


🕸💡📝Fergus Duniho wrote on Sat, Apr 8, 2023 04:48 PM UTC in reply to David Paulowich from 02:56 PM:

I have now redesigned the layout with flexbox.


🕸💡📝Fergus Duniho wrote on Sat, Apr 8, 2023 04:25 PM UTC in reply to Siwakorn Songrag from 01:41 PM:

What heppened with diagram designer? It's some kind of bug because diagram is going to obscured on something and prevent me for change that such as piece style.

I moved the form up higher to make it level with the diagram. This didn't cause any problems on my wide HD screen, but when I made the window narrower just now, I saw that the diagram was overlapping with the form. I'll look into fixing that.


David Paulowich wrote on Sat, Apr 8, 2023 02:56 PM UTC:

Common Parameters for all Shapes used to be lower down on this page - avoiding the current problem. I believe the HTML and Markdown boxes were above it before.


Siwakorn Songrag wrote on Sat, Apr 8, 2023 01:41 PM UTC:

What heppened with diagram designer? It's some kind of bug because diagram is going to obscured on something and prevent me for change that such as piece style.


Edward Webb wrote on Sat, Feb 4, 2023 07:47 PM UTC:

The set groups Chushin Shogi and Taishin Shogi have no working graphics for any of the sets listed.


🕸💡📝Fergus Duniho wrote on Sat, Jan 7, 2023 06:29 PM UTC:

I have now moved test.php to drawdiagram.php. It now uses the $scale value while drawing the board instead of after it is already drawn. So, if you want to use it with oversized SVG pieces at a size that will still look good when displayed at different sizes, you can do it by setting the scale value. Values under 20 will be interpreted as raw multiples, and values above 20 or with a % at the end will be interpreted as percentages. So, scale=2, scale=200, and scale=200% should all have the same effect. While there are still some issues with this script, I did not notice any that were not already in drawdiagram.php.


🕸💡📝Fergus Duniho wrote on Sat, Jan 7, 2023 01:40 AM UTC in reply to Fergus Duniho from Fri Jan 6 03:14 PM:

I made some progress on this today. It helped that I figured out how to customize the color temperature on my monitor and change the color theme of my text editor. Now that I have a dark background with lower light levels, it's easier to stare at code. In test.php, I got scaling to work for tiled boards, and I got the file markers to show up properly for the grid shape, but there are still issues with displaying full board images.


🕸💡📝Fergus Duniho wrote on Fri, Jan 6, 2023 03:14 PM UTC:

I just remembered this morning that I was working on updating a copy of drawdiagram.php for the sake of using the scale value while drawing the board instead of after it was all drawn, and I got stuck in the section for using board images. Meanwhile, I made some further changes to the main drawdiagram.php script. Before I do anything else with this script, I will have to integrate the change to both versions.


H. G. Muller wrote on Thu, Jan 5, 2023 07:46 AM UTC in reply to Fergus Duniho from 02:21 AM:

The file labels still seem to be positioned incorrectly.


🕸💡📝Fergus Duniho wrote on Thu, Jan 5, 2023 02:21 AM UTC:

I've now gotten drawdiagram.php to accept a theme parameter. This will not work without the game parameter, and it may sometimes require the settings parameter. The theme parameter includes a theme file after the settings file, further modifying settings to conform to a specific theme. Here's one test run with the Motif-Wood theme for Chess.


🕸💡📝Fergus Duniho wrote on Wed, Jan 4, 2023 10:00 PM UTC:

I added some new parameters to drawdiagram.php. These are game and settings. When used together, the script will load a Game Courier settings file, and it will overwrite any value that is still set to a default value. This will allow you to use the fen shortcode to show diagrams for specific games without specifying all the particular details. When you use these two parameters, the fen shortcode will not add its own defaults to the query string. This will allow you to use the default values provided by the settings file instead. But you can override any value in a settings file by explicitly including a new value in the query string.


🕸💡📝Fergus Duniho wrote on Tue, Jan 3, 2023 09:04 PM UTC:

I've now changed the default to the green/white combination I posted last night. For the sake of contrasting with the blue pieces, I made the green brighter than the blue, and I gave it more red than blue. To better contrast with the white pieces and the beige background, I made the light squares an off-white that is darker than full white, and to better contrast with the blue pieces, I made the red and green components slightly higher than the blue component. But I avoided making it into a clear yellow, because the use of yellow generally added to the brightness of the board.


H. G. Muller wrote on Tue, Jan 3, 2023 06:07 PM UTC in reply to Jörg Knappen from 05:28 PM:

Yep, good enough for me.


Jörg Knappen wrote on Tue, Jan 3, 2023 05:28 PM UTC in reply to Fergus Duniho from 02:18 AM:

This green/white layout looks good and has no annoying flaws.


🕸💡📝Fergus Duniho wrote on Tue, Jan 3, 2023 02:18 AM UTC:

I have grown to hate the darkkhaki/whitesmoke board, mainly for the darkkhaki squares, which have begun to look like gold to me. They seem very bright and flashy, as well as less solid.

Here are the characteristics I think the default board should have:

  1. It should not be too loud, bright, or flashy.
  2. It should appear solid enough that it doesn't need a border.
  3. There should be good contrast between all the colors.
  4. It should generally follow a green/white color scheme

🕸💡📝Fergus Duniho wrote on Tue, Jan 3, 2023 01:56 AM UTC in reply to Greg Strong from Mon Jan 2 08:43 PM:

It was using ctype_lower, which checks whether every character is lowercase, and these had numerals in them. So, I replaced ctype_lower with my own function haslower, which checks whether any character in a string is lowercase.


Greg Strong wrote on Mon, Jan 2, 2023 08:43 PM UTC:

The chancellor2 and cardinal2 are not being recolored for some reason.


Jean-Louis Cazaux wrote on Mon, Jan 2, 2023 07:35 PM UTC:

Just trying

This is magic! Thanks HG!


H. G. Muller wrote on Mon, Jan 2, 2023 03:39 PM UTC in reply to Jean-Louis Cazaux from 01:40 PM:

Beside this, how do you do to embedd images of diagrams in your comments? Is there a trick?

Yes, there is a trick, and this is what the discussion is about. Just write a FEN of the position you want to show as part of your text, and surround it by 'tags' [ fen] and [/ fen] (without the internal space, which I just added here to prevent the word 'and' will be interpreted as a FEN of a 3x1 board).

E.g. [ fen]nqkrb/ppppp/5/PPPPP/NQKRB[ /fen] would give you:


Jean-Louis Cazaux wrote on Mon, Jan 2, 2023 01:40 PM UTC in reply to H. G. Muller from Fri Dec 30 2022 10:14 AM:

I'm feeling stupid. This discussion with tens of messages from Fergus, HG, etc. is related to what?

It is linked to Diagram Designer page but I don't understand what it is for. I see no change on that page. Can it be explained?

I do feel my question is stupid but I really don't understand what you are talking about.

Beside this, how do you do to embedd images of diagrams in your comments? Is there a trick?

Thank you.


25 comments displayed

Later Reverse Order EarlierEarliest

Permalink to the exact comments currently displayed.