Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
If you want to show a block only on pages that belong to any organic group then use the follwing snippet.
<?php
$group_node = og_set_group_context();
return $group_node->nid;
?>
you can customize this further by something like to show only on a certain groups page.
return $group_node->nid==5;
see here
http://drupal.org/node/175505
Comments
Great instructions on creating block with links to group content
http://drupal.org/node/174563