On 07/08/2010 12:13 PM, Roan Kattouw wrote:
2010/7/7 Ævar Arnfjörð Bjarmasonavarab@gmail.com:
But I thought I'd ask if someone (particularly Trevor) has suggestions on how to do it better. I can't see a quick and sane way to do it for the general case, since Vector uses a diffrent $footerlinks structure than MonoBook.
That's fine for my purposes, but might not be such a good idea for MediaWiki. I think per-skin hooks aren't an inherently bad idea though.
Although I agree that having hooks for these things would be nice, wouldn't it suffice for your purposes to just hide these things with CSS?
That's what I did in the custom skin I wrote for a local non-profit's wiki (currently at http://lup.vyznev.net/). It's basically a restyled copy of MonoBook with very few changes to the PHP code (which means I can easily keep it up with upstream changes), but one change I did make was to inject a class="loggedin" or "notloggedin" to the outermost wrapper div and show or hide a bunch of navigation elements depending on that.
You can see the difference by going to that page and pasting something like javascript:void(document.getElementById('globalWrapper').className='loggedin'); to the address bar. Indeed, one reason why I did it this way is that, if I wanted, I could add a "Show advanced options" link/button that would do just that.
Without the style sheets, the site just looks more or less like MonoBook does when viewed the same way. Which is actually pretty nice; someone's clearly put a lot of thought into graceful degradation there.
(When I wrote the skin, I actually first thought of basing it on Vector. However, after looking at the code I came to the conclusion that, at least for now, the code for MonoBook is both simpler and less of a moving target. That said, I do plan to add some Vectorish features, such as a collapsible sidebar for logged-in users.)