query("SELECT * FROM $bbdb->posts WHERE poster_id = $id AND post_status = 0"); } /* End bb-post-count code. Thank you Joshua! */ $path_to_subdirectory= bb_get_option('uri') . "my-plugins/ranks/"; $get_config = $path_to_subdirectory . "gdr_config.php"; include($get_config); function get_special_rank () { global $special_rank, $use_special_rank; if ($use_special_rank==1) {$title_for_rank=get_user_type( get_post_author_id() ); switch ($title_for_rank) { case "Key Master" : $special_rank=1; break; case "Moderator" : $special_rank=2; break; default : $special_rank=0; } } else { $special_rank = 0; } return $special_rank; } function user_rank() { global $num_ranks, $path_to_subdirectory, $rank_max, $rank_img, $special_rank, $image_for_special_rank_1, $image_for_special_rank_2; $id=get_post_author_id(); $special_rank_val = get_special_rank (); $rank_count=get_post_count(get_post_author_id()); if ($special_rank_val>0) { switch ($special_rank_val) { case 1 : $display_text = $path_to_subdirectory . $image_for_special_rank_1 . "' alt='#Posts:" . $rank_count . "' title='#Posts: " . $rank_count . "'"; break; case 2 : $display_text = $path_to_subdirectory . $image_for_special_rank_2 . "' alt='#Posts: " . $rank_count . "' title='#Posts: " . $rank_count . "'"; break; default : $display_text = $path_to_subdirectory . $image_for_special_rank_1 . "' alt='#Posts: " . $rank_count . "' title='#Posts: " . $rank_count . "'"; } } else { for ($i=1;$i<$num_ranks;$i++) { if ($rank_count<$rank_max[$i]) {$display_text = $path_to_subdirectory . $rank_img[$i] . "' alt='#Posts: " . $rank_count . "' title='#Posts: " . $rank_count . "'"; break; } else {$display_text = $path_to_subdirectory . $rank_img[$num_ranks]; } } } $display_rank = "'; $get_image=user_rank(); $r .= $get_image; return $r; } add_filter('post_author_title', 'apply_author_title_image'); ?>