Check out Grant Acedrex, our featured variant for April, 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

LatestLater Reverse Order EarlierEarliest
Asylum Chess. 3 new unique pieces: fire-through rooks, double-capture knights, leaping bishops. (10x10, Cells: 100) [All Comments] [Add Comment or Rating]
🕸Fergus Duniho wrote on Fri, Nov 25, 2022 10:05 PM UTC in reply to H. G. Muller from 08:35 AM:

Since your own edits also broke the Game Courier forms, I figured it might not be my use of htmlspecialchars and htmlspecialchars_decode. I determined the problem to be that CkEditor was putting extra whitespace in front of each line, and this was affecting how it processed the variable passed in the TEXTAREA. So, I modified Game Courier to remove the whitespace from each line of this variable. Then I used htmlspecialchars on the appropriate variables before displaying them in editmsitem.php, and I used htmlspecialchars_decode on them before copying them to the database in editmsitem2.php.

But one problem remained. The Game Courier forms included lots of extra whitespace before each line of text in the TEXTAREA. To eliminate this, I wrote a function to trim whitespace off each line of text in a string, and I used this function on the data before sending it to the database in editmsitem2.php. This will have the extra advantage of saving space in the database. However, this will make difficulty for PRE text, but I figure PRE text is no longer as useful as it once was, since most people don't use text-based browsers like Lynx, and because CkEditor reformats text, it makes using PRE text difficult anyway.

Unless people believe there is a need to still accommodate PRE text, I'll start making these same changes to other scripts for editing page content.


🕸Fergus Duniho wrote on Fri, Nov 25, 2022 04:19 PM UTC in reply to H. G. Muller from 08:35 AM:

Yes, just put them back.


H. G. Muller wrote on Fri, Nov 25, 2022 08:35 AM UTC in reply to Fergus Duniho from 02:15 AM:

I don't think the problem is how it is encoded in the database. What matters is how it is presented to the client browser. There cannot be any /textarea tags within the recalled text, or the submission form would not be correctly displayed. When presenting the existing text to the user for editing these must be deleted or replaced by something harmless, or everything following it would not be considered as belonging in the editable area. If that 'something harmless' is something the user would never want to be in the text, it could be automatically substituted back for /textarea when the server receives the submission form, before it stores it in the database.

Anyway, I edited the database to temporarily disarm the textarea tags in the Notes section (by replacing those with texxtarea) so that the article can now be normally edited. I inserted the Interactive Diagram in the Setup section, but the textareas are still disabled. I wonder what to do next. I could put in two smaller Interactive Diagrams configured to be game viewers for the specified sequence of moves on the page itself. But those would not work when JavaScript is disabled. So perhaps I should just put back the textarea tags, and leave it at that?


🕸Fergus Duniho wrote on Fri, Nov 25, 2022 02:15 AM UTC in reply to H. G. Muller from Thu Nov 24 09:51 PM:

I tried using htmlspecialchars for the form and htmlspecialchars_decode for inserting into the database, but something went wrong with the Game Courier forms on the page. So, I reverted things back. I'll try it again later in case I did something wrong.

If you want to, you can edit the database directly. I emailed you information on how to do that.


H. G. Muller wrote on Thu, Nov 24, 2022 09:51 PM UTC in reply to Fergus Duniho from 04:12 PM:

The problem is that the Notes section includes some TEXTAREAs of its own, and when the first one closes, it closes the TEXTAREA the Notes HTML is being displayed in.

I had some problem using textareas in the editor for comments as well, a few days ago; it completely messed up the comment display, and I had a hard time recovering from that, as the edit/reply/view links at the bottom were also clipped off. So this seems a general problem. Is there any solution to it? I suppose this article is in the database, and not in a separate file that I could edit through WinSCP.

Perhaps the script displaying the edit form for submissions can be made to 'disarm' any text it fills the edit boxes with by substituting something else for the word textarea? Inconvenient, of course, as you would have to restore that every time you edit. But better than not being able to edit at all. Perhaps substitute by texxtarea, and make the reverse substitution when the form gets submitted?


🕸Fergus Duniho wrote on Thu, Nov 24, 2022 04:12 PM UTC in reply to H. G. Muller from 08:09 AM:

The problem is that the Notes section includes some TEXTAREAs of its own, and when the first one closes, it closes the TEXTAREA the Notes HTML is being displayed in.


H. G. Muller wrote on Thu, Nov 24, 2022 08:09 AM UTC:

For some reason it is not possible to edit this article through the [edit content] link editors will see at the bottom of the page. That is, you get to the edit form, but when you press the 'Send' button nothing happens. I had no such problems with oter articles.


Bn Em wrote on Wed, Mar 17, 2021 09:34 PM UTC:

It seems that multi‐capturing two‌‐square leapers are oddly popular as knight enhancements: this game has the multi‐capture apparently mandatory for when going to Alibaba destinations, but still allows leaping otherwise; Larry Smith's Li Qi replaces knights with ‘Young’ Chu‐shogi lions, which cannot move back to the starting square, to match its planar linepieces; and ofc H. G.'s Mighty‐lion Chess replaces one knight with a full Lion.

I wonder why?


8 comments displayed

LatestLater Reverse Order EarlierEarliest

Permalink to the exact comments currently displayed.