query("UPDATE $bbdb->posts SET topic_id = '$toid' WHERE post_id = '$pid'"); $t = $bbdb->get_var("SELECT topic_posts FROM $bbdb->topics WHERE topic_id = '$fid'"); $t--; $bbdb->query("UPDATE $bbdb->topics SET topic_posts = '$t' WHERE topic_id = '$fid'"); $t = $bbdb->get_var("SELECT topic_posts FROM $bbdb->topics WHERE topic_id = '$toid'"); $t++; $bbdb->query("UPDATE $bbdb->topics SET topic_posts = '$t' WHERE topic_id = '$toid'"); } } add_filter('bb_head', 'move'); function moveIt($pid,$fid) { if(is_topic()): echo "
move to tid:
"; endif; } ?>