Using the freelinking module and node privacy by role modules, it is fairly easy to create a wiki in Drupal. However, it seemed like there should be a simpler way to do this that does not involve installing a permissions module. Besides the fact that the various permissions modules are not always compatible with each other (meaning that when node privacy by role is installed, another permissions module may not be able to be used), the add on permissions modules seem a usabiliity overkill if not needed otherwise (they do have to be configured) and implementing a permissions module increases cpu usage on the site.

So, following the instructions in How to create your own simple node type (from story node), I used the story module in 4.6.3 to create wikipage.module, a new node type with two additional features not found in story:

  • an "edit all wikipages" option in access control
  • a "recent wikipages" block (modified from the code in blog module)

I'm not a coder, so I wouldn't know where to take this from here. I'm hoping that someone will run with this idea. At the very least, it would be very nice to see that access control option be added to page.module for core so that the main functionality provided here was in default Drupal installations. Sure would go nicely with Gerhard's work on revisions for 4.7.

Comments

Boris Mann’s picture

Just a side note: you can, of course, just use the book.module and the "maintain books" permission out of the box, so in fact only freelinking.module is required to be added to a core installation.

wikipage is probably a good name for the module, Charlie, since it focuses on doing stuff with a wiki node type, which none of the other modules do. Actually, ideally the existing wiki module would be transferred to wikifilter (maybe as a sub-module, where wikipage could also be placed?).

Adding this to the page module directly is unrealistic....we really need to do this the right way.

cel4145’s picture

Sure, you can use the maintain books option. I tend to think that that this is not a good alteranative. The books module imposes a structural hierarchy on the created text. Also, the book module tends to be useful for other non-collaborative site functions such that administrators are with an either/or choice.

I agree about the wiki.module. I think I remember people getting confused about its functionality because of the name.

Boris Mann’s picture

Actually, I forgot that I was using (somewhere?) a hacked version of book.module that added a "maintain outlines" permission. "Regular" users don't see this at all, so all new book pages just get added as roots, with the bonus that /book displays all un-outlined pages.

I find the combination of *optional* hierarchy actually quite useful, although of course a many-to-many relationship would be more useful.

kvarnelis’s picture

could someone explain how the book module would impose hierarchies on wikis.

i have to admit that the book module is kind of weird and i haven't played with it.

BUT

sometimes i want a hierarchy in my wiki.

for example, if you have a multi-page description, it can be nice.

i noticed on bryght's wiki recipe page that's the way it worked.

thoughts, folks?

Boris Mann’s picture

After I use the standard "page" type, I can use the book module, hit the "outline" tab, and organize the pages however I like.

Turn on book and experiment...

kvarnelis’s picture

so i've set pathauto to make sure that all pages of content type wikimodule are in the directory /wiki

freelinking is only set to work with wikimodule pages

so why is it that my freelinks don't go to /wiki/pagename but rather that they are automagically sent to /freelinking/pagename

obviously, that's useless. thoughts?

Boris Mann’s picture

Everything has to be routed through freelinking, since it looks up if the page exists, then routes you to it.

kvarnelis’s picture

is there some way to create an alias then? how does the bryght site do it? there it says 'wiki' not 'freelinking'...

Boris Mann’s picture

wiki.bryght.com uses the freelinking links -- see http://wiki.bryght.com/wiki/drupalwikirecipe, and hover over the "Wiki Recipe for Freelinking Module" link -- you'll see that the link appears as "http://wiki.bryght.com/freelinking/Wiki%2520Recipe%2520for%2520Freelinki...", but that clicking on it redirects (using the freelinking.module) to http://wiki.bryght.com/wiki/wiki-recipe-for-freelinking-module

And, pathauto (as the recipe states) is used to automatically have new pages called wiki/[title]

kvarnelis’s picture

this seems like an option for the freelinking module... it's a solution of sorts, but not the kind of thing i'd feel too good about using.

rimshot’s picture

Where are we at on adding this module to the list of "modules" on the drupal site. This functionality looks like something many people would want to know about. I know I have been asked by more than 1 client if they could setup a wiki, for now I've been using mediawiki for them, but would love to setup a wiki in my drupal installation.
I'd also like to second a previous comment that the current Wiki.module name is VERY misleading. I downloaded Wiki, hoping that it would do what this WikiPage module does, instead to find out that it's just for the wiki syntax. What's up with that?
This WikiPage.module is what people are really looking for.

Anonymous’s picture

Someones recently released the liquid wiki module which does this. I havent tested it yet, but it has the functionality. It should be possible to do wiki names without pathauto, poll does something like that... I have written a wiki module that does wiki pages, unique names and depends on freelinking and uses a modified version of wiki.module. Books don't have the same functionality as wikis. wikis are a bit of a rare thing in Drupal and it would be nice to have a native Drupal solution wihtout using Mediawiki. Wiki and wikipage dont work on 4.6 though, though.

dbassendine’s picture

The original wikipage.module seems to be unavailable, so I rolled another one for 4.7. It's at www.tonderai.co.uk/files/wikipage.module

It is simply a modification of story.module, with the additional ability to assign edit and delete permissions for all wikipage nodes. No recent wikipages block, though, I'm afraid.

dbassendine’s picture

Now updated to distinguish between standard and moderated wikipages.