Forums › English Language Forums › General › Wiki Editors

Search

Changes with new MediaWiki

2 replies [Last post]
Wed, 12/27/2017 - 18:18
Nitronicx

The version of software SK wiki is running on was updated somewhere mid-2017 after huge spam attack. After that, 2 things were broken as a result of this change: show/hide windows and sorting. I've decided to make this thread to document those 2 changes, but mostly to highlight some conditions to make sorting work.

Show/hide windows using NavFrame, NavHead and NavContent classes were still working, but windows using "collapsible" class were not. The new software requires "mw-collapsible" class instead. Collapsing via "mw-collapsible" class is animated and provides some additional features, such as changing the show/hide text. Collapsible sections via mw-collapsible can be seen on weapon pages (damage tables) and collapsing via NavFrame pretty much everywhere else.
See history of this page to compare both versions in almost same visual style:
http://wiki.spiralknights.com/index.php?title=Template:Rewards/Rank&acti...

Table sorting has simply disappeared from the wiki with the update. That seems to be because of 2 things: most wiki tables don't use "!" to mark header cells and there's often specified background CSS property for those cells (instead of background-color). The later seems to be a problem with the sorting function itself. There also used to be different icon for sortable columns, but that could be simply default image for this purpose back then.

Fri, 12/29/2017 - 07:52
#1
Bopp's picture
Bopp
thanks

I particularly miss the sorting. Many of my table designs assumed that the user would be able to sort on certain columns.

So are these the sort of thing we can fix in templates? Or do we have to touch every page that uses show/hide and sorting?

Fri, 12/29/2017 - 14:42
#2
Nitronicx
Editing

We need to edit every page that contains head of a table which uses "|" for defining header cells (instead of "!") and defines "background" CSS property for those cells (it needs to be "background-color" instead, otherwise sorting won't work for some reason). So if a template is used, you need to edit only the template. But there are some pages that don't need a fix. We also don't need to edit tables that were not sortable, hehe.

Show/hide windows were generally made from one of two templates: Showhide or SKWindow2 (with enabled collapsible option). Showhide template didn't need a fix and I've fixed SKWindow2 quite some time ago already. There are few simple tables that didn't use any of those two. I've fixed some but there may be more.

For sorting, there are many many different templates and pages with same mistakes in them (at least compared to show/hide). I've fixed sorting for gear lists (armor, sword etc.), prize boxes, lockboxes, and gift boxes lists but there are definitely more. If you fix those templates/pages, some problems with text formatting may emerge, the most common is that text is suddenly bold after the fix. That's because text in those cells is often enclosed by 3 apostrophes, which make text bold. I don't know why it doesn't work before the fix, but it starts working after and usually looks ugly. Another thing that can happen is that text aligned to left will be aligned to center. That sorting button may also overlap with text. I've tried moving it but it always appears a fixed distance from the right side of a cell.

Powered by Drupal, an open source content management system