Make a wiki with Drupal or put/integrate a wiki into Drupal?

Development Seed@drupal.org's picture
public
group: Wiki
Development See... - Tue, 2006-10-03 14:29

I'm going to try and outline some notes from the Wiki session at DrupalCon. I may have missed some big ones. This is a good example of where a wiki would be nice - to make this list. Is it safe to say it is not certain whether to use Drupal modules and glue to make a wiki, or whether to integrate a wiki into Drupal? Maybe it depends on the case?

Basic and necessary

Access control
This may be related to also the ability to have multiple wikis, but it is about who can edit the wiki. A possible approach is node access based on cck type, or a module that allows full node access awareness for cck nodes (right now it is just whether a role can create a certain type, but no viewing by role is handled).

Write in wiki format or in html
Ability to use tinyMCE or just the plain textarea, switch back and forth, etc. and tinyMCE should never gobble anything up. This was discussed at the DrupalCon presentation, but I do not have links to anything yet.

Category assignment
this can just be done using a textfield and free tagging, it's better than writing Category: blah blah on every page you make.

Revisioning and rollback
this is already done. Save as draft is helpful if you want to moderate your wiki.
http://drupal.org/node/48731

Diffing revisions
This is handled to an extent in http://cvs.drupal.org/viewcvs/drupal/contributions/modules/diff/ but Moshe explained it could work better, maybe work better with HTML.

Links back to a page
this may be done using the links module, but it's the idea of what links to a given story which is like the References section on the bottom here http://en.wikipedia.org/wiki/Drupal It would be nice to have this automated as opposed to having to manually assign node references.
http://cvs.drupal.org/viewcvs/drupal/contributions/modules/links/

CamelCase
Make a new page using new page or whatever - this is already done, but may just be buggy
http://cvs.drupal.org/viewcvs/drupal/contributions/modules/freelinking/

Advanced and would be nice

Making Table of Contents for a single page
this could also be special markup/filter and is a matter of some regex work. You can see an example of it here http://en.wikipedia.org/wiki/Drupal where it says "Contents"

Multiple wikis
So, you could have wiki_drupal-development/ which is a wiki about drupal development, and then you could have wiki_wordpress-development so you have two wikis, and so if you CamelCase within one of them, it will put your new page in the correct wiki.


another one for basic would

Development Seed@drupal.org's picture
Development See... - Tue, 2006-10-03 14:35

another one for basic would be an extension of search to search just within a wiki, so maybe that could be controlled by searching just under a given url, like only search within /wiki/ or /wiki-drupal/ or /wiki-wordpress/.

This could also be done already if the wiki was done by using just a specific cck type - then you'd just search within that content type and could have a little module which assisted in setting up that content specific search. a nice detail maybe


Discussion pages?

Gábor Hojtsy's picture
Gábor Hojtsy - Thu, 2006-10-05 10:32

Most wikis have discussion pages attached to the wiki pages, where discussion about further editing is done. How would that be done in Drupal?


I forgot this one - it was

Development Seed@drupal.org's picture
Development See... - Thu, 2006-10-05 10:52

I forgot this one - it was discussed that the comments which appear at the bottom of a node could possibly be put up as a tab next to where view | edit are. I think a question was whether this could be done nicely with the way comments work now, or would something have to be changed?


wiki404 for adding non existent pages

Development Seed@drupal.org's picture
Development See... - Thu, 2006-10-19 01:08

Just adding a node - An additional module for making pages that do not exist like a wiki is http://cvs.drupal.org/viewcvs/drupal/contributions/modules/wiki404/


WikiPage as new content type?

zblace@drupal.org - Sun, 2006-11-05 15:18

Not sure if you discussed about Wiki:
* as a new content type or
* just as new way of producing content and it's relations or
* separate module that would integrate with Drupal site in some way?

I have been wanting to do

sarvi - Wed, 2006-12-27 19:03

I have been wanting to do Wiki with drupal for quite sometime.

Recently I came across the CCK Subform form content type. And I have wondering if that would be useful in creating a WikiPage.

In my mind, a Wiki Part from the markups and editing capabilities needs to offer the following main choices. And I am thinking atleast some of these needs can be met by the following current modules.

1. Content Versioning   - don't know
2. Content Access Control   - don't know
3. Good Editor(not necessarily the wiki style markup, WYSYWYG editor would be preferable)  
           - TinyMCE(I use) and FCKEditor
