MicroWiki 2.0?

MicroWiki is not a plugin.

It seems like I've been working on MicroWiki forever. There are many complex and nuanced emotions for me surrounding MicroWiki. I use it for nearly everything that I don't do with WordPress, so you can imagine how that might affect my feelings toward it.

At the same time, I've bashed the code to death. "Spindle" and "mutilate" are the words I would use to best describe the things I do routinely with MicroWiki after I get it installed somewhere. And every time I think "Hey, this is nearly ready for packaging!" I think of something else that it really should be doing better than it does, and I end up merging code from four different sites to get a revision with everything I've added.

In fact, I'll lay it out for you right here and now: You will not understand this code, even though it runs.

That said, if you want a wiki, maybe this is for you, and maybe it isn't.MicroWiki 2.0 is not MicroWiki 1.3

I think that should be obvious, but I wanted to make clear right from the start that this incarnation of MicroWiki is not the same as the last one. There are a few significant differences.

For one, it doesn't use EzStatic to integrate with WordPress. For another, some of the wiki syntax is a bit different. (Yeah, I know, "Eek.") And it's a bit more flexible than last time.

There are a few cool things about MicroWiki. Let me list a few things that MicroWiki does for me that will probably cause me no end of support questions like, "Why can't I get MicroWiki to do what you said it would on your blog?"

MicroWiki integrates with WordPress. In this most recent pass, I switched around my philosophy as to how this would be done. "Integration" for our purposes means this: MicroWiki uses WordPress' database connection and user authentication, and has access to any functions that are usually defined when accessing a WordPress page.

So when you install MicroWiki and choose the "WordPress" User Registration option, it'll create its tables in your WordPress database, and it will allow only the users with "wiki_edit" capabilities to edit your wiki. And if you do something crazy like include a PHP file into one of your wiki pages, it will have access to all of the WordPress functions. Depending how you look at it, this could be easier than building a whole plugin to create a page.

