当前位置: 首页>>代码示例>>PHP>>正文


PHP Network::get_network_members方法代码示例

本文整理汇总了PHP中Network::get_network_members方法的典型用法代码示例。如果您正苦于以下问题:PHP Network::get_network_members方法的具体用法?PHP Network::get_network_members怎么用?PHP Network::get_network_members使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Network的用法示例。


在下文中一共展示了Network::get_network_members方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: get_links

 function get_links()
 {
     // Loading the Searching data
     if ($this->sort_by == 'alphabetic') {
         $this->sort_by = 'login_name';
         $sorting_direction = 'ASC';
     } else {
         $this->sort_by = 'created';
         $sorting_direction = 'DESC';
     }
     global $network_info;
     $users = array();
     if ($this->search_data) {
         // load users on the basis of the search parameters.
         $users_count = User::user_search($this->search_data, $this->viewer_uid, $network_info->network_id);
         $this->Paging["count"] = $users_count['total_users'];
         $users = User::user_search($this->search_data, $this->viewer_uid, $network_info->network_id, FALSE, $this->Paging["show"], $this->Paging["page"], 'U.' . $this->sort_by, $sorting_direction);
     } else {
         $this->Paging["count"] = Network::get_network_members($network_info->network_id, array('cnt' => TRUE));
         $params = array('page' => $this->Paging["page"], 'show' => $this->Paging["show"], 'sort_by' => $this->sort_by, 'direction' => $sorting_direction);
         $users = Network::get_network_members($network_info->network_id, $params);
     }
     // echo "<pre>" . print_r($users,1) . "</pre>";
     $this->users_data = $users['users_data'];
 }
开发者ID:CivicCommons,项目名称:oldBellCaPA,代码行数:25,代码来源:PeopleModule.php

示例2: array

include "includes/page.php";
require "{$current_blockmodule_path}/MembersFacewallModule/MembersFacewallModule.php";
$uid = @$_GET['uid'];
$sort_by = $selected_option = @$_GET['sort_by'];
$sorting_options[] = array('caption' => __('Last Login'), 'value' => 'last_login');
$sorting_options[] = array('caption' => __('Latest Registered'), 'value' => 'latest_registered');
if (CURRENT_NETWORK_URL_PREFIX != 'www' && CURRENT_NETWORK_URL_PREFIX != '') {
    $network = new Network();
    $where = "address = '" . CURRENT_NETWORK_URL_PREFIX . "'";
    $netinfo = $network->get(NULL, $where);
    $params = array('page' => 1, 'show' => 5);
    if ($sort_by == 'last_login') {
        $a = array('sort_by' => 'U.last_login');
        $params = array_merge($params, $a);
    }
    $users = Network::get_network_members($netinfo[0]->network_id, $params);
} else {
    if ($sort_by == 'last_login') {
        $users = User::allUsers(10, 'last_login', 5);
    } else {
        if ($sort_by == 'latest_registered') {
            $users = User::allUsers(10, 'latest', 5);
        }
    }
    for ($i = 0; $i < count($users['users_data']); $i++) {
        $count_relations = Relation::get_relations($users['users_data'][$i]['user_id']);
        $users['users_data'][$i]['no_of_relations'] = count($count_relations);
    }
}
$obj = new MembersFacewallModule();
$obj->mode = $obj->sort_by = SORT_BY;
开发者ID:CivicCommons,项目名称:oldBellCaPA,代码行数:31,代码来源:ajax_sortby.php

