Integrating the Forums and the Wiki

Hello! Its story time!

A long time ago in a galaxy far, far away…. Wait, that isn’t how this starts. A couple of years ago, I joined the Arcen team. Originally, I was just for managing the wiki. Apparently, Chris liked my talents with website administration, and I ended up being the official Server/Website guy. As a result of me originally being here for the wiki, it holds a special place for me. I always look for ways to improve it and make it a better experience that more people are going to use. Sadly, most people were put off by the need to register on there as well as the forums and Mantis. I mean, I get it, but it still sucked since the wiki was falling into disrepair. So, I came up with an idea! What if I could combine the login for the forums and the wiki? Turns out, a couple of years ago, that wasn’t really feasible. No one had made a bridge for SMF and Mediawiki that worked with our version of the Wiki.

Fast forward a couple of years. AI War 2 is an actual thing (and looks amazing). This inspired me to get a bridge between the forums and the wiki. After all, I wanted AI War 2’s wiki to be a helpful and up-to-date tool for everyone. Then, I saw it! It was practically glowing and begging for me to implement. I grabbed the bridge and set to work on making it work with our versions of Mediawiki and SMF.

In order to get it up and running, I made a fresh install of Mediawiki in our dev folder (arcengames.com/dev for anyone who wants to know and see what all is going on in my mind at a given time. Usually there is only one project in there at a time, but sometimes there are more). With this fresh copy, I set the database up to be shared with the forums, to make communication easier. I then let Mediawiki do the heavy lifting and create all the databases and all that jazz. Now, I have a functional copy of Mediawiki that can, in theory, communicate with the forums. At this point, I crossed my fingers and hoped that the bridge would work. To my surprise, it actually ended up working (Though it was a bit wonky)!

But wait! Our copy of Mediawiki isn’t fresh out of the box. I knew I had to somehow test if it would work with our copy . So, I went ahead and copied over all the needed folders and files. And…. It failed. It gave me a giant 500 Error code, which means that the server is looking at the install and going WTF (What the frack, don’t look at me like that) is that? So, I tried deleting the bridge code to see if the transfer was working, or if that was what was being screwy. Then, it worked! Guess we know what the problem was. To troubleshoot this, I tried enabling bits of the code at a time. Eventually, I found the culprit. Turns out, if you forget the file that the bridge calls for, it breaks everything. Note to self: MAKE SURE YOU ACTUALLY HAVE THE FILES YOU NEED! I added the file and bam! It worked like a charm.

Now, we have to break it from the users point of view. So, I spend a good hour or so just toying with it trying to get an error. Nada. Sweet, that means its ready to go.

Moving an entire directory and database while keeping everything live would be too much, I decided. So, I locked the database down, then copied it over to SMF’s database and gave it a fancy prefix. Now it can talk to SMF, and has the most up to date file information. I test the dev build, and it works still. On to the next stage. I pull up the config files from the production wiki and the dev wiki. I merge them (Manually of course, it wouldn’t work to just append them). I test it. Frack. It just broke. What’s the problem now? I delete the bridge code. It works again. Okay, so the bridge is breaking it. But I want the bridge to work, so that’s unacceptable. I check to make sure the files are all there. They are. I check that I copied it over correctly. I did. Then it hits me. I didn’t change the relative directory field for the bridge code! I change that to point to the right place, and presto, we have a fully functioning wiki with the bridge operational.

Now, the wiki with the bridge is live for the world to play with. I see a small group join, including some guy named Keith Lamothe. Turns out, he thinks he needs permissions. So, I consult with my fellow AI, and we come to the conclusion that he can help make the AI smarter, faster, stronger, and more killy… I mean cuddly. We give him the permissions. As it happens, he is also an AI. I combine the server’s AI with him, and WOW it became a deadly killing machine fast.

Moral of the story: Keith is a force to be reckoned with when it comes to making !!FUN!! toys. At this point, Cinth joins. My nice little code to give anyone with permissions works on him. No idea why it didn’t work on Keith, but whatever. At this point, I look back on it and smile, content that I finally, after years of work, managed to combine the log in systems.

If any of you break it, I swear I will make you enemy #1 of the AI Empire. 😉