MicroWiki has new rewriter functionality. Taking a cue from how WordPress manages rewriting (but not using WordPress' WP_Rewrite class), rewriting is handled internally when a URL is passed to it from a generic rewrite rule. Also having some more experience with mod_rewrite by this time, a sample .htaccess file comes along with the installer. Friendly URLs are now much easier to implement.

MicroWiki has no templates. This concept is a hard one to get across at first. Most wikis load a template file from disk, then take the content that you submitted to the database and insert it into that template. How do you edit the template? Well, you open up a text editor (outside the wiki) and edit the template. That's... um, convenient. Not.

MicroWiki uses a formatting tag to insert page content into a template that is stored in the database. You can edit the template inside the wiki. So if you don't like the way that the template is constructed, you can edit it inside the wiki without opening a text editor or downloading/uploading template file changes.

MicroWiki supports a content-type tag, too, so your CSS files aren't in some file on the server, either. They're in the wiki. You can edit them in the wiki.

You can specify a different "format" (that's what they're called in MicroWiki) for any page, just by including a macro, like {{format:myformat}}. Instead of displaying the page content of that page in the default format, MicroWiki will use the "Format:myformat" page as the page layout, inserting the content on that page wherever it finds the {{Special:pagecontent}} tag in the format page.

Yes, it's all very confusing, but if you're following along, I think you'll say, "Whoa, cool!" Either that or, "You're insane!"

MicroWiki has an image gallery built in. Wait. What? I'll say that again... MicroWiki has an image gallery built in. It's a sucky image gallery, and mostly it sucks because nobody ever knew it was there to give feedback for it. But it is. So what's the deal?

Well, the default editing page (have I mentioned that the editing page format can be edited, too?) has a frame at the bottom that lets you upload new image files. When you upload a file, it automatically inserts the macro tag necessary to display the uploaded image. You can choose some properties for the tag, like the alignment and whether you would like a thumbnail instead of the full-sized image. The image automatically links to a unique wiki page for that image, to which you can add new content.

In the frame, there is an option for selecting a gallery for the image. You can create new galleries via FTP simply by creating a new directory in the wiki's "images" directory, and then uploading a bunch of images.

How do you display a gallery? You add a macro that specifies the gallery name. MicroWiki displays thumbnails of all of the gallery images, and adds some fancy-ish (ok, it's not that fancy) that displays the image a little bigger when you click on a thumbnail. If you then click on the bigger image, you go directly to the dedicated image page.

That's assuming any of that actually works.

MicroWiki can include stuff. It might be difficult to convince you of the utility of this, but I'll give it a shot.

If the wiki configuration allows it, you can use a macro to include a php script's output at some point in the wiki page output. One handy example of what you can do with this is include a file that fetches and displays RSS news. If you put that in your wiki's sidebar, you can extend the functionality of the wiki significantly.

Moreover, because the wiki has already created all of the objects needed for database access and authentication, you don't have to code any of that stuff into your scripts. All you need to do is create the script with the functionality you want, save it near the wiki, then create a new wiki page that includes that file. Instant object access!

So where is this monstrosity? Hmm... Well, it's only 136kb, so it's a really small monster. But yeah.

Before you go off in an excited rush to get the thing, let me come clean a little (as if you couldn't tell):

This thing isn't tested for regular people to use.

What I mean is, it should install simply. It should run ok. I don't have any trouble with it. But I am not you. And seeing that I've had zero feedback on this version so far, that's hopefully where you can help out.

I've set up a forum for MicroWiki over at RedAlt. If you've got issues, drop them in the forum and I'll check them out. I'm not guaranteeing instantaneous (heck, any) response, but at least they'll be catalogged for when I get a moment to look. And if someone else has a working solution for your problem, that's the most likely place to find it.

So run along now.

Blicki might also interest you, if you're looking for post versioning and wiki-like linking within WordPress.


15 Responses to MicroWiki 2.0?

  1. Christiaan from last-straw.net 1970-01-01T00:00:00+00:00

    I consider using a lot of software. Downloading and installing lots of software can be a pain so screenshots help filter out the obviously bad stuff. Looks good by the way, gonna have to download and give it a go. :)

  2. Kafkaesquí from guff.szub.net 1970-01-01T00:00:00+00:00

    I assume that as I had to edit wiki.php for a wp-login.php include and so make MicroWiki realize it "integrates with WordPress" means I stepped into things here a mite early?

  3. Owen from www.asymptomatic.net 1970-01-01T00:00:00+00:00

    Kafkaesquí: You shouldn't have had to do that. When you set the User Registration option to WordPress, the login form that MicroWiki presents, although not wp-login.php, really does validate against the WordPress user list.

    Better than that, the login form is customizable. If you edit the "Login" wiki page you can make it look like whatever you want.

    If the login against WordPress wasn't working, that's a bug, even though I thought I tested that aspect reasonably well.

  4. TDH from www.tdh.se 1970-01-01T00:00:00+00:00

    This looks great, I've been meaning to look into wiki for a while now and communication with WP just kicks ass. Seems a lot more versatile than big and bulky (but good and easy to use) MediaWiki as well.

    Just a quick note: this text would've been a lot nicer to read if you'd put som screenshots in it.

  5. Kafkaesquí from guff.szub.net 1970-01-01T00:00:00+00:00

    Owen, an OS/server issue?

    I got numerous undefined variable/index/property "notices" on my test (XP/IIS) server until I included wp-login.php. Also, I can remove the include once I've gone through MW's configuration.

    Anyway, tried everything as is on my hosted site (Linux/Apache) and things went swimmingly.

  6. Owen from www.asymptomatic.net 1970-01-01T00:00:00+00:00

    Hmm. That's pretty weird. I'll have to run some testing on IIS to see if I can find the culprit. Thanks!

  7. Christiaan from last-straw.net 1970-01-01T00:00:00+00:00

    Any screenshots?

  8. Owen from www.asymptomatic.net 1970-01-01T00:00:00+00:00

    What is it with people and screenshots? :)

    RedAlt uses an early (and somewhat customized) version of MicroWiki 2.0, if that gives you any concept of the flexibility that it provides.

    My in-vitro audio production site, Almost Friday is using a pretty stock version.

    And the Indoor Astronomy site is still in the process of being converted over from pmWiki.

    It's kind of pointless to provide screenshots because the editing interface is the same as what the public sees, just with a textarea instead of the page content, and a string of sidebar menu items that are related to editing. And since the interface is fully customizable, it will look different on any site.

    In any case, here are some MicroWiki screenshots, including the back-end on a couple of those sites.

  9. MacManX.com » Blogroll Dive: 3/6/06 from www.macmanx.com 1970-01-01T00:00:00+00:00

    [...] Owen released MicroWiki 2.0. [...]

  10. nick botulism 1970-01-01T00:00:00+00:00

    exactly. what is it with software without screenshots?? i'm a visual person. show me.

  11. HÃ¥vard Hvassing from hvassing.com 1970-01-01T00:00:00+00:00

    Small, neat and handy! The only thing is that I'm not sure why I should opt to use this instead of Wordpress' own page handling.

  12. r. from adesigna.net 1970-01-01T00:00:00+00:00

    I would love to use microwiki but I can't find any information where to put it insede wordpress and how to install it...

  13. Owen from www.asymptomatic.net 1970-01-01T00:00:00+00:00

    Try these.

  14. Owen from www.asymptomatic.net 1970-01-01T00:00:00+00:00

    No doubt I'm dern busy, but Microwiki is always available directly from the code repository.

  15. Bernd_fh 1970-01-01T00:00:00+00:00

    Hi Owen,
    as we all know you are a tremendously capable multitasker. Job, WP development, own software, family, own needs - so when your site is dysfunctional for some time I'm guessing bigger problems are existing.
    Sorry to disturb you but is there any link for MicroWiki2.0.2 somewhere available. I'm somehow fixated to get WP with integrated Forum and Wiki "plugins" running.
    All the best for you, bfh

453