Comments/Ratings for a Single Item
The diagram designer provides you with the HTML code for all the pieces in your diagram. All you have to do is cut and paste it. And as long as you are sticking to a single piece set, plain HTML is the best way to go. What you have in mind would require an extra parser on top of the HTML parser, and I would rather you just use plain HTML. An alterative more like what you have in mind is to use the play.chessvariants.com/pbm/showpiece.php script I designed for use with displaying rules within Game Courier presets. It takes two parameters, piece and set. But it adds to the work of the server. I recommend using the HTML code provided to you by the Diagram Designer.
I did wonder about turning it the other way, of incorporating text into multi-piece diagram. I realise, however, that it is not just a matter of putting the text in the rank labels as this would give problems if the text ran beyond the bottom of the neighbouring cell.
> Plain HTML is of course what I am already using, Good. Keep it up, but start using the figure-enclosed direct links provided to you within the diagram designer, and stop using the diagram designer to generate drawdiagram.php links for displaying individual pieces. > but it does mean adding a lot of code each time I resume displaying images after text when I am calling the same piece set each time. Is that somehow a problem? > I did wonder about turning it the other way, of incorporating text into multi-piece diagram. That would be a very bad idea. Diagrams should be pictures, and text should be entered as text.
Thanks more to eliminating piece images and Ascii Art from my pages' Setup sections, these now have a uniform simplicity, making Pieces sections look untidy in comparison. It is true that my initial use of drawdiagram.php highlights the duplication, but replcing one long string of code with another doesn't really address the issue. In fact it would not increase code much to substitute a complete movement diagram for each piece in 2d variants ². Is it really impossible to devise a table with one column of images based on a single setting and one column of text - with the two lining up appropriately horizontally, of course?
True, the number of pieces is not on the same scale as the total number of cells in the array diagram. FIDE Chess has 6 as against 64, for example. It does however soon mount up. Shogi has 10 pieces, including promoted forms - and more if one distinguishes Goldgenerals resulting from different promotions. Yonin Toyang Mitregi ³ has 8 piece types that are always array ones, 2 that are array in one variant and promotee in the other, and 6 that are always promotee - 16 in all. In 3d it mounts up still further. Ladies and Generals ³, as an extrapolation of Okisaki to 3d - has 30 piece types, 17 array and 13 promotee, and showing the array piece and its promoted for run together is a significant code saving. Weltschach, as an attampt to square the FIDE back rank in composition as well as number, has 29 array pieces once differently-promotable Stockbrokers are distinguished - which they now are.
If there really isn't any way of streamlining the Pieces section, fair enough, but it would be good if someone (not necessarily the FD, but probably an editor) could design one.
¹ Once I have decided whether to discontinue Kennet, eliminating two further image files, I will issue a full list so that they can also be deleted from the CVP website.
² I would be interested to know whether other CVP participants would welcome such a change. It would make particular sense in Nimrod Chess, Hunterbeest, their Bachelor forms, and Westfield Chess.
³ Rerouting appears to have broken the traditional links to this page, but they can be found by clicking my name, "Items invented...", and the relevant initial letter.
What I meant by inefficient was the problems that I have learned always accompany duplicate code. Over the last few years one of my major tasks at work has been refactoring and centralising tracts of duplicate code. The issues that I know of are that duplication takes up more space, is more susceptible to errors such as typos, and makes extra work if a sudden change is made. The first two I can see applying similarly to substituting another long piece of code. Single-array page will certainly use a single piece set for the array diagram, piece images, and (if any) movement diagrams, and I find it hard to imagine even a multi-array page (be it 3d or multi-subvariant) doing otherwise.
If my idea really is impossible, say so and I will live with it, but don't suggest ways of addressing an imaginary time issue by doing something even more time-consuming.
You're often unclear in expressing yourself. But now that you have explained your concerns, they can be addressed. > The issues that I know of are that duplication takes up more space, The hosting account for this website allows for unlimited storage space, and even a few hundred text files do not take up that much space. > is more susceptible to errors such as typos, If you use the code automatically generated by the Diagram Designer, that will not be a problem. And it is easy enough to spot typos in the URLs to images. You just have to load the page and check whether the image shows up. > and makes extra work if a sudden change is made. A sudden change was made recently, and it was taken care of without changing the image URLs. That change was to start using play.chessvariants.com semantic URLs for user-submitted Game Courier presets. This broke all the relative image links in these files, and it was handled by creating a pseudo membergraphics directory in the play subdomain with an .htaccess file redirecting to the one in the main domain. If a change happened that did require editing the files, duplicate code would make it easy enough to fix it with a search and replace. So, even in that circumstance, duplicate code is not going to make that much extra work. > If my idea really is impossible, say so and I will live with it Impossible is not the only reason things don't get done. I am not in support of your idea, and I have more important things to do than work on this.
11 comments displayed
Permalink to the exact comments currently displayed.
Of course I still have a few variants that do not suit this method of array presentation, and unfortunately but perhaps inevitably they are the ones that did not suit ffen diagrams either. Therefore I am still lumbered with a few actual single images. I am still minded to get rid of Square Versus Hex and Xiangcata on those among other grounds, if no-one calls for them to be retained. I am even wondering about Kennet, as suffragan bishops are a bit of a stretch and the variant is not really that distinctive of its setting. I have however managed to strip out such images in 3 player Honeycomb, Crouching Stepper Hidden Rider, Mixed Radial hex Chess, Heathen Europe Chess, and Yoto and as far as I am concerned the redundant image files can be deleted from the site. The space freed up should make it possible to add movement diagrams to my Man and Beast articles, and I can see a case for putting piece images on the index pages now that my choice of images is so much more distinct.
Another group of pages that I have been unable to edit are, of course, the ones predating post-your-own. It would be useful if an editor could use the new system to match with later variants (e.g. Magna Carta to use a subset of the piece images in 3d Magna Carta, Pink Panther of those in 2 Jewels, Mitregi of those in Mitregi with compounds of duals). On only one page, however, is it urgent to change the array diagram as it is currently misleading. This is Bachelor Kamil, which should have the array image: