1
我在块可见性设置中使用下面的代码,只显示块,如果用户是成员,而不是管理员。Drupal - 块可见性
我可以添加什么来进一步将其过滤为有机组节点的类型。
i.o.w只有正在查看的currnt组=有机基团节点X型
<?php
$in_og = FALSE;
if (module_exists('og')){
$in_og = FALSE;
$group_node = og_get_group_context();
$gid02 = $group_node->nid;
$gid = (int)$gid02;
if ($gid02 == null) $gid = 0;
if (og_is_group_member($group_node)) $in_og = TRUE;
if (og_is_group_admin($group_node)) $in_og = FALSE;
if ($gid == 0) $in_og = FALSE;
}
return $in_og;
感谢
感谢这么MUHC,完美的工作。 – Ankh2054 2010-11-10 17:27:30