本文整理汇总了PHP中UserGroup::get_all_group_tags方法的典型用法代码示例。如果您正苦于以下问题:PHP UserGroup::get_all_group_tags方法的具体用法?PHP UserGroup::get_all_group_tags怎么用?PHP UserGroup::get_all_group_tags使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UserGroup
的用法示例。
在下文中一共展示了UserGroup::get_all_group_tags方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
if (api_get_setting('allow_social_tool') != 'true') {
api_not_allowed();
}
$this_section = SECTION_SOCIAL;
$tool_name = get_lang('Search');
$interbreadcrumb[] = array('url' => 'profile.php', 'name' => get_lang('SocialNetwork'));
$query_vars = array();
$query = isset($_GET['q']) ? $_GET['q'] : null;
$social_left_content = SocialManager::show_social_menu('search');
$social_right_content = '<div class="span9">' . UserManager::get_search_form($query) . '</div>';
$usergroup = new UserGroup();
//I'm searching something
if ($query != '') {
//get users from tags
$users = UserManager::get_all_user_tags($_GET['q'], 0, 0, 5);
$groups = $usergroup->get_all_group_tags($_GET['q']);
if (empty($users) && empty($groups)) {
$social_right_content .= get_lang('SorryNoResults');
}
$results = '<div id="online_grid_container"><div class="col-md-12">';
if (is_array($users) && count($users) > 0) {
$results .= Display::page_subheader(get_lang('Users'));
$results .= '<ul class="thumbnails">';
foreach ($users as $user) {
$user_info = api_get_user_info($user['user_id'], true);
$url = $user_info['profile_url'];
if (empty($user['picture_uri'])) {
$picture['file'] = api_get_path(WEB_IMG_PATH) . 'unknown_180_100.jpg';
$img = '<img src="' . $picture['file'] . '">';
} else {
$picture = UserManager::get_picture_user($user['user_id'], $user['picture_uri'], 80, USER_IMAGE_SIZE_ORIGINAL);
示例2: UserGroup
$usergroup = new UserGroup();
// I'm searching something
if ($query != '' || $query_vars['search_type'] == '1' && count($query_vars) > 2) {
$itemPerPage = 9;
if ($_GET['search_type'] == '0' || $_GET['search_type'] == '1') {
$page = isset($_GET['users_page_nr']) ? intval($_GET['users_page_nr']) : 1;
$totalUsers = UserManager::get_all_user_tags($_GET['q'], 0, 0, $itemPerPage, true);
$from = intval(($page - 1) * $itemPerPage);
// Get users from tags
$users = UserManager::get_all_user_tags($_GET['q'], 0, $from, $itemPerPage);
}
if ($_GET['search_type'] == '0' || $_GET['search_type'] == '2') {
$pageGroup = isset($_GET['groups_page_nr']) ? intval($_GET['groups_page_nr']) : 1;
// Groups
$fromGroups = intval(($pageGroup - 1) * $itemPerPage);
$totalGroups = count($usergroup->get_all_group_tags($_GET['q'], 0, $itemPerPage, true));
$groups = $usergroup->get_all_group_tags($_GET['q'], $fromGroups);
}
if (empty($users) && empty($groups)) {
$social_right_content .= get_lang('SorryNoResults');
}
$results = '<div id="online_grid_container">';
if (is_array($users) && count($users) > 0) {
$results .= Display::page_subheader(get_lang('Users'));
$results .= '<div class="row">';
$buttonClass = 'btn btn-default btn-sm';
foreach ($users as $user) {
$send_inv = '<button class="' . $buttonClass . ' disabled "><i class="fa fa-user"></i> ' . get_lang('SendInvitation') . '</button>';
$relation_type = intval(SocialManager::get_relation_between_contacts(api_get_user_id(), $user['user_id']));
$user_info = api_get_user_info($user['user_id'], true);
$url = api_get_path(WEB_PATH) . 'main/social/profile.php?u=' . $user['user_id'];