Comments/Ratings for a Single Item
This is especially useful for finding variants in the intersection of various categories. For instance, to find 3D variants where there is some kind of hexagonal component (hex prism or tetrahedral e.g.), set up the search just for 3D variants, then modify the resulting URL so that it includes "category=3D,hexagonal".
Editing the URL like that is no longer necessary if you have JavaScripts. (If you don't have JavaScripts, the form will probably still work, but without possibility to select multiple categories.)
This page currently has an absolute link to the .org version of mainquery.php
. For the page to work in both locations, a relative link would be better.
I tried to test that out on the .org site (new better testing practices, yay!), but found that I cannot log on there because the login page has an absolute url to the .com version of the login script.
Burninate all the absolute urls?
I have been working on replacing absolute URLs with relative URLs. But I had mainly been looking for chessvariants.com URLs. I guess I'll have to look for chessvariants.org URLs too.
I have updated queryinc.php, which this makes use of. While I will still continue working on it, I have released a stable version with these features:
- To avoid any confusion, only one set of search results will be displayed, and these will be regular search results.
- If you're interested in seeing just Primary Links, there is a separate option for that.
- You will get up to 500 results from a search.
- Results with more than 500 items will be followed by a link for the next 500.
- Instead of having searches broken down into subcategories with the number of hits listed for each subcategory, you will get buttons for narrowing down or redirecting a search.
- Lettered links for navigating to sections of the page, which could be confused with lettered links for doing new searches, are now gone.
- Links to the bottom and top of the page are displayed only on mobile devices, as they are not needed on computers with keyboards, which allow moving to the top or bottom with keyboard shortcuts.
- The SQL will be shown when $usethisheading is not set, or it is set to the generic "Search Results".
- The Advanced Search is now clearly labeled and contains checkboxes for the categories.
- Multiple category values can be passed in two ways: as a comma-separated list or as a series of category[]= assignments.
- The new parameter minimumnew is used to indicate the minimum number of items to display on a What's New page. This will keep it from showing nothing when there has been nothing new for a while.
After doing some experimenting, I have determined that the normal way for HTML to pass multiple values to the same PHP variable is through a series of array assignments. For example, category[]=Hexagonal&category[]=ShogiBased instead of category=Hexagonal,ShogiBased. This page does the latter, but it relies on JavaScript to get the job done. For multiple assignments to work in HTML, the variable name in the form should include square brackets after it, which causes PHP to interpret it as the assignment of a new array element. For a SELECT element, you also have to use the MULTIPLE attribute with it to enable it to allow selection of multiple options. For checkboxes with the same name, this is not needed.
Please check my submissions. They are waiting Your look, except for 2 lasts) Regards, Rechefiltr_is_Fire
Which way can I upload my piece to Piececlopedia entry or Non-piececlopedia? Tell me please. I commented this page because I’ve seen last activity there, not for the page.
I commented this page because I’ve seen last activity there, not for the page.
If you can see where the last activity was, don't you think we can as well? Post on the appropriate page, not on the page with the last activity.
While perusing the queryinc.php code today, I came upon the similaritems parameter. Looking into what this does and what might make use of it, I discovered the likethis.php script. This script shows pages that belong to the same type and the same categories as the identified page. So, I added a link in the menu that makes use of it, and I ironed out a few kinks concerning its use. I also added functions that acquire the names of types and categories directly from the database, so that there is less discrepancy between the code and the database. I'll later migrate them to the database-funcs.php include file for use with other scripts.
I've been working on updating the form that appears after the search results. I have used flexboxes to organize the form elements, and I have added some JavaScript. When the form is submitted, it will disable any fields with empty or zero values, because this keeps the query string cleaner, and these will be provided with appropriate defaults if left unassigned. Also, when you check a checkbox that is mutually exclusive with another one, it will uncheck the other one. Checkboxes are mutually exclusive if checking both would leave you with zero search results. Mutually exclusive checkboxes include the ones for only external links and only internal links and the newly added ones for only member submitted pages and only HTML pages. I have also added some tooltips to explain what these and some other options mean.
I have added some new search options for choosing between =, LIKE, and REGEXP, and I will deprecate the options specifically for REGEXP searching.
While there is still more to work on, it is stable for now. So, I have copied what I've done to the official queryinc.php script.
I removed "Ratable Items Only" because it is not a legitimate option. David Howe once created a complicated ratings system that was opt-in, so that it couldn't be used unless the inventor chose to make his game ratable. Hardly anyone ever used it, and I dismantled it.
Regarding Primary Links (a checkbox option here), it is unclear to me the policies used for how these were selected. Primary Games were mostly Recognized Games; also, some editor(s), at least Greg, later(?) picked additional games (e.g. Opulent Chess) for whatever reason(s).
Primary Items (aka Links!?) also included items that were not games, when selected at some point - there are many of these too, besides games.
Even if Primary Links/Items are now considered obsolete, so are Recognized Games (also a checkbox option here), and at least the latter have a Page of their own for historical purposes (alone) on this CVP site.
From the Recognized Variants thread, on the topic of Primary Items (from an exchange I had with Fergus that I'd forgotten - may be a good idea to post this in the present thread, too):
Fergus Duniho wrote on 2020-04-03 EDT 'That's something that David Howe instituted so that the most important pages would be at the top of the list when listing search results. I think he largely included the Recognized Variants, though some other things are also included. It might be a good idea to replace Recognized Variants and Primary Items with Featured Games and Featured Pages, the former being a subset of the latter. Featured pages would be ones that we want to draw greater attention to or that we expect users would be looking for more. These could include links to games that enough of us think highly of, links to well-known or popular games, and links to commercially available commercial games. These could be featured at the top of search results, as Primary Items are, but referred to as Featured Pages instead. Also, they could be a bit more dynamic than Recognized Variants, meaning we could drop something from the Featured Pages, such as a commercial game no longer being made, or a game that has been reevaluated.'
18 comments displayed
Permalink to the exact comments currently displayed.