本文整理汇总了PHP中lms_steam::user_get_groups方法的典型用法代码示例。如果您正苦于以下问题:PHP lms_steam::user_get_groups方法的具体用法?PHP lms_steam::user_get_groups怎么用?PHP lms_steam::user_get_groups使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类lms_steam
的用法示例。
在下文中一共展示了lms_steam::user_get_groups方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: usort
$buddies = $cache->call("lms_steam::user_get_buddies", $user->get_name());
usort($buddies, "sort_buddies");
$content->setVariable("LABEL_BUDDIES", gettext("your contacts"));
foreach ($buddies as $buddy) {
$content->setCurrentBlock("BLOCK_BUDDY");
$content->setVariable("USER_ID", $buddy["OBJ_ID"]);
if ($receiver instanceof steam_user && $receiver->get_id() == $buddy["OBJ_ID"]) {
$content->setVariable("USER_SELECTED", "selected=\"selected\"");
}
$content->setVariable("USER_FULLNAME", $buddy["USER_FULLNAME"]);
$content->setVariable("USER_FIRSTNAME", $buddy["USER_FIRSTNAME"]);
$content->parse("BLOCK_BUDDY");
}
$content->setVariable("LABEL_GROUPS", gettext("your groups"));
$content->setVariable("LABEL_ADD_RECIEVER", gettext("Add another reciever"));
$groups = lms_steam::user_get_groups($user->get_name(), FALSE);
usort($groups, "sort_objects");
foreach ($groups as $group) {
$content->setCurrentBlock("BLOCK_GROUP");
$content->setVariable("GROUP_ID", $group["OBJ_ID"]);
if ($receiver instanceof steam_group && $receiver->get_id() == $group["OBJ_ID"]) {
$content->setVariable("GROUP_SELECTED", "selected=\"selected\"");
}
$content->setVariable("GROUP_NAME", $group["OBJ_NAME"]);
$content->parse("BLOCK_GROUP");
}
if ($receiverID != $receivers[sizeof($receivers) - 1]) {
$content->setVariable("DISPLAY", "style=\"display:none\"");
} else {
$content->setVariable("DISPLAY", "style=\"display:inline\"");
}