示例3: get_links

 function get_links()
 {
     // Loading the Searching data
     if ($this->sort_by == 'alphabetic') {
         $this->sort_by = 'login_name';
         $sorting_direction = 'ASC';
     } else {
         $this->sort_by = 'created';
         $sorting_direction = 'DESC';
     }
     $this->only_with_photo = !$this->no_photo_ok;
     $extra_condition = null;
     if ($this->only_with_photo) {
         $extra_condition = "U.picture IS NOT NULL";
     }
     $users = array();
     $this->users_data = array();
     if (empty($this->search_data)) {
         $this->search_data = @$this->search;
     }
     if ($this->search_data) {
         // load users on the basis of the search parameters.
         if ($this->only_with_photo) {
             $users_count = User::user_search($this->search_data, $this->viewer_uid, PA::$network_info->network_id, TRUE, 'ALL', 0, 'U.' . $this->sort_by, 'DESC', $extra_condition);
             $this->Paging["count"] = $users_count['total_users'];
             $users = User::user_search($this->search_data, $this->viewer_uid, PA::$network_info->network_id, FALSE, $this->Paging["show"], $this->Paging["page"], 'U.' . $this->sort_by, $sorting_direction, $extra_condition);
         } else {
             $users_count = User::user_search($this->search_data, $this->viewer_uid, PA::$network_info->network_id, FALSE);
             $this->Paging["count"] = $users_count['total_users'];
             $users = User::user_search($this->search_data, $this->viewer_uid, PA::$network_info->network_id, FALSE, $this->Paging["show"], $this->Paging["page"], 'U.' . $this->sort_by, $sorting_direction);
         }
     } else {
         if ($this->only_with_photo) {
             $this->Paging["count"] = Network::get_network_members(PA::$network_info->network_id, array('cnt' => TRUE, 'extra_condition' => $extra_condition));
             $params = array('page' => $this->Paging["page"], 'show' => $this->Paging["show"], 'sort_by' => $this->sort_by, 'direction' => $sorting_direction, 'extra_condition' => $extra_condition);
             $users = Network::get_network_members(PA::$network_info->network_id, $params);
         } else {
             $this->Paging["count"] = Network::get_network_members(PA::$network_info->network_id, array('cnt' => TRUE));
             $params = array('page' => $this->Paging["page"], 'show' => $this->Paging["show"], 'sort_by' => $this->sort_by, 'direction' => $sorting_direction);
             $users = Network::get_network_members(PA::$network_info->network_id, $params);
         }
     }
     $users_count = count(@$users['users_data']);
     if ($users_count) {
         $user_profiles = $this->get_profile_data($users['users_data']);
         for ($cnt = 0; $cnt < $users_count; $cnt++) {
             if (empty($users['users_data'][$cnt]['picture'])) {
                 $users['users_data'][$cnt]['picture'] = 'files/default.png';
                 $big_img = uihelper_resize_img($users['users_data'][$cnt]['picture'], 120, 120, NULL, "alt=\"" . $users['users_data'][$cnt]['login_name'] . "\"");
                 $users['users_data'][$cnt]['big_picture'] = $big_img['url'];
             } else {
                 $img = uihelper_resize_mk_user_img($users['users_data'][$cnt]['picture'], 80, 80, 'alt="PA"');
                 $big_img = uihelper_resize_img($users['users_data'][$cnt]['picture'], 120, 120, NULL, "alt=\"" . $users['users_data'][$cnt]['login_name'] . "\"");
                 $users['users_data'][$cnt]['big_picture'] = $big_img['url'];
                 preg_match("/src=\"([^']*?)\"/", $img, $match);
                 //preg_match to get the src of the image
                 $users['users_data'][$cnt]['picture'] = $match[1];
             }
             $users['users_data'][$cnt] = array_merge($users['users_data'][$cnt], $user_profiles[$cnt]);
         }
         $this->users_data = $users['users_data'];
     }
 }
开发者ID:Cyberspace-Networks,项目名称:PeopleAggregator,代码行数:63,代码来源:PeopleModule.php

