Free-Conversant Support / RE: Flat Discussion Board
 Home   About Conversant   Free Sites   Hosting   Support   XML-RPC 

Search




Subject RE: Flat Discussion Board
Posted 10/4/2000; 4:09 PM by Mark Morgan
Last Modified 10/15/2000; 7:27 AM by Mark Morgan
In Response To Flat Discussion Board (#1444)
Label None. Read 1597
<Previous Next> Thread: Forward chronological view Reverse chronological view Hierarchical outline view Edit Reply
This is a first draft of this; feedback to make it clearer is welcome.

Introduction

The key to the pseudo-flat message board that I hacked out of Conversant is a hypertext anchor in the full thread template in the structure setting in the admin system. Then I changed the coding in all the approriate locations in the site admin system to point to a message's location in the full thread, rather than to the individual messages. It's kind of grotty, but it seems to work.

I have a suggestion to pass along, courtes Flip Martin. When you do this, create a brand new discussion group page for the flat board, so that you now have two message boards on your site, one threaded, on flat. 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

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

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

    Replace the VU 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-->#VU<!--#msgNum-->">Bookmark this post</a>

    Again, replace the VU 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-->#VU<!--#listDayMsgNum-->"><!--#listDayMsgSubject--></a>

In the Message Template

Because this is a bit of a hack, the individual messages still appear 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-->#VU<!--#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-->#VU<!--#MsgNum-->"><!--#searchResultMsgSubject--></a> By default, there is a table column with just the message number; I deleted that.

Whew! That was fun. Tips for making this simpler or more elegant more than welcome. This is a first draft of this document; if something's confusing let me know.

<Previous Next> Thread: Forward chronological view Reverse chronological view Hierarchical outline view Edit Reply
ENCLOSURES

None.
REPLIES

RE: Flat Discussion Board
10/5/2000 by Mark Morgan
My Full Thread Templates I've received at least one request to post a sample


TRACKBACKS