• Welcome to NIWA Community Forums.
 
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - Greenpickle

#1
Wiki References / Interwiki redirect
February 27, 2011, 11:51:07 AM
Anyone come across a way of doing this?  Redirecting a page via an interwiki link?  See here; apparently it's possible, since it's done here, but I guess they've made some server-side modifications or something.
#2
NIWA Discussion / Recent changes namespace toggler
November 12, 2010, 09:34:45 PM
I actually initially wrote this a long time ago (page histories give 10th October 2009 as the date of the initial version...), but I didn't know any JavaScript and was just making stuff up as I went along, looking up what I needed.  Unsurprisingly, the result was pretty terrible code - but it worked, for me, and I was happy with that.

A few weeks ago, I borrowed a JavaScript book from the library and took a weekend to actually learn it; now, I've got around to rewriting this, and it should be ready to use.

This is a script to, as the name suggests, toggle namespaces in the recent changes.  A checkbox for every namespace (and things like deletion log, new accounts, page moves) gets added to the top, and ticking/unticking it shows/hides changes for that namespace (once you've put the right CSS in place as well).  You can set initial values so that certain namespaces start hidden; and there are buttons to toggle all/invert the selection/restore the initial selection.  Here's a live version.

To use it, follow the instructions here.

Known issues

- When using enhanced recent changes, hiding/expanding the edits for a page removes the class applied by my script to hide it.  Therefore, this is only a problem when the CSS you set up doesn't hide the 'hidden' changes (but does something else - makes them small and grey like the example, say).  This'll be fixed when I get the time, and I'll see if they'll accept a patch in MediaWiki to make the enhanced recent changes more flexible with regard to manipulating classes.

- If this is employed site-wide, the user can't have their own settings for the initial namespaces hidden because user JS loads after site JS.  I'll try to think of a way this could be done; I have an idea that would work, but be messy and increase page load time - anyone have any suggestions?

- I haven't been able to test this in IE as VirtualBox has suddenly decided it doesn't want guests to have internet access and I can't be bothered to set up a local page.  If anyone finds this doesn't work in IE (not unlikely), there'll probably be an error-type icon somewhere that you can double-click or something to get the details I'd like to know about; and I'd like to know the version you're using as well.  Update: reported to work fine in IE7.

Bug reports and feature requests are welcome.
#3
NIWA Discussion / table.hideable
November 09, 2010, 07:00:19 PM
This is just a script thing I wrote that I thought others might benefit from (though its function is quite specific, not something you'd really want to do very often).  It adds little buttons to specified columns in a table that hide the column.  It works fine with sortable tables, and in most cases with multi-column cells (in particular, cells that span multiple headers aren't attached to a specific one, so they get hidden/shown with either's buttons), but not with multi-row cells.

Information, live example.  It's as simple as putting the code at a CSS page (Mediawiki:Common.css, User:yourname/monobook.css, etc.) and changing the image paths at the top (upload the images somewhere rather than linking to mine - try ImageShack, TinyPic).  Then give the first row in a table column the 'hideable' (and maybe 'hidden') class; here's the example on the information page I linked to in MediaWiki terms:

{| class="wikitable"
! class="hideable" | hideable header
! class="hideable hidden" | hideable header that starts hidden
|-
|cell
[...]
|}


Bug reports and feature requests (not that there's much potential for expansion here) are welcome.