Put this in your block visibility settings (admin/build/block/configure/tribune/1):

SHOW ONLY IF THE PHP CODE RETURNS TRUE.... :

<?php
if(count(tribune_get_active_users()) < 2) {
$show = false;
} else {
$show = true;
}
return $show
?>

Comments

Fidelix’s picture

This is for the block "Tribune Users", the code is a little better now, it will hide your code from all pages except yoursite.com/chat or yoursite.com/tribune, IF there is 2 or less users chatting.

<?php
if(count(tribune_get_active_users()) <= 2) {
$showw = false;
} else {
$showw = true;
}
if(arg(0) == 'chat' || arg(0) == 'tribune'){
$showw = true;
};
return $showw;
?>

This is for the actual tribune chat block, it will hide the block if your actual page is yoursite.com/chat or yoursite.com/tribune>

<?php
if(arg(0) == 'chat' || arg(0) == 'tribune') {
$show = false;
} else {
$show = true;
}
return $show;
?>
SeeSchloss’s picture

Status: Needs review » Closed (won't fix)

I think this shouldn't be done by the module itself but by the site admin.