Setting Up Infobox Templates in MediaWiki v1.23


Update 2021-02-23: A few people have left comments saying these instructions no longer work. Unfortunately I’m not surprised – they’re quite old and MediaWiki has evolved significantly. They still work in my ancient version which I still have on an old Debian box.

I am planning on migrating this onto a new server soon so I will be revisiting this soon*.

*May not be soon


This article explains how to add the “Infobox” template to your MediaWiki installation. It is primarily intended for people who have installed v1.23 from source.

This is an updated version of this older post about setting up Infobox on earlier versions of MediaWiki. It is basically the same but has been modified to be suitable for the current (at the time of writing) version of MediaWiki, v1.23. Please see the older post for more info and background as well as helpful commentary from other users in different circumstances.

Here are the basic steps necessary to add working Infoboxes to a freshly installed version of MediaWiki. Note that the original steps required the install of ParserFunctions; this is no longer required as it ships with recent versions of MediaWiki by default.

  1. Download the Scribuntu extension into your extensions folder and add it to your LocalSettings.php as described in the ‘Installation’ section.
  2. Copy the CSS required to support the infobox from Wikipedia.org to your Wiki. The CSS is available in Common.css. You’ll probably need to create the stylesheet – it will be at http://your_wiki/wiki/index.php?title=MediaWiki:Common.css&action=edit – and then you can just copy/paste the contents in there. (I copied the whole file; you can probably just copy the infobox parts.)
  3. Export the Infobox Template from the Wikipedia.org:
    1. Go to Wikipedia’s Special:Export page
    2. Leave the field for ‘Add pages from category’ empty
    3. In the big text area field, just put in “Template:Infobox”.
    4. Make sure the three options – “Include only the current revision, not the full history”, “Include templates”, and “Save as file” – are all checked
    5. Hit the ‘Export’ button; it will think for a second then spit out an XML file containing all the Wikipedia Templates for the infobox for you to save to your PC.
  4. Now you have the Template, you need to integrate them into your MediaWiki instance. Simply go to your Import page – http://your_wiki/wiki/index.php/Special:Import – select the file and then hit ‘Upload file’.
  5. With the Templates and styles added you should be able to now add a simple infobox. Pick a page and add something like this to the top:{{Infobox
    |title = An amazing Infobox
    |header1 = It works!
    |label2 = Configured by
    |data2 = trog
    |label3 = Web
    |data3 = [https://trog.qgl.org trog.qgl.org]
    }}
  6. Save, and you should end up with something that looks like this:

Farewell Robin Williams, an oldschool video gamer

Very sad to hear about the passing of Robin Williams.

I loved his movies, but I also loved his lesser-known passion for video games.

He did an interview years ago where he talked about playing Quake – I’ve held on to this mp3 file since I got it and always enjoyed listening to it every time I stumbled across it when I was deep-diving in my archived files.

It’s embedded below.

The failure of the Australian state to gracefully deal with copyright

Nic Suzor has written another insightful piece for The Conversation which looks at the Australian government’s leaked plan to combat piracy.

In conjunction with research assistant Alex Button-Sloan, the article users several words that I think fairly accurately sum up this plan: “unrealistic”, “vague”, “unlikely to help”. Some of the outcomes are equally depressing: “likely to raise the price of internet access”.

Everyone in Australia should read this article. This plan does nothing to address the root cause of Australian piracy – the simple fact that content is not made available on the same terms as it is in other markets.

The fact that this plan could “massively increase the potential risks for companies that provide legitimate services” also fills me with dread; Mammoth – in addition to being an Internet hosting provider – has been actively involved in legitimate content distribution since the late 90s, across video games, music, and movies. With our clients, we have struggled for years to try to figure out how to make sure Australians have access to the latest content.

These are not technical problems; they are licensing and rights problems caused by media companies carefully choosing how to maximise their profits. The fact that they are now cooperating with out government to literally change the laws to better suit their business model is kind of irritating.

Disruption: why is the US so different for startups?

AVC’s Fred Wilson wrote a post recently looking at platform monopolies and why they’re great targets for disruption.

It’s clear that almost everything about the US is different for startups. A lot of it is just its sheer size – having ten times more people than Australia changes everything. Probably the biggest complaint in Australia though is the lack of VC funding and a reduced appetite for risk.

It’s not clear to me which one of these is the chicken and which one is the egg. Is the startup scene awesome because of the VC? Or does the VC exist because of the startups?

Since moving to the US, the most striking thing I’ve noticed here is the prevalence of these large, giant “platform monopolies” – but not just in the tech space. Many aspects of daily life in the US seem to be managed by these giant institutions. Navigating these large institutions is cumbersome and tiring (especially if you’re a foreigner and have no idea how things are glued together) – and as a result, there are a lot of middlemen that try to make the process easier.

For example, if you’re looking for health insurance, trying to deal with the insurance companies is a real pain. So, there are hordes of health insurance agents and brokers that sit in between you and the insurance companies to try to make that easier. They take a small fee.

If you’re starting a company and need to pay your employees, you need to be aware of the specific tax issues in your state and federally. Even for a one person company this is challenging; I can’t imagine what a headache it’d be if you were trying to set up in multiple states. But don’t worry – there are many payroll companies that specialise in this, all for a small cut. (The first time I ran a payroll here in the US I was staggered by the fact that the company used UPS to courier me an actual payslip on an actual piece of paper. )

Near where I live there’s an entire business that appears to exist solely to cash cheques – a form of payment that is basically extinct in Australia, but because it’s so common here there are these weird cheque companies that exist. I assume that they must make a bit of money on each cheque they cash.

The list goes on. Almost anything complicated you want to do, there’s a support system that seems to sit in the middle to make your life easier.

Fred Wilson comment on this in his article:

The Internet, at its core, is a marketplace that, over time, removes the need for the middleman. That is very good news for the talent that has been giving up a fairly large part of its value to all of the toll takers in between them and their end customers.

This is where a lot of the interesting disruption is happening in the US – people tired of these old, monolithic systems looking to make a change. The payroll issue is being addressed by companies like ZenPayroll. I have no idea what people are doing about cheques but I thought it was entertaining to see that you can deposit a cheque here now by taking a photo of it. And everyone is trying to crack the healthcare nut – health industry startups abound and appear to be highly favoured as targets for funding (hey, the US spend more money per person on healthcare than any other country – it’s good business).

There are many other examples, including ones with global application – Uber and Lyft are probably the most significant and most recent examples; their impact on the transport industry is still being felt. The music industry is another one – all those poor record company executives are going to be a relic of days gone by.

Every country, every society, every community has its own entrenched systems, their own way of doing things. The bigger the environment and the longer they’ve been around, the more likely you are to find middlemen. Technology makes it possible to go back and re-evaluate the old way of doing things. Better automation, communication and integration means a lot of the old ways of doing things are ready to be swept aside – and that’s where a lot of the disruption is happening.

Ultimately I think that it’s this potential for disruption that makes the US startup scene so vibrant and interesting. It’s the fact that every opportunity to change the status quo has the potential to pack a huge punch – even capturing a small percentage of the market here can mean a big business. The bigger the established players in a sector become, the more naturally resistant they become to change – meaning a lot of opportunity for smaller players to start to carve out a niche.

When you encounter someone saying “this is just how we’ve always done it”, pay attention – you might be on the verge of something big. These are tough fights to pick, but – as is being shown by Uber – if you make the right moves at the right time with the right technology, you can revolutionise a space.

MySQL Server fails to upgrade in Debian/Ubuntu

Just did a relatively normal ‘apt-get upgrade’ on my simple WordPress HHVM test server and got a horrible bunch of errors, leaving it in a non-working state:

E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install. Trying to recover:
Setting up mysql-server-5.1 (5.1.54-1ubuntu4) …
start: Job failed to start
invoke-rc.d: initscript mysql, action “start” failed.
dpkg: error processing mysql-server-5.1 (–configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of mysql-server:
mysql-server depends on mysql-server-5.1; however:
Package mysql-server-5.1 is not configured yet.
dpkg: error processing mysql-server (–configure):
dependency problems – leaving unconfigured
Errors were encountered while processing:
mysql-server-5.1
mysql-server

There are many reports of this on various forums and blogs with many different solutions. Here’s mine.

In my case, MySQL logged the following error:

May 4 07:04:22 trog mysqld_safe: Starting mysqld daemon with databases from /var/lib/mysql
May 4 07:04:22 trog mysqld: 140504 7:04:22 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
May 4 07:04:22 trog mysqld: 140504 7:04:22 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead.
May 4 07:04:22 trog mysqld: 140504 7:04:22 [Note] Plugin ‘FEDERATED’ is disabled.
May 4 07:04:22 trog mysqld: 140504 7:04:22 InnoDB: The InnoDB memory heap is disabled
May 4 07:04:22 trog mysqld: 140504 7:04:22 InnoDB: Mutexes and rw_locks use GCC atomic builtins
May 4 07:04:22 trog mysqld: 140504 7:04:22 InnoDB: Compressed tables use zlib 1.2.7
May 4 07:04:22 trog mysqld: 140504 7:04:22 InnoDB: Using Linux native AIO
May 4 07:04:22 trog mysqld: 140504 7:04:22 InnoDB: Initializing buffer pool, size = 128.0M
May 4 07:04:22 trog mysqld: InnoDB: mmap(137363456 bytes) failed; errno 12
May 4 07:04:22 trog mysqld: 140504 7:04:22 InnoDB: Completed initialization of buffer pool
May 4 07:04:22 trog mysqld: 140504 7:04:22 InnoDB: Fatal error: cannot allocate memory for the buffer pool
May 4 07:04:22 trog mysqld: 140504 7:04:22 [ERROR] Plugin ‘InnoDB’ init function returned error.
May 4 07:04:22 trog mysqld: 140504 7:04:22 [ERROR] Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed.
May 4 07:04:22 trog mysqld: 140504 7:04:22 [ERROR] Unknown/unsupported storage engine: InnoDB
May 4 07:04:22 trog mysqld: 140504 7:04:22 [ERROR] Aborting
May 4 07:04:22 trog mysqld:
May 4 07:04:22 trog mysqld: 140504 7:04:22 [Note] /usr/sbin/mysqld: Shutdown complete
May 4 07:04:22 trog mysqld:

 

I’ve bolded the important lines – in my case, MySQL was starting and trying to allocate some memory for InnoDB, but it was failing. So when the package manager updated MySQL and restarted it, it would simply exit as failed, returning failure as part of the update process.

I solved this hackishly (but easily) by stopping a memory-hungry process on the server (HHVM), then re-running the upgrade. Without HHVM running there was plenty of spare memory, the update was able to successfully restart MySQL, then I just restarted HHVM.

This is of course indicative that this system probably doesn’t have enough memory – but it’s a small-scale test environment. So if you’re looking for a cheap easy fix when Debian/Ubuntu fail to upgrade MySQL, this might work.

Initial Binary Lane Feedback: Positive

So far the feedback for the newly launched Binary Lane has been really positive:

Feedback on Whirlpool has been similarly positive:

bl-do

bl-wp-1

… and also a good thread on LowEndTalk.com, a developer-focused community for infrastructure services.

There’s still a lot of work going on behind the scenes. New features are still be developed – most recently, a new BYO ISO system, allowing people to install their own operating systems, including things we haven’t supported before like FreeBSD.

Stay tuned.

Binary Lane – a new hosting service from Mammoth Media

I’m proud to announce that the Mammoth team has launched a new product this week – Binary Lane.

Binary Lane is our new take on virtual private server hosting. Our service Mammoth Networks has been in operation since 2010 and has grown steadily to become a respected name in VPS hosting in Australia, and the mPanel – the software that drives this service – has matured and evolved until it has become, in our humble opinion, one of the best platforms for managing virtualised servers on the planet.

Binary Lane features several significant differences that we thought justified a new brand. The main changes:

  • Binary Lane uses KVM for its virtualisation back end, instead of Xen. This gives us a bunch of great new features – including live migrations, allowing us to almost instantly move guests between host nodes.
  • We’re in a new data centre, right here in Brisbane. We’ve had a great relationship with PIPE (formerly SOUL, formerly Comindico) and have been in that facility for years, but we wanted a local presence in our own city. The new NEXTDC data centre and their DC-as-a-service model really fits what we want to do.
  • New IP transit. Again our PIPE/TPG/SOUL connectivity has been awesome, but getting transit from a single carrier has reduced our flexibility a little bit. We’re working with the unbelievably great team at APEX Networks to provide our transit.
  • All SSD storage. SSDs are the future for server systems. The price has reduced to the point where building entire storage systems out of SSDs is feasible for a huge variety of application types. While bulk data storage is still a little bit away, we feel that the performance offerings of SSDs are impossible to ignore.

The Binary Lane brand is also something that gives us a little more freedom internationally – Mammoth Networks was, for various reasons, somewhat restrictive in the United States :) Startups, let that be a lesson to you – even if your target market is Australia initially, always think about the rest of the world when you start building your brand!

Of course Mammoth Networks isn’t going anywhere – it will still continue to receive all the attention it gets currently. We’ll be doing updates to mPanel that may appear on one or the other site first, but eventually both sites will be updated with any new features that are added.

Big congratulations to our awesome development and operations teams at Mammoth for their really hard work on this project and special mad props to our technical director Nathan O’Sullivan, whose tireless efforts leading the charge have again resulted in shipping another great product.

Oh yeh – we’re so confident you’ll love Binary Lane that we’re offering a free seven day trial. Go check it out, marvel at the speed, wonder at the power of mPanel, and be amazed.

Possible Unintended Consequences of Legalising Drug Use: Faster Cryptocurrency Uptake

A few states have recently legalised marijuana use in the United States. This is weird for everyone. Not only is it a complete reversal on drug policy, but it’s still actually illegal at the federal level. So while its legal in certain states, it’s still technically a federal no-no to be using it. This is confusing as hell, although it didn’t stop Colorado’s first day from being a huge event which raked in a cool $1 million.

A great example of the confusion popped up on the New York Times today, as they covered the fascinating story of how banks in these states are basically refusing to offer banking services for these (legal) providers of marijuana. US banks, of course, have an impeccable reputation when it comes to deciding what to do with money, so this of course comes as no surprise.

The first thing that I thought of when I read this article (a little sarcastically, because I’m so sick of hearing about it) was “well, I guess they could just use BitCoin, amirite?” But as I thought about it some more, I started thinking that it’s probably not a terrible idea for these guys.

Compared with the difficulty of dealing with putting cash into brown paper bags or Tupperware to move it around and the scary issues of security logistics entailed, the idea of using a freely available and accessible cryptocurrency seems compelling to say the least.

Sure, it’s still nowhere near as widespread as Visa or Mastercard. There’s the possibility of vulnerabilities. People don’t really know how to deal with keeping worthless digital assets secure, let alone a digital asset that contains real money. But it’s here, now, and it means that these legal(ish) vendors could go about their business with one less headache.

Well, at least until tax time when they have to pay the IRS – it seems likely that they’re one entity that is not going to be accepting payments in cryptocurrencies any time soon. I guess the drug vendors will have to deal with the problems of having a massive pile of super-secret untraceable anonymous digital cash!

Except, of course, this isn’t really how cryptocurrencies work (at least, those based on the BitCoin blockchain system). Intentionally trying to hide their income from the feds is probably just as dangerous as hauling around large amounts of small bills. The instability of most of the cryptocurrencies is probably the biggest concern; storing your tax payment in a currency that might halve in value by tax time would be risky to say the least. But if they wanted to make life more difficult for the IRS, switching to cryptocurrency would probably do that in the short term, while saving them all sorts of other hassles.

In short – talk about your disruptive technologies! Banking – for what are probably good reasons – is failing to keep up with the pace of legislative change here. Whether or not cryptocurrencies actually pose a threat to

By the time I finished writing this, the following articles appeared: Colorado Marijuana Dispensary Uses Bitcoin to Evade Federal Laws, and back home, businesses in Australia are starting to accept BitCoin.

The UK Is Eating Our Lunch

The United Kingdom has a history of building reasonably decent empires.

The recent news that Australian tech company Atlassian is moving their base of operations to the UK is depressing, but completely unsurprising. Sure, Australia’s an expensive place to do business – but the UK are going out of their way to make themselves ludicrously sexy for technology companies.

I first found out about the UK tax incentives when some friendly people from the UK consulate approached me after I’d participated in a panel at the NICTA TechFest 2013 (along side Matt Barrie from Freelancer.com and Professor Stuart Feldman from Google – the guy that created ‘make’, no big deal), discussing ways to address the ICT skills shortage in Australia. At Parliament House. In Canberra. Right before Prime Minister Julia Gillard took the stage to talk about innovation in Australia.

Seriously, at an event to try to help draw attention to technology in Australia these guys came right up to me and basically started talking about all the reasons why I should be trying to move our company to the United Kingdom. I was impressed by their audacity – but I was even more impressed by what they were offering.

The people from the consulate made a good pitch. There’s a 225% tax credit for research and development, they have a thing called the Patent Box offering significant tax breaks on profits made from patents, they’ve got a tech-friendly ‘entrepreneur visa’ to make it easy to get there, decreases in corporations tax, and – oh, what else is there? Oh yeh, it’s right next to EUROPE which has like a jillion people, so a giant market.

London is great.

Shortly after that, they got in touch and asked if we’d be interested in talking to some of their people in Brisbane (I imagine they try to have tendrils everywhere, so they have well-dressed Englishmen scattered strategically around the country, ready to be dispatched to technology companies at a moments notice). A couple of nice chaps turned up and we had a chat where they went into some more detail about what is involved in moving to the UK.

They also offered to do a bit of an analysis for us to figure out what the market was like in our specific area. This is basically a free service they provide – looking up a bunch of stuff and doing some (fairly basic, but helpful) market analysis for you. Shortly afterwards they sent through a nice report with heaps of detail about telcos and data centres and that sort of thing, with a bit of a reminder about all the other perks.

A few months after that I got an invite to a breakfast put on by London and Partners, the official promotional organisation for the city of London. I went along just to check it out, but it was mostly a repeat of what I already knew – just with a bit more focus on London.

Still, I was again impressed not only by the pitch (PDF), but the simple fact that the United Kingdom is currently focused like a laser on making their country attractive to technology companies. They know the future is about technology and are displaying adaptability accordingly.

It’ll be sad to see Atlassian go. It’ll be sad to watch others follow. It’ll be sad if Australia doesn’t treat this as a wake-up call.