Me, myself and Drupal Chapter 3.5 : == ”’Wiki Hell”’ ==Jun 26th, 2010 | By admin | Category: Technology
Alright, the nightmare of getting a fully integrated Wiki into Drupal is finally over. Hopefully some lucky soul finds this and saves themselves the literal days I spent getting this up and running. At the end of my last post I mentioned a few links and articles here and there and I’m happy to report that none of them did the trick. That being said I think it is still a good idea to go through them and even follow the instructions, whether or not they work, so that you can learn from them. They teach a lot of stuff relating to input types that is crucial for using Drupal and will be crucial if you want to successfully implement a Wiki system.
First of all, forget about using any media wiki modules, they are all shit. In fact mediawiki_api is so bad right now that at one point it actually came close to melting my server down. The entire server, every one of the dozens of websites I run on it came crashing down to a crawl until I totally shut down apache and mysqld in order to manually remove the mediawiki_api module. There is another Mediawiki filter module that also doesn’t work, again to flaunt how much they don’t work just implementing them and then trying to create content with an input type involving these filters causes whatever you write as content to just show up as a totally blank page. Actually that mainly applies for the mediawiki_api module, the standard MediaWiki module with preloaded mediawiki filters goes one step further and causes any wiki content created with this filter to spit out an nginx error as it fucks with apache to the point of apache not even knowing what to do with the page.
So what did I do? Well in the end the solution was really damn simple, it was just a matter of widdling away all of the non-functioning crap that shows up at the top of all the module lists and google searches for ‘drupal + wiki’ . First off you are going to have to kiss your media wiki syntax good-bye. Well you don’t have to entirely as you can create your own filter sets by hand but to make filters takes time and patience that I was running out of, although I probably will go ahead now and make them anyways on top of what I have. If you want some instructions on how to do this go here: http://drupal.org/node/217177
In the end the syntax I am using is from PmWiki because the module I am using comes from the kind sir over at www.interestingto.me.uk. For a complete rundown of the pmwiki syntax head over to: http://www.pmwiki.org/wiki/PmWiki/TextFormattingRules. So the first module you want to install can be found here: http://www.interestingto.me.uk/DrupalWikiModule . Why this isn’t in the drupal module repository I don’t know, it damn well should be. This is a fairly simple install with instructions on the page. This is the main one, it actually allows you to use a wiki syntax and produce results that don’t destroy your server.
The other module you are going to want is this one: http://drupal.org/project/freelinking which basically implements filter for the easier creation of HTML links to other pages in the site. So you can have nice [links] going straight to other wiki articles. You’ll need to do a bit of reading to see how you properly link to other pages.
The Table of contents is the major reason I love Wiki’s and so you will need to get the Table of Contents module found here: http://drupal.org/project/tableofcontents . It’s a snap to install and all you need to do after that is add it into your input type and insert a [toc] at the top of your post or alternatively you can go into your input type menu, click on your new wiki filter and then go to ‘configure’ to configure the TOC module to auto-insert a TOC when you exceed X number of headers.
The only thing else I can imagine is a module that allows inline images to be placed like in a wiki, but I’ll tackle that later I think after I wrap my head around how Drupal handles it’s images currently
So that’s that. The wiki is up and running finally and I can breath a sigh of relief as I thought I was going to have to start from scratch here and reinstall drupal at one point. I haven’t been able to get any of the wiki importers to work properly so it looks like I’ll just be copying and pasting that stuff into Drupal by hand.. Ah, and that makes me realized I am going to have to manually input the media wiki syntax into my filter because all of my other wiki’s are in media wiki format.. No rest for the wicked it would seem!
Here are some other related links of interest:
Hope that helps, onto Chapter 4!!