TipiWiki (2003)

Over fifteen years ago I published "TipiWiki" when I was still in school. I never really used it and it is abandoned for over a decade now. However other people grew it into a big successful project. In the TipiWiki default content there is still this snippet:

PBwiki is the world's largest consumer wiki farm and according to some blog entries it is based on TipiWiki. If that's true, i wonder if there is any of my code left.

So I asked their support in 2006 and founder Nathan Schmidt answered:

We've been quite busy with the PBwiki codebase -- it's grown from the 11k of php code in your original index.php to 1244k in 169 files (just php, doesn't include images, css, templates, etc). There were at one point some recognizable elements in the core filter() function but that has evolved quite a bit too -- i just ran diff:14 lines in common, including "return $filtered; "

I took over as the primary developer from David, our founder and CEO, late last year. We've added all sorts of things -- journaled hot-spare backups, master-slave clustering, file upload, some right-to-left support for arabic/chinese/hebrew, google and yahoo ad placements, paypal automation, templates, automatic statistics generation for us and users, and the list goes on.

Shortly after that, the founder David Weekly also mailed me in 2006:

Hi! I saw the email you sent to support. PBwiki was originally based on TipiWiki2, which I used as a starting point because of its incredible simplicity. I liked that the whole system was implemented so efficiently and cleanly and it made it very easy to quickly start customizing. Great work! At this point as you can imagine the system has pretty wildly diverged from TipiWiki - there may be one or two regular expressions that are basically the same, but it's a beast of its own now, and sadly not nearly as simple and clean on the backend as TipiWiki2 was.

We'd love to have you on as a technical advisor or more depending on your availability.

At that time, I was a computer science student and not available, so I rejected. I believe I was quite intimidated by that request.

One year later, David had a request:

We're continuing our vigorous work on PBwiki and have incorporated FCKeditor to offer a WYSIWYG user interface that we think/hope will make the experience much better. Give it a whirl! We're going through an IP review right now and while TipiWiki2 constitutes well under 1% of our source base now, it'd be a huge help to us if we could have a written disclaimer from you giving us full permission to use TipiWiki2 in an unrestricted commercial fashion. We'll even mail you a PBwiki T-Shirt if you'd like. Just let me know your size and address.

I gave them the permission, because my few hundred lines of code were maybe a little kickstarter but nothing crucial to their success. They deserved it. Of course, I can now literally say: "I built the foundations of a company and all I got was this lousy t-shirt." Ok, it wasn't lousy. It was a nice polo shirt.

Whenever someone asks about a simple wiki, I am reminded of mine. Altough I never seriously used it. Back then my goal was to polish the code as good as I could, so I would not be humiliated by open sourcing it. There was no Github or git. I used SourceForge and TipiWiki is still available from there. Without that the code would be lost, so thanks SourceForge! They are still hosting the instance I put online fifteen years ago, although it is broken by file permissions. For some more redundancy I put the code into a repository on Github.

Overall, I still consider the code quite clean and readable. In some parts the indentation whitespace is not clean. I am more finicky about that today. There are cute comments like:

// Assertation: Now we know the name of the current page

The markup is handmade regular expressions. There was no Markdown back then. Let alone a library to use. There was Wikipedias markup but that was already a mess at that time.

The pages are stored as flat files. Older versions are stored in the same file and split by "### next entry ###" lines. From todays point of view, I should have used SQLite, but I probably did not know it and it might not even have been integrated in PHP yet.

Being "standards-compliant" was important for me back then. Standard was XHTML-1.0 strict.

Back than I was quite proud of the code. and I still think it was well done according to the standards back then. Today there should be tests and a framework.

Just to be clear, do not use that code on the internet. Spam bots will fill your wiki quickly. There are probably security problems in there. If you want a wiki, better use PBwiki or look for a self hosted wiki on this awesome list.

This article was triggered by a lobste.rs submission "What is some code you have written that is still running?". Thanks to Nathan Schmidt for the permission to publish his mail. Sadly, David Weekly did not reply.

More than 15 years ago I published a little wiki software.