Index: openacs-4/packages/bboard-portlet/tcl/bboard-portlet-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bboard-portlet/tcl/bboard-portlet-procs.tcl,v diff -u -r1.32 -r1.33 --- openacs-4/packages/bboard-portlet/tcl/bboard-portlet-procs.tcl 10 Jan 2002 18:20:24 -0000 1.32 +++ openacs-4/packages/bboard-portlet/tcl/bboard-portlet-procs.tcl 10 Jan 2002 20:04:46 -0000 1.33 @@ -77,7 +77,7 @@ array set config $cf set query " - select message_id, + select message_id, forum_id, title, num_replies, @@ -97,7 +97,12 @@ from bboard_forums where bboard_id = :instance_id" - set whole_data "" + # + # YES, I will clean this up! - aks + # + + + set whole_data "" # Should be a list already! (ben) set list_of_instance_ids $config(instance_id) @@ -114,45 +119,54 @@ from apm_packages where package_id= :comm_object_id "] - append whole_data "$name (more)
" + append whole_data "" set data "" set rowcount 0 + +# removed individual msg stuff +# +# if { $config(shaded_p) == "f" } { +# +# db_foreach select_messages $query { +# append data "
  • $title, by $full_name\n" +# incr rowcount +# } +# +# set template "" +# +# if {!$rowcount} { +# set template "No messages" +# } +# +# append template "

    " +# +# } else { +# # shaded +# + + set data "" + db_foreach select_shaded $shaded_query { + if { $config(shaded_p) == "f" } { + append data "

  • " + } + incr rowcount + } + + set template "$data" + + if {!$rowcount} { + set template "" + } +# } - if { $config(shaded_p) == "f" } { - - db_foreach select_messages $query { - append data "
  • $title, by $full_name\n" - incr rowcount - } - - set template "" - - if {!$rowcount} { - set template "No messages" - } - - append template "

    " - - } else { - # shaded - set data "Forums: " - - db_foreach select_shaded $shaded_query { - append data "$short_name" - incr rowcount - } - - set template "$data" - - if {!$rowcount} { - set template "No forums" - } - } +append whole_data $template - append whole_data $template - } +} + +append whole_data "

  • $name forums
      $short_name
    No discussion forums
    " + set code [template::adp_compile -string $whole_data] set output [template::adp_eval code]