Building a Discussion Forum

Table of contents
  1. 1. Credits
  2. 2. The Tutorial

Introduction

This four-part tutorial explains how to build a simple but remarkably functional discussion forum in pure Dekiscript, using only two templates and a modest chunk of code.  If you can make it through all four parts and understand all the code, you'll have a pretty complete understanding of Dekiscript.

In general, this tutorial assumes a reasonable level of familiarity with Dekiscript, though it'll occasionally dive into some more basic material.  Useful more advanced tips may also be sprinkled throughout.

Here's a screenshot of the finished product  (red outline added for clarity):

forum_example.png

Credits

The original forum code was created by craigsivils, who therefore inspired this insanity.  Craig has also contributed to its ongoing development.

Additional development, templatification, and tutorial by neilw.

Thanks (or perhaps, not) to SteveB for suggesting the tutorial.

The Tutorial

  • Part 1: Basic Structure - This first part introduces the basic structure of the ForumTopicList template we'll be creating.  This is a common Dekiscript pattern that is useful in many applications, and will form the basis for our forums.
  • Part 2: Arguments and refinements - Here we add some useful (and highly reusable) argument processing to the template, and then focus on refining the topic list to make it operate more like a real forum.
  • Part 3: The ForumTopic Template (not available yet) - Here we'll extend the functionality of our forum list by introducing a template for each topic, and taking advantage of this to put more useful information on the forum topic listing.  The final code presented in part 3 is a usable, fully functioning discussion forum.
  • Part 4: Gilding the Lilly (not available yet) - In our interest of exploring every nook and cranny of Dekiscript, for the grand finale we will add some functionality that is not really necessary but very cool.  Check it out!

 

Tag page
You must login to post a comment.