I don’t talk about the code behind this site very often because, to me, it’s generally less interesting than what it’s used for, namely holding the data for this massive story world. Still, in setting up this project, I assumed there’d be a lot more technology side work. And this, simply, is because the better open source projects are amazing.
The Software Used
There are two main software packages used to make the Unified Republic of Stars happen, WordPress and MediaWiki. Both are open source which is available for free download. Free as in beer. I can then install it in whatever environment I want and can modify it freely. Free as in speech.
WordPress is the seemingly ubiquitous blogging software that runs oh so many cat blogs. But it’s a lot more than that. A lot more. These days it’s full fledged content management system.
And MediaWiki is the package that runs the famous Wikipedia site.
The challenge for URS has been combining the two to use each for their strengths while avoiding their weaknesses in any particular area. Thus, using WordPress for the “publishing” aspects of stories and blogs while using the wiki for the reference material. MediaWiki is obviously really strong for the reference side but it’s not so good at the publishing, content management side. Just like WordPress is awesome at publishing but not so good at the cross-linking wiki’s do amazingly.
Why Open Source Rules
With the base packages of WordPress and MediaWiki, I had 90% of what I required to put the Unified Republic of Stars together. Now, I just had to link them up.
Fortunately, there was already a package to link the two in terms of account logins, so that took care of what I thought would be the hardest part. What was left was building the other connections necessary to link them together into a system where information from one can be shared with the other.
Skinning was easy also. The WordPress look & feel is based on an awesome theme called The Erudite. Using its output as a template, it was easily adapted to MediaWiki’s skinning system to provide one common user experience.
And take the “Common Laws” box two paragraphs below. This is an extension of the Talk Wiki To Me WordPress plug-in. It uses the MediaWiki API (along with some custom extensions to it that I wrote) to fetch the article summary for display on this page.
Two hours of coding and suddenly WordPress can display information from MediaWiki. Another few hours and I could show images, as seen above with the whiskey pic.
And that’s why open source is awesome.
Rather than spending days, nay, months building my own software to do what these packages do, I can focus my time on extending what’s already there. And if that’s not the definition of awesome, I don’t know what is.
So what else is there to do? Heh heh… oh, so much…
Beyond the linked article summaries, I’ve extended WordPress to show images from the wiki and to link directly to them so that images need only be entered in the one system.
As mentioned above, I extended the MediaWiki API to parse article summaries and fetch summaries from multiple articles at the same time.
With short codes for WordPress and custom parser tags for MediaWiki, I can insert custom data in a predefined format right into the articles. Everything from Republican Series Winners to tags that show how much US$10 is in the year 2169. (US$64, by the way. CD$109 in Colonial Dollars.)
With some simple additions to both systems, everything can be customized while still retaining the base functionality that made the packages worth installing in the first place.
Not every open source package is as complete as the two I selected for the URS. But if they’ve been around a while, chances are there is some community involvement and there’s a reason why they survive. It’s worth it to evaluate the features, benefits, and drawbacks of each before making the final decision.
Lastly, while these packages and a lot of pre-built plugins are free (again, as in beer), someone else spent some serious time making them work. And, while a lot of your extensions will only useful to you, anything you can give back benefits everyone.
For more information on the specific packages used to make the URS happen, check them out here.