[wp-forums] resolved threads & closing

Rich Pedley elfin at elfden.co.uk
Wed Nov 24 11:13:47 UTC 2010


On 23/11/2010 16:38, Rich Pedley wrote:
> On 23/11/2010 16:20, Michael B wrote:
>> I'm not sure of the current policy, but at one time it was decided
>> only the original poster should mark a ticket as resolved, as all
>> too often, what may originally appear to solve the issue turns out
>> to not fully fix it or another related issue springs from it.  If a
>> mod marks the thread as resolved and it then gets closed, what
>> happens if the OP comes back in a couple of days once they realize
>> the issue wasn't actually fixed?  They need to start a new thread
>> and try to link to the previous discussion?

> That sounds more like my other suggestion - once a thread gets marked
> as resolved only mods/Original poster can post.
>
> That will take a bit more time to figure out...

In the template, probably in topic.php there will be a line like this:

<?php if ( topic_is_open( $bb_post->topic_id ) ) : ?>

changing that, and inserting some new code (sorry it's bit ugly):

<?php
$resolution=false;
$closed=false;
// support forum link
if(bb_get_topicmeta($bb_post->topic_id, 'topic_resolved')=='yes')
	$resolution=true;
// only if topic is resolved
if($resolution){
	$topic = get_topic( get_topic_id( $id ) );
	// $topic->topic_poster = original poster id
	if( bb_get_current_user_info( 'ID' ) == $topic->topic_poster || 
bb_current_user_can( 'close_topic', get_topic_id() ) )
		$closed=true;
}
?>
<?php if ( ( topic_is_open( $bb_post->topic_id ) && !$resolution ) || 
$closed ) : ?>


Should do what is required, but I would appreciate someone else 
testing, confirming (and tidying up my messy code...) that it works etc.


It should 'close' topics that are marked as resolved, but allow the 
original poster and those with the ability to close topics the chance 
to post. Ideally something should be printed to the page to point that 
out, or people may be wondering why they don't get any more replies...

Rich




More information about the wp-forums mailing list