[wp-forums] resolved threads & closing

Rich Pedley elfin at elfden.co.uk
Tue Nov 23 11:18:27 UTC 2010


On 23/11/2010 08:54, Mr mist wrote:
> In message<4CEB7ABF.6090004 at elfden.co.uk>, Rich Pedley
> <elfin at elfden.co.uk>  writes
>> Would it be better to just stop people from replying that are not
>> Moderators, or the original poster, once a topic is marked as resolved?
>>
>
>
> Quite possibly.  The use-case trying to be prevented is where a resolved
> thread is hijacked by another (probably similar but often unreleated)
> question, so I guess either works.

Easier to just close after looking at the code.

Suggested change to the support forums plugin.

Amend the function setTopicStatus
(I tried to use the filter: topic_resolution, but for some reason was 
unable to.)

So I added this line:

if ( bb_current_user_can( 'close_topic', $topic_id ) && 'yes' == 
$resolution) {
	bb_close_topic( $topic_id );
}

just before:
$bb_cache->flush_one('topic', $topic_id);

which seems to work.

Rich


More information about the wp-forums mailing list