示例4: get_links

 function get_links()
 {
     // Loading the Searching data
     if ($this->sort_by == 'alphabetic') {
         $this->sort_by = 'login_name';
         $sorting_direction = 'ASC';
     } else {
         $this->sort_by = 'display_name';
         $sorting_direction = 'ASC';
     }
     $this->only_with_photo = !$this->no_photo_ok;
     $extra_condition = null;
     if ($this->only_with_photo) {
         $extra_condition = "U.picture IS NOT NULL";
     }
     $users = array();
     $this->users_data = array();
     if (empty($this->search_data)) {
         $this->search_data = @$this->search;
     }
     if ($this->search_data) {
         // load users on the basis of the search parameters.
         if ($this->only_with_photo) {
             $users_count = User::user_search($this->search_data, $this->viewer_uid, PA::$network_info->network_id, TRUE, 'ALL', 0, 'U.' . $this->sort_by, 'DESC', $extra_condition);
             $this->Paging["count"] = $users_count['total_users'];
             $users = User::user_search($this->search_data, $this->viewer_uid, PA::$network_info->network_id, FALSE, $this->Paging["show"], $this->Paging["page"], 'U.' . $this->sort_by, $sorting_direction, $extra_condition);
         } else {
             $users_count = User::user_search($this->search_data, $this->viewer_uid, PA::$network_info->network_id, FALSE);
             $this->Paging["count"] = $users_count['total_users'];
             $users = User::user_search($this->search_data, $this->viewer_uid, PA::$network_info->network_id, FALSE, $this->Paging["show"], $this->Paging["page"], 'U.' . $this->sort_by, $sorting_direction);
         }
     } else {
         if ($this->only_with_photo) {
             $this->Paging["count"] = Network::get_network_members(PA::$network_info->network_id, array('cnt' => TRUE, 'extra_condition' => $extra_condition));
             $params = array('page' => $this->Paging["page"], 'show' => $this->Paging["show"], 'sort_by' => $this->sort_by, 'direction' => $sorting_direction, 'extra_condition' => $extra_condition);
             $users = Network::get_network_members(PA::$network_info->network_id, $params);
         } else {
             $this->Paging["count"] = Network::get_network_members(PA::$network_info->network_id, array('cnt' => TRUE));
             $params = array('page' => $this->Paging["page"], 'show' => $this->Paging["show"], 'sort_by' => $this->sort_by, 'direction' => $sorting_direction);
             $users = Network::get_network_members(PA::$network_info->network_id, $params);
         }
     }
     // Parag Jagdale - 10-17-10:	Modified to support new avatar image URL, width and height
     $users_count = count(@$users['users_data']);
     $users_to_show = array();
     if ($users_count) {
         $user_profiles = $this->get_profile_data($users['users_data']);
         for ($cnt = 0; $cnt < $users_count; $cnt++) {
             $userCreatedDate = $users['users_data'][$cnt]['created'];
             $userLoginDate = $users['users_data'][$cnt]['last_login'];
             if ($userCreatedDate != $userLoginDate) {
                 if (!isset($user_profiles[$cnt]['avatar']) || empty($user_profiles[$cnt]['avatar'])) {
                     $users['users_data'][$cnt]['avatar'] = PA::$url . '/files/default.png';
                     $big_img['url'] = PA::$url . '/files/default.png';
                     $users['users_data'][$cnt]['big_picture'] = $big_img['url'];
                 } else {
                     if (preg_match("|^http://|", $user_profiles[$cnt]['avatar'])) {
                         $users['users_data'][$cnt]['big_picture'] = $user_profiles[$cnt]['avatar'];
                         $users['users_data'][$cnt]['big_picture_width'] = $user_profiles[$cnt]['avatar_width'];
                         $users['users_data'][$cnt]['big_picture_height'] = $user_profiles[$cnt]['avatar_height'];
                     } else {
                         $amazon_full_url = get_full_amazon_s3_url($user_profiles[$cnt]['avatar']);
                         $users['users_data'][$cnt]['big_picture'] = $amazon_full_url;
                     }
                 }
                 $users_to_show['users_data'][$cnt] = array_merge($user_profiles[$cnt], $users['users_data'][$cnt]);
             }
         }
         $this->users_data = $users_to_show['users_data'];
     }
 }
开发者ID:CivicCommons,项目名称:people-aggregator,代码行数:71,代码来源:PeopleModule.php

示例5: if

 <? if(!empty($network_info->inner_logo_image)) { ?>
<div style="width:160px; height:110px; float:left;"><img src="<?=$base_url?>/files/<?=$network_info->inner_logo_image?>" width=160px; height= 100px;></div>
<? } ?>
<div id="mainnav">
    <ul>
      <li><a href="<?=$base_url;?>/homepage.php" class='static'>Home</a></li>
      <li><a href="http://broadbandmechanics.com/who.html" class='static'>About</a></li>
      <li><a href="mailto:marc@broadbandmechanics.com" class='static'>Contact</a></li>
    </ul>
 </div>
</div>
<div class="maincontent">
<div style="width:650px; float:left;">
<?php 
  $net_var = new Network;
 	$mem = $net_var->get_network_members($network_info->network_id);
  
?>
<div class="fleft width-100">
	<span class="fleft"><h1><?php echo stripslashes($network_info->name); ?></h1></span>
 <span class="fleft" style="width:450px;margin-top:23px; margin-left:10px;"><a href="http://<? echo $network_info->address .'.' . PA::$domain_suffix.BASE_URL_REL;?>/view_all_members.php">( <?php echo $mem['total_users'].' Members'; ?> )</a></span>
	</div>
<div class="fleft">
	<span class="fleft" style="width:450px; margin-left:15px;margin-top:2px;"><?php echo $network_info->description; ?></span>
</div>
</div>

<div style="width:160px; height:160px; float:left;margin-top:23px;"><img src="<?=$base_url?>/files/<?=$network_info->header_image?>" width=160px; height= 160px;></div>

</div>
<div class="static_footer fleft" style="width:100%;">
开发者ID:CivicCommons,项目名称:oldBellCaPA,代码行数:31,代码来源:about_network.php


注:本文中的Network::get_network_members方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。