Dab1001's board-to-board with Jack Phoenix
From Halopedia, the Halo wiki
Hi Daniel,
Could you take a look at issue #5 on the Onyx GitHub repository? Thanks in advance!
Hi,
Apologies for my own delayed reply as well. I saw your message a few days after you sent it, but I've had a really busy time at uni over the past couple of months, and it just completely slipped my mind. I also haven't done any work on Onyx for quite a while for the same reason. I do intend to get back on it once exams are over in a few weeks, though, so the project's not dead or anything.
In relation sidebar, I agree, that kind of functionality is really something that should be provided by the API itself. The fact that it doesn't seems like a very questionable design choice to me, but I'll just have to work with what's provided. It's a shame that people didn't take to your proposed sidebar parser, as I think that it would've been an improvement over what's available now, even if a little messy. Still, in that case, I'll probably end up writing my own parser to extract what I need, as I'm not fond of copying code without fully understanding every aspect of it as I do my own code (doing this has caused me huge headaches in the past lol).
Regarding parsing information from MediaWiki pages, I think I'll definitely look into it in the long term for Onyx, in that case, though I may do this after first making a bare-bones version of the skin to make available sooner. However, I'm not sure how I would go about retrieving the contents of a page from within the OnyxTemplate::execute() function. Do you know of a way it can be done, preferably getting the raw wikitext rather than an HTML version? Also, is there any way of embedding an arbitrary image from the wiki into a skin? I'm specifically thinking about the logo here, as the recommended aspect ratio of the image used as the logo by default wouldn't work well for an Oasis-style skin, so I think it will be necessary for Onyx to use a different one entirely.
Once I finish my exams and get back to building Onyx, I'll definitely hop on the IRC occasionally, so that we can communicate about it more easily. If you're still interested in contributing to Onyx yourself at all, let me know and I'll get you access to the GitHub repo. Don't feel any pressure, though.
Thanks for all your help, and again, apologies for being so slow to respond.
- Daniel
Hi Daniel,
First of all, apologies for the somewhat delayed response! It's been a while since I've been to Halopedia (I know, I really should visit this great wiki more often!). Nic would be correct, given that I've been working on MediaWiki and all things related to MediaWiki since 2008, and as one of the few people who knows a lot about the skinning system, I've written and maintained as well as contributed to a variety of skins. (If you're interested, a super outdated list can be found here -- I really should update it one of these days...)
I haven't yet had the time to play around with Onyx or submit patches, but believe me I certainly intend to do both. :-)
Sidebar parsing code and such in general is a glorious mess. Some years ago I attempted to submit a nested sidebar menu parser (currently used by the Bouquet, DeskMessMirrored and Gamepress skins, based on older Wikia code; Nimbus -- and certain other skins, like Monaco which we have available at ShoutWiki do the same in a slightly different fashion, nevertheless achieving pretty much the same output); this failed as people felt it was too messy to be included in MediaWiki core. While I don't deny that, I felt it would've been an improvement over the sad state of MediaWiki skinning, which is basically now "if you want something more complex than MediaWiki:Sidebar and its parsing logic, you're on your own". And by that I mean you'll either end up 1) copying unholy chunks of code (which is what I've done with Bouquet & friends) or 2) writing a meta-extension and having your skin depend on that; both options are not ideal as we are really talking about the sorta functionality that should just "be there".
As far as using the MediaWiki namespace goes, be bold! Customizability and extensibility is what MediaWiki's all about, so go for it! (Just make sure to escape everything appropriately before outputting anything.)
If you would like to talk more in real time, I'm often around in the #mediawiki IRC channel on the freenode network as ashley (though I'm not always online even though I'm connected 24/7; ping me and if you get a reply, chances are I'm around ;-). I'll try to submit some patches to the Onyx repository hopefully later this week or the next week!
Hey,
Nicmavr suggested that I should reach out to you. I'm currently in the process of creating a MediaWiki skin for Halopedia, but I'm unfamiliar with MediaWiki's API. He said that you're quite familiar with it, and so I was wondering if you could help me out.
The skin I'm creating, called Onyx, aims to emulate the look and feel of Wikia's Oasis skin (just the skin, though - I'm not planning to port over any of the additional features they've added). I've gotten pretty far just using MediaWiki.org's skinning guide, but I'm now beginning to run into more complex issues where the HTML or data provided by the API isn't really compatible with my design for the skin, such as with the logo and with the sidebar. I think I may need to write some code to parse out the bits that I need, which is what Nimbus does, I think(?).
Alternatively, I also considered giving Onyx its own pages for those aspects in the MediaWiki namespace (something like MediaWiki:Onyx-config and MediaWiki:Onyx-navigation), then getting those pages and parsing the information I need from within the call to OnyxTemplate::execute(). However, I'm not sure if the MediaWiki API allows for that, and if it does, whether it would be considered bad practice to do so.
Do you think you could give me any pointers or help?
My code so far is available here, on Halopedia's GitHub, if you want to take a look at it. I apologise if it looks at all messy or poorly styled. This is the first significant project I've ever undertaken in PHP, so the language is quite alien to me - I usually stick to Java for OO stuff.
Anyway, I'd appreciate any tips or advice you can give me.
Thanks in advance,
Daniel