Create a discussion board for Mindtouch wiki

A recent comment on my Mindtouch intro page asked how I built the discussion board.

I originally got the code from the Mindtouch Developer site here, however I can’t seem to find the complete source code anymore. Either way, I’m pretty sure neilw, a valuable contributor to the Mindtouch community is the author of this code and full credit goes to him.

The actual implementation is very simple. You just need to make a couple of templates.

First, create the discussion board page template, or topic list:

Template:/ForumTopicList


{{wiki.create("Create New Topic",homepath,(args.template ?? "ForumTopic"),true,"Put Your Title Here")}}

Topic Starter Replies Last Comment(C) or Edit(E) Views
{{t.sticky}} {{web.link(t.page.uri, t.page.title)}}
 
{{ t.originator; }} {{#t.page.comments}} {{date.format(string.substr(t.date,1),'yyyy-M-d H:mm');' '; if (t.change != '(new)') { 'by '; t.author; ' '; } t.change; }}
{{t.page.viewcount}}
(no topics yet)

 

Then call this template somewhere on your page, with this:

{{ template("ForumTopicList") }}

Now, you need to create the template for the actual new topic post:

Template:/ForumTopic

Created by {{ edit: web.link(user.uri, user.name) }} on {{ edit:"{{ save:date.now}}" }}
 
{{ if (page.tags.sticky != nil) { "STICKY"; } }} {{ web.link(page.feed, "Track this page") }}
 

  

 

Instructions:

  1. These instructions will only appear while you are editing.  No need to delete them!
  2. Please enter your Subject in the title above.
  3. Enter the content of your message in whatever form you like below.
  4. Adding comment: If you're not the original creator of this topic, please reply by using the "Add Comment" field at the bottom of the page. The comment added will be tabulated in the "Reply" field.
     

 

<enter your topic message/description here>

You can modify this template to include whatever instructions you like.

That’s it! To create a new topic, navigate to the page that you call the ForumTopicList template, and click the “Create New Topic” button:

When others comment on the page that’s created, it will count as “replies” and show in the topic list.

One thought to “Create a discussion board for Mindtouch wiki”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.