4. WikiPage should allow for multiple independently editable, versioned Wiki Sub-content that forms the page. 
           - CCK Subforms. It allows for subforms(read wiki sub-content) to be visible/edited from the main CCK Page(read new Wiki Page content type) 
           - Has some bugs that needs fixing, or I would have been able to show how I see this working.
5. Some sort of indexing or TOC for the content.
           - CCK Calculated Field should do this job by going through the page and its sub-forms to create a TOC.
6. Linking to other wikipages and sub-content
           - TinyMCE has link capabilities that allow for adding links to other content

What do yall thinking.
Sarvi

Basic plan for my site

bburan@drupal.org - Sat, 2007-01-06 01:28

I agree with much of what has been discussed above. Over the past few months I've been trying to think through the best way of implementing a wiki-style area of my website. One concern I had is that more than one wiki page with the same title could concievably be created (need a way to disambiguate by categories if necessary). I would love to see a diff module that produces much cleaner HTML output. Is there any way we could borrow from MediaWiki's version?

Regarding "talk pages", I was thinking that the most feasible solution would be to create a tab that would link you to an (automatically created) forum where you can post topics and comments regarding the page. Would this be more flexible than a simple comment structure?

getting there

moshe weitzman's picture
moshe weitzman - Wed, 2007-01-24 20:46

as evidenced by wiki pages on this site, we are making slow progress. i look at this post now and see this is a doable task.


alredy there?

rötzi@drupal.org - Thu, 2007-01-25 16:53

I would say you can already setup a wiki with drupal. A place to do collaborative editing with automatic linking and page creation is already available, and this is in my opinion the main idea behind a wiki. Some nice-to-have features are still missing, but nothing really necessary.

I did a quick setup for a wiki: http://test.tschannen.net
It won't stay there forever, so have a look now. The setup is basically the same as here: Syntax filter, freelinking and diff are used.

Getting some attention

ghoti's picture
ghoti - Thu, 2007-01-25 17:48

rötzi, your test wiki is already getting some excellent input. Please do make sure its interesting content is recorded somewhere here before you take it down! :)


What about MediaWiki integration?

gusaus's picture
gusaus - Thu, 2007-01-25 19:02

I love the new wiki page (thx Moshe!), but unless I'm missing something the formatting isn't compatible. Is there any way to move (cut/paste or some other format) between Drupal wiki and MediaWiki? I'm sure this has been asked before...

Gus Austin
Director of Chaos and Confusion
PepperAlley Productions
What am I trying to do with Drupal?


markdown

moshe weitzman's picture
moshe weitzman - Thu, 2007-01-25 19:32

we use markdown on this site. mediawiki uses own syntax. you can choose what you want for your own site.


Waiting for a real MediaWiki integrator

samuel lampa@dr... - Thu, 2007-11-08 08:52

While missing a real MediaWiki integrator module/suite in Drupal, I have started playing around with a creepy little hack. I downloaded the contemplate module, created a new template named "remote mediawiki article" and then included only the following code in the body field:

<?php
print file_get_contents('http:/my-mediawiki-server/wiki/' . $node->title . '?action=render'); 
?>

Which then will show any the article with the same name as the current node title, from the specified mediawiki site.
( action=render gives only the page content. Also add one slash before 'test'.)

Now I can control all the authentication et.c. within Drupal, while storing and building all the content on the MediaWiki. ...which is optimal, because I then can use the oh-so-potent MW's templates. Just missing the feature to also edit the wiki content inline in Drupal, (maybe) having the search index in Drupal et.c. et.c.

Samuel Lampa
MediaWiki / Drupal Theme design

MediaWiki syntax

samuel lampa@dr... - Tue, 2007-02-20 01:11

By the way, did you try Liquid wiki module? It uses MediaWIki syntax, even though not completely. Some features like templates aren't included... =(

Auto create new node

Harriska2@drupal.org - Thu, 2007-01-25 18:48

How did you set it up to create a new node when clicking on a newly created freelink - is it the wiki404 module? I installed head for wiki404 and I'm not sure it is 5 compliant as it doesn't show up in list of modules.

I use freelinking to create

rötzi@drupal.org - Thu, 2007-01-25 18:59

I use freelinking to create new nodes automatically. The PEAR Wiki filter redirects all links to freelinking, so they work together for this.

The wiki404 module I use is self-written. I wasn't aware there is a module with the same name, so the naming was unlucky...

My module just redirects 'wiki/unknown' to 'freelinking/unknown' und thus redirects to either an existing page (found by freelinking) or to a create node page (redirected by freelinking).

Freelink vs wiki404

Harriska2@drupal.org - Thu, 2007-01-25 19:22

I'm confused in the difference between Freelink and wiki404 (which, I take it, is not available). It appears that with Freelink you can only create the page from the Freelink listing of pages. Is your wiki404 module (not the module listed under /projects/wiki404) the thing that allows the creation of a new page when you click on a link that doesn't exist as a page?

My wiki404 module

rötzi@drupal.org - Thu, 2007-01-25 19:37

I had a quick look at the wiki404 module available from drupal.org and it has basically the same effect. The drupal.org module redirects 404 errors to the node creation page. My module just redirects a non-existing path below 'wiki' to 'freelinking' which does then checks if a page with the same name (case insensitive) exists or not, and then either redirects to the page or to the node creation form. Have a look at my module:

http://test.tschannen.net/wiki/wiki404

wiki404_redirect

Harriska2@drupal.org - Thu, 2007-01-25 21:31

Hi rötzi, under your module, wiki404_redirect, it shows:

function wiki404_redirect() {
  if (arg(0)=='wiki' && arg(1)) {
    drupal_goto('freelinking/'.urlencode(arg(1)));
  } else {
    return drupal_not_found();
  }
}

arg(0) is expecting 'wiki' - is 'wiki' a category term?

Also, what are your settings under freelink? I'm not sure mine is set correctly.

no category

rötzi@drupal.org - Thu, 2007-01-25 21:40

No, wiki is no category. I instructed pathauto to create the path aliases for wiki pages as 'wiki/[title]'. By this I restrict the wiki part of the page to reside under 'wiki' and the rest of the page is not affected by it. This just gives a separation from the wiki and the rest of the page.

Site settings:

New content type: wiki (just a default content type like 'page')
set to 'create new revision'

freelinking settings:

Default for new content: wiki
What to do if content not found: Search for content if user can't create
Restrict free links to this content type: wiki
Allow CameCase linking: no (not necessary since the freelinking filter is not used anyway)
Only link first occurence: no (not necessary since the freelinking filter is not used anyway)

input format:

New input format using PEAR Wiki filter only. freelinking filter is NOT enabled, but on the configuration page of the wiki filter it is set to 'use freelinking'.

pathauto:

Path alias for wiki node type: wiki/[title]

Lots of settings

Harriska2@drupal.org - Thu, 2007-01-25 22:28

I got a lot of the settings wrong. When I reset them, created the wiki content type, disabled most of the "use freelinking", added wiki/[title] to pathauto for wiki node type, it won't redirect. I ensured that I had the newest version of pathauto, freelink, and your pear wiki. It simply won't redirect to a new page with the title already filled out.

Just curious, when you say:
freelinking filter is NOT enabled, but on the configuration page of the wiki filter it is set to 'use freelinking'.

Do you mean to check the box "Use wiki links?" On the config page for wiki input format ther is no option to 'use freelinking'.

freelinking

rötzi@drupal.org - Thu, 2007-01-25 23:00

I just mean that the freelinking filter is not enabled in the format which uses the pearwiki filter. The module has to be enabled, and the pearwiki filter set to 'use wikilinks' and 'use freelinking'. If you don't see the 'use freelinking' option that means you are not using the developement version of pearwiki filter. You have to use the dev version or get it from CVS.

Success!

Harriska2@drupal.org - Fri, 2007-01-26 00:04

Yep, that was it, needed the dev version. Thanks a ton! I'm in love. Now I'm looking at Rep[lacement]Tags module to see if I can turn ~~~~ into a signature with date.

It is possible to get a

misterlu - Wed, 2007-01-31 10:01

It is possible to get a little README about you configuration ?
I am very interesting how you integrate the Wiki in a Drupal site.

Thanks

MiStErLu

how to

rötzi@drupal.org - Thu, 2007-02-01 00:08

I wrote a little how to. I never tried it myself but I hope I didn't forget anything too important.

http://test.tschannen.net/wiki/how_to_install_this_type_of_wiki_with_dru...

Found this recipe to work

mgifford@drupal.org - Mon, 2007-03-12 14:56

Found this recipe to work quite nicely:
http://drupal.tschannen.net/wiki/set_up_a_wiki_with_drupal_5

I'll definitely use it in the future.

Mike

OpenConcept | WLP | FVC | OX | OO

Updated link for recipe

transformative@... - Wed, 2008-05-28 19:28

If you find that the above link isn't working, here is an archived link for the recipe on how to set up a wiki:

http://web.archive.org/web/20070311234253/http://drupal.tschannen.net/wi...

Also, see my post on how the OpenConcept setup went, using this recipe:

http://openconcept.ca/blog/internal_wiki_setup