Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Looking for the right hook


davidbessler
Member

@davidbessler

OK look at this:

$forum_restrict_keys = array(

"1" => "davidbessler,testman",

"3" => "davidbessler,",

);

function forum_restrict_check_name() {

global $bb_current_user,$forum_restrict_keys;

if ($bb_current_user){

$allowed = strpos($forum_restrict_keys[get_forum_id()], get_user_name( $bb_current_user->ID ));

if ($allowed == "") {

echo "[blocked]";

add_filter( 'get_forum_name', 'forum_restrict_blank_name');

} else {

echo "[Not blocked]";

}

}

}

function forum_restrict_blank_name (){

echo "";

}

add_action( 'get_forum_name', 'forum_restrict_check_name');

?>

That puts [blocked] instead of the forum name in a forum that user is not allowed to see, and [not blocked] on a forum he is allowed to see. How do I get the forum name back in there instead of [not blocked]?

Skip to toolbar