Categories > TinyButStrong general >

threaded discussion question

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: joe
Date: 2006-07-09
Time: 03:24

threaded discussion question

I'm trying to do something like this:

If there's a thread with no replies just that thread subject will show.

If there's a reply to that thread the reply subject will be shown.

I was trying to use sub blocks, but can't get it to work.

Any suggestions scrol ?

I'm basically creating a forum.

By: Joe
Date: 2006-07-09
Time: 03:39

Re: threaded discussion question

I'm trying this but no luck

[main;block=begin]
<img src="folder.gif" />&nbsp;<a href="right.php?id=[main.id]" target="mainFrame">[main.subject]</a>&nbsp;&nbsp;<span class="style1">[main.username] ([main.date])</span><br />
[sub;block=begin]
<img src="document.gif" />[sub.subject]
[sub;block=end]
[main;block=end]<br />



$RecCnt = $TBS->MergeBlock('main',$cnx_id,"SELECT DISTINCT * FROM threads WHERE thread='0' ORDER BY id DESC",$PageSize,$PageNum,$RecCnt) ;

$RecCnt = $TBS->MergeBlock('sub',$cnx_id,"SELECT DISTINCT * FROM threads WHERE id=thread ORDER BY id DESC",$PageSize,$PageNum,$RecCnt) ;

Any ideas or help?
By: Skrol29
Date: 2006-07-10
Time: 00:25

Re: threaded discussion question

Hello Joe,

To have sub-blocks working, you have to use parameter "p1" in the sub-block, and keyword "%p1%" in its corresponding query.

Take a look at the online examples, it will help you a lot I think.