Forum:Useful technical stuff from PL
Ahoy, I'm crat of Nonsensopedia (pl) and its system admin. Since we have moved from Fandom we have finally been able to do a few technical things properly, so we wanted to share our work with other Uncycs. Please bear in my mind that this code was written by drunk Polish programmers getting paid in potatoes, so it may be a little bit rough around the edges. If you have any problems with this stuff, please contact me through my talk page here or on Nonsensopedia.
Fancy random pages
The random page link on the sidebar is sometimes acting… a bit weird. We wanted something that let users easily pick the namespace they want a page from, so we made a script for that. It introduces a collapsible list of namespaces instead of the standard "random page" link. You can see how it works on any page on Nonsensopedia. The code is here and here (we have it as a gadget). The gadget definition is:
* ChooseRandom [ResourceLoader | default | skins=vector,timeless] | ChooseRandom.js | ChooseRandom.css
You will have to slightly modify the code to make it work on your wiki. It works on vector and timeless, we decided not to care about Monobook too much. The code was written by Polskacafe.
Edit conflict notifications
It simply checks the history of the page in the background and if it detects a conflict, spews out an alert. Works even on Minerva. The code is here and the gadget definition is:
* EditConflictAlert [ResourceLoader | dependencies=mediawiki.api | targets=desktop,mobile | default] | EditConflictAlert.js
Again, this was written by Polskacafe.
On Fandom we had this huge ugly sidebar on the right that we couldn't remove, so we made up something to make use of it. We had there three additional sections, one with a random page from our dictionary (using DPL), a random did you know using a giant <choose> tag and some links to social media. That was really the only good thing that came out of using Oasis (I still have nightmares about it), so we wanted to implement it in some way on the new host. On Minerva we had to ditch navboxes (they are too damn huge), so instead of them we have something like the thing on the right. We basically have a template that is rendered by a JS script and crammed into the footer. The template is purged every 20 seconds by a simple daemon on the server. Ugly, but it works. This magical template is here and the code is here and here. The gadget definition is:
* MobileRailModule [ResourceLoader | default | targets=desktop,mobile | skins=minerva] | MobileRailModule.js | MobileRailModule.css
You may have a better idea on how to refresh this template. If you want my highly-experimental-duct-tape-bash-script daemon code to go with it, please let me know.
Basically: you click a button and it quickly adds something to your edit summary. Nothing special, kind of useful. We stole it from Polish Wikipedia and modified it a bit. The code is here and here, again, as a gadget. The definition is:
* edit-summaries [ResourceLoader | default] | edit-summaries.js | edit-summaries.css
Marking images in categories
We wanted to mark images in categories and special pages in some way to make it easy to distinguish between copyleft, copyright and some other boring stuff. Now, I know that Uncyclopedia projects in general don't give a damn about licenses or doing them properly, but we actually do, so that's kind of useful for us. You can read how it works and how to install it here. You may find it useful for other stuff, so I'm leaving it here for you, maybe you have your own idea what to do with it.
What are working on
In pauses between drinking and eating pierogi we are doing more technical stuff. Currently we are working on reviving the old star rating system that uncycs on Wikia used (before they deleted it), based on a completely new extension we are writing from scratch. The repo is here, the backend is mostly done, we are just waiting for Polskacafe to finish the jQuery frontend.
We also want to adapt the UploadWizard extension to Nonsensopedia to simplify the process of uploading and ease the licensing pain a bit.
A little further in the future we want to work on something that we for now call NonCommons, a real free humouros image repository. I'm sorry, UnCommons is a sad licensing joke, we will never use it. We also don't want to be dependent on anything, ever, we've had enough of wikia bullshit. The point of the project would be not only to collect free (and copydown, which we treat seriously and describe all original sources) humorous imagery from the interwebs, but to also present them in some way, maybe in the form of automatically generated galleries. We are not sure yet. For now, we are cleaning up the image repo, categorising it and fixing licenses. There's lot to do, so we optimistically expect the project to be somewhat functional in early 2020.
Well, it's possible that some of the uncys may adopt one or the other gadget, I personally have just imported your MediaWiki:Gadget-EditConflictAlert.js translating from Polish to Galician. Some other wikis have one or another listed gadget that can be added. Rhubella Marie, the rat sockpreppie 3,049 preppiedits 05:28, 28 April 2019 (UTC)
- Well, I know that MediaWiki:Edittools is still quite used in 4 wikis (Desgalipedia, UnCommons, Malucopédia and Wikinet) and appears to be very similar to Polish summaries. About the problem on the right side of the screen, no wiki that did not participate in Wikia knows what it is and will avoid useless comments. In that case, you can help other wikis that have also recently left.
- In the case of NonCommons, this is your right to adopt or not. Nobody will impose something, however, if they want to share an image of another wiki hosted in UnCommons can edit Special:Interwiki prefix cu for https://commons.uncyclomedia.org/wiki/$1 and "no" for forward and backward options. Rhubella Marie, the rat sockpreppie 3,049 preppiedits 05:54, 28 April 2019 (UTC)