You are here: Home >> How-Tos >> Flat Board Solution

How-To: Flat Board Solution

By Mark Morgan

Contents:

What is a flat discussion board?

There are two primary ways to view messages in a discussion board application: threaded, or hierarchical; and flat, or topic-based. Conversant's discussion area is currently designed to be threaded. You view messages one at a time; there are tools for navigating the messages by topic, or by time.

In a flat discussion board, like the very popular Ultimate Bulletin Board, topic is the defining feature. You view a messages as part of the full content of the topic to which it relates. Most flat bulletin board systems have a process for managing topics, spawning new topics, and organizing the board by topic and subtopic.

Which approach should I use?

In October of 2000 I realized suddenly that Conversant's flexibility meant that I could, sort of, hack a flat discussion board out of the FullThread page type. Soon afterwards, Macrobyte Resources greatly expanded the power and flexibility of the Conversant macro system. One minor side effect was that now you could make a flat bulletin board, sort of, out of the standard message display.

If you only want a flat bulletin board, use the Message Macros hackaround.

If you want to maintain the threaded version that comes with Conversant, and add a flat discussion board as a variant (or vice versa) use the FullThread hackaround. For reasons discussed below, this involves some compromises.

In both cases, they are definitely hacks. There is no topic/subtopic organization, and no pagination. Also, new messages in a thread sometimes appear not at the bottom but in the middle of a thread, because Conversant is sorting them according to their place in the thread's reply heirarchy. That is, if you have messages 1, 2, 3 and someone posts or mails a message 4 that is a reply to message 1, the messages will display 1, 4, 2, 3. On the other hand, they both work pretty well until Macrobyte releases an official flat board implementation, possibly in Q1 2001, give or take slippage. Until then, these are Good Enough.

Message Macros Approach

This is incredibly simple.

If you just want to use the default templates, without editing them, do this:

  • Go to YoursiteURL/admin/conversations/conversationID/preferences$plugin=Default%20DG.
  • In the dropdown menu next to where it says "Message View Template" choose "Flat BB READONLY".
  • Click "Save Changes", and you're done.

If you want to make changes to the default templates, do this:

  • Go to YoursiteURL/admin/conversations/conversationID/templates$section=create.
  • In the input box type "Flat BB" and from the dropdown menu under "based on" select "FlatBB READONLY" then click the "new template" button.
  • In the results, make whatever changes you want. Click "Save Changes"
  • Then go back to YoursiteURL/admin/conversations/conversationID/templates$section=create.
  • In the input box type "Flat BB Reply" and from the dropdown menu under "based on" select "Flat BB Reply READONLY" then click the "new template" button.
  • In the results, make whatever changes you want.
  • Click "Save Changes"
  • Go to YoursiteURL/admin/conversations/conversationID/preferences$plugin=Default%20DG.
  • In the dropdown menu next to where it says "Message View Template" choose "Flat BB".
  • Click "Save Changes", and you're done.

This is the solution with the least amount of fuss, but it does not allow you to preserve the original, threaded version.

Full Thread Approach

The key to the pseudo-flat message board that I hacked out of Conversant is a hypertext anchor added to each message in the full thread page. Then, all the links pointing to individual messages can be changed to point to one of these anchors in the full thread page. It's kind of grotty, but it seems to work.

I wrote above that this one would allow you to keep both kinds of board as a choice. Credit Flip Martin for suggesting how: create a brand new discussion group page for the flat board. I made my flat one the default (/discussion/index) and the threaded on the alternate (/discussion/threaded), or you could do it the other way around, whichever suits your fancy. It seems to me to be more trouble than its worth to maintain two of everything else (the topics page, the search results page, the full thread page itself). I pointed all of these to the fullthread/flatboard variant. You might choose to just leave them alone. In the end, the individual messages point back to the flat variant anways, so it should be usable either way.

You'll want to add a link to both versions in your template somewhere; I have an existing sidebar where I added it.

In the FullThread

At the "basic" tab: in the field next to "Page Title", put <!--#msgSubject-->

At the "Options" tab:

You may wish to skip the following steps and cut and paste the sample text. Scroll down to the bottom of this message. First, save both enclosures to your hard drive: right mouse click (on Windows) or click and hold (Mac) and use the popup menu to save each text file to your hard drive. Open "page.txt" in a text editor or word procesor, and cut and paste it into the box next to "Page Template". Similarly, cut and paste "message.txt" into the box next to "message template". Then click "save changes". (These sample templates are based on the display I use on my site, and designed to give a display similar to Discus.)

If you prefer to customize your own code, here's how:

  • In the box named "Items Template" add the following hypertext anchor code:

    <a name="POST<!--#msgNum-->">

    Replace the POST with something appropriate for your site name; it's just there to keep the anchor from being straight numbers, which apparently causes some problems with some browsers. Put the anchor somewhere near the top of the coding.

  • Replace <!--#threadMsgSubjectLink--> with <!--#threadMsgSubject-->
  • I also added a toolbar for replying and editing and such. Here's my code:

    <a href="/<!--#MsgNum-->/reply">Reply</a> | <a href="/<!--#MsgNum-->/edit">Edit</a> | <a href="/fullthread$<!--#msgnum-->#POST<!--#msgNum-->">Bookmark this post</a><br><!--#msgEnclosures-->

    Again, replace the POST with some code appropriate to the name of your site. That last bookmark link is repeated, in various ways, throughout hack. It points to the message's location in the full thread, made possible by the hyperlink anchor you posted first.

  • Replace <!--#threadMsgClip--> with <!--#msgBody-->. Instead of displaying a brief clipping of the message, the Full Thread page will show the entire contents of the message, with the HTML all displaying properly.

In the Discussion Group Calendar

This is actually the easiest one. Replace <!--#listDayMsgSubjectLink--> with <a href="/fullthread$<!--#listDayMsgNum-->#POST<!--#listDayMsgNum-->"><!--#listDayMsgSubject--></a>

In the Message Template

Because this is a bit of a hack, the individual messages still appear by themselves if someone posts a new message, edits a message, or replies to a message or thread. So I put some code in to send the user back to the appropriate version. On my site, I kept the original threaded toolbar and added this line to this template:

<b>Flat Discussion Users:</b> Return to the <a href="/fullthread$<!--#MsgNum-->#POST<!--#MsgNum-->">full thread of this message.</a>

If you intend the threaded version to be the default, and the flat version to be the alternate version, you're done.

If you prefer the flat version, you can go ahead and point the query results page to the threaded version.

In the Query Page

In the Search Result Item Template, replace <!--#searchResultMsgSubject--> with <a href="/fullthread$<!--#MsgNum-->#POST<!--#MsgNum-->"><!--#searchResultMsgSubject--></a>

That's it! Obviously this second approach is more complicated, but it gives your users more choices.


QuickStart
Main Menu
Discussion

Guests
Welcome!
  • Sign Up
  • Logon

  • Search


    This site managed with Conversant, © Copyright 2008 Macrobyte Resources; Unless otherwise stated, content © 2000 - 2005 Mark Morgan
    Site design adapted from a free template at Free Site Templates.