Friday, February 1, 2013

Alter Aeon Wiki

People have been harassing me for literally years to set up an AA wiki, but I always managed to avoid doing it for various reasons. I suspect the real reason I had been avoiding it was fear of the unknown, of not knowing if I could even figure it out (I have PTSD from the 1995 linux "recompile your compiler" era.) There's also the fear of it being a huge time sink, and many other such things.

To see the end result of a lot of hard work, the wiki URL is:

http://wiki.alteraeon.com

These fears were not unfounded, and had it not been for Uicli, I probably would never have done it. He set up an initial wiki on one of his servers, which would have made it the third or fourth player wiki over the years. All the other player-run wikis failed or vanished as the players moved on, so rather than have yet another player waste their time, I decided to set up an official AA wiki. Uicli guided me through most of the process, which was just the right amount of handholding.

Properly setting up a wiki is not simple:
  • Set up and install the web server and accounts
  • Grab the wiki package
  • Set up the database and PHP so they work properly with the web server
  • Initially configure and get the wiki itself working
  • Get database and server backups working
  • Set up game server SSH cron scripts to export valid account ids to wiki server
  • Use PHP to parse valid account info for registration
  • Get server email working and relayed through the external mail host
  • Use PHP to create a derived theme
  • Use CSS to make the theme not suck
Installing the basic web server and accounts took a while because I intend to use the wiki server as the insecure PHP/scripting server and keep it isolated from the actual important game server info. I wanted to make sure that the accounts were set up in a way that would be easily maintainable and expandable, which requires more thought than it would first appear.

Setting up the databases required me to read documentation again, and relearn things I had distantly touched on in the past. I only ever have to dig into them every year or two, so I'm never fresh on commands or how to do anything. Each time requires a little less startup time though.

Getting a custom theme in place was actually beyond my limited PHP abilities, but Uicli helpfully provided me a basic template to work with. Even he had to beat on it a handful of times to get it working properly.

The really surprising thing for me was how long it took to adjust the theme CSS. The initial/obvious stuff didn't take too long, and I've become fairly proficient in hunting down CSS entries using Firebug. Unfortunately, it's the little, unobvious things that really eat into your time budget: there's isolated, single use undocumented CSS entries all over the place, and I only figured out as many of them as I did by making all their colors bright green so they would stand out when they were finally displayed. There's still 20+ entries in the CSS I could not track down.

To top it all off, the wiki stores an additional CSS style sheet layer internally for use by templates, one which overrides ALL EXTERNAL CSS. Uicli and a couple other guys set this up, and I've been trying to slowly push the colors out to the external CSS while keeping the formatting and box styles in the internal CSS. Because the custom theme uses an inverted color scheme, it's a complete pain in the ass: if you do it wrong, either the default themes will be broken, or the custom theme, or both.

The email relaying I had done only a couple months ago when implementing the main game server email account verify code, so it didn't take too long. I have had very bad experiences with email in the distant past, and setting up mail servers still creeps me out.

Finally, I had to dig into the Wiki's PHP and add account restriction code to limit accounts based on game login id and email address. The game server exports a low-security file containing this information, and I've been using it on the AA forum to limit spam accounts. It's shockingly effective - simply limiting new accounts to being existing character names has dropped the number of spam accounts from 5 per day to less than 5 per year. I don't know how much more effective requiring the email address will be, but I'd be surprised to ever see a spam account on the wiki that doesn't come from an existing player (which I can siteban.)

That's a lot of different skillsets that have to come together in one place. While I could probably have muddled through it in the past, I'm glad I had at least introductions to all these things since then. If I had to set up another wiki, I could probably do it a lot more quickly now, and perhaps with this additional background, a few other modern web technologies will seem a bit less scary.

Don't expect me to jump on the Web 2.0 bandwagon just yet though.

No comments: