Forum OpenACS Q&A: Moderation in Bboard

Collapse
Posted by amit singh on
Can someone help on the moderated bboard forums. As of now in openacs
3.2.5 the moderation feature is not active.
Collapse
Posted by Jonathan Ellis on
I'm not sure what you mean.  It looks active to me.  By default q-and-a.tcl has an "Adminster" link to /bboard/admin-home.tcl, which links to /bboard/admin-delete-and-view-threads.tcl, /bboard/admin-q-and-a.tcl, etc.

If you are asking how to make it so bboard won't display posts until they are "approved" by a moderator, I don't think there is a way to do this out of the box.  You could probably hack something pretty quickly with the "interest level" system, though.

Collapse
Posted by amit singh on
I am talking about this code

set moderation_policy_sort_key 1
foreach moderation_policy [bboard_moderation_policy_order] {
    append decode_internals "'[DoubleApos $moderation_policy]',$moderation_policy_sort_key,"
    incr moderation_policy_sort_key
}

#DRB: decode_internals case needs POSTGRES porting, still.
if ![info exists decode_internals] {
    set order_by "upper(topic)"
} else {
    # add one last integer at the end
    # POSTGRES
    # set order_by "decode(moderation_policy,null,0,$decode_internals$moderation_policy_sort_key) asc, upper(topic)"
    set order_by "bboard_mod_pol_number(moderation_policy), upper(topic)"
}

set selection [ns_db select $db "select moderation_policy, topic, topic_id, presentation_type
from bboard_topics
where (active_p = 't' or active_p is null)
and (bboard_topics.group_id is null
     or ad_group_member_p ( $user_id, bboard_topics.group_id ) = 't' )
order by $order_by"]

set last_moderation_policy ""
set first_iteration_p 1
while { [ns_db getrow $db $selection] } {
    set_variables_after_query
    if { $last_moderation_policy != $moderation_policy } {
	if !$first_iteration_p {
	    append whole_page "



"
	}
	append whole_page "

[bboard_moderation_title $moderation_policy]

    " set last_moderation_policy $moderation_policy } set first_iteration_p 0 append whole_page "
  • [bboard_complete_backlink $topic_id $topic $presentation_type] " }
My understanding of moderated BBOARDS is that a users posting is approved by the board administrator before going live.
Collapse
Posted by Jonathan Ellis on
You're right.  But the only place to set moderation_policy is in add-new-topic.tcl.  What happens when you set it to "moderated" there?