Check out Symmetric Chess, our featured variant for March, 2024.


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

Comments/Ratings for a Single Item

Earlier Reverse Order Later
Creating a Tag System[Subject Thread] [Add Response]
🕸Fergus Duniho wrote on Sun, Nov 19, 2017 02:45 PM UTC:

I have been thinking about how to do tags on the Chess Variant Pages. What I have in mind is a table with three columns: ItemID, PersonID and Tag. The primary key would be a concatanation of all three. This setup would allow individual members to create and change their own tags, it would keep track of how many members gave a game the same tag, it would let a script display all the tags for a game and all the tags the member viewing the page has given to it, and it would allow for the creation of pages that list all the games given a certain tag.

Presently, there is a Tags table that I think David Howe created, and which he is no longer working on. This table is about describing individual tags. Its columns are tagID, tagName, tagSentence, tagParagraph, and tagParent. I'm not sure what tagParent is for, since this has been left blank in all five rows. I guess what he had in mind was to create a whitelist of tags that people could use to tag pages with. Whereas my experience with sites that let me tag pages is that I am free to make up my own tags.

While using a whitelist of tags could keep things more structured, it would also take a lot of work to come up with an appropriate list, and then it would need a mechanism for letting members select appropriate tags from the list. I'm thinking instead of allowing any tags with the exception of those on a blacklist, which would mainly contain swear words and racial slurs. People could be encouraged to use the same tags by seeing what tags other people have already given to a game. I would limit tags to Game pages with the idea of eventually replacing ItemID with GameID. Or I might use GameID from the start.


Ben Reiniger wrote on Sun, Nov 19, 2017 05:21 PM UTC:

I made the Tags table.  I think I was intending to have a separate table of (ItemID, tagID) for the actual tagging of pages.  I wanted to display a page for each tag, which would have tagParagraph as a long-ish descriptor, followed by a list of games tagged.  tagSentence was meant for a mouse-hover helptext, and/or the short description used in an index page of all tags.

I had invisioned a heirarchy of tags, which is what tagParent was for.  For example, a tag "drops" might have children "pocket" (for self-pocketing pieces), "turncoat" (for dropping captured opponent pieces), etc.

I'm not sure if the number of users giving a game the same tag is particularly useful on this site.  On the other hand, I was thinking of tags mostly describing the game, and I suppose you could have tags about player preferences, which would care a lot about number of responses.


🕸Fergus Duniho wrote on Sun, Nov 19, 2017 11:47 PM UTC:

I renamed the Tags table to TagDetails in case we might want to use it, and I created a new Tags table. I wrote scripts for adding and deleting tags, and I added code to the footer for displaying tags and for using the scripts that add and delete tags. I then checked things out by adding two tags at once to Shatranj, then by deleting one. Both tests worked. I'll later add some CSS formatting to the tags and write a script for listing games with the same tag.


Ben Reiniger wrote on Sun, May 6, 2018 11:10 PM UTC:

The 'tag' column was set for unique entries; I have fixed this.


🕸Fergus Duniho wrote on Sun, May 6, 2018 11:29 PM UTC:

What do you mean?


Ben Reiniger wrote on Mon, May 7, 2018 12:49 AM UTC:

In the database, there was a "unique index" on the Tag column, so the same tag couldn't be used on two different pages or by two different people.  I deleted the index, and was able to give the tag "trigonal" to a couple of pages.

(Your intention, that the three columns together form a "composite primary key," seems to be working.)


🕸Fergus Duniho wrote on Mon, Jul 2, 2018 01:43 PM UTC:

While checking the error logs this morning, I came across errors in index/tagsinfo.php. It is accessing both the TagDetails table and the Tags table. The Tags table is something I recently started, and the TagDetails table is something that someone else (Ben?) had started previously. I notice it was last updated today. So, someone is still working on this. In the database backup, there are some old tables called TaggedItems and Tags. It looks like maybe I renamed Tags to TagDetails, got rid of TaggedItems, and started a completely new tagging system with a new Tags table. The current Tags table is unrelated to the old one, and it has no connection with TagDetails. The current Tags table is a many-to-many table of user-created tags, and each tag is just a string, not something with a description or an ID. This implements an open-ended system for allowing users to add any tag they wish to any page.

It looks like the original tables for tags were trying to implement a closed system of select tags. I'm not sure if they were meant only for editors to add or for anyone to add, since the code never got that far.

I have been thinking of using tagging to better organize the pages, but this may involve making tags less open than they are right now. Any thoughts on how this could be done?

Anyway, when someone else is coding something here, I need to be updated on what is going on. This will help keep things coordinated.


Ben Reiniger wrote on Mon, Jul 2, 2018 02:32 PM UTC:

That's me, I was about to email about some things. I've moved these two comments to the old thread.


8 comments displayed

Earlier Reverse Order Later

Permalink to the exact comments currently displayed.