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


PHP Network::get_largest_networks方法代码示例

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


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

示例1: get_links

 /**
   Get all the links of different network of given search String 
   **/
 private function get_links()
 {
     $network = new Network();
     if (!empty($this->name_string)) {
         $condition = array('name_string' => $this->name_string, 'keyword' => $this->keyword);
         $this->Paging["count"] = $network->get_networks_info_by_search($condition, TRUE);
         if (empty($this->sort_by) || $this->sort_by == 'alphabetic') {
             $links = $network->get_networks_info_by_search($condition, FALSE, $this->Paging["show"], $this->Paging["page"], 'name', 'ASC');
         }
         if (!empty($this->sort_by) && $this->sort_by == 'members') {
             $links = $network->get_networks_info_by_search($condition, FALSE, $this->Paging["show"], $this->Paging["page"], 'members');
         }
         if (!empty($this->sort_by) && $this->sort_by == 'created') {
             $links = $network->get_networks_info_by_search($condition, FALSE, $this->Paging["show"], $this->Paging["page"]);
         }
     } else {
         $this->Paging["count"] = $network->get_largest_networks(TRUE);
         if (!empty($this->sort_by) && $this->sort_by == 'alphabetic' || !$this->sort_by) {
             $links = $network->get_largest_networks(FALSE, $this->Paging["show"], $this->Paging["page"], 'name', 'ASC');
         }
         if (!empty($this->sort_by) && $this->sort_by == 'members') {
             $links = $network->get_largest_networks(FALSE, $this->Paging["show"], $this->Paging["page"], 'members');
         }
         if (!empty($this->sort_by) && $this->sort_by == 'created') {
             $links = $network->get_largest_networks(FALSE, $this->Paging["show"], $this->Paging["page"]);
         }
     }
     return $links;
 }
开发者ID:Cyberspace-Networks,项目名称:PeopleAggregator,代码行数:32,代码来源:NetworksDirectoryModule.php

示例2: render

 public function render()
 {
     if (empty($this->links)) {
         $this->links = Network::get_largest_networks(false, 5, 1);
     }
     $this->inner_HTML = $this->generate_inner_html($this->links);
     if ($this->mode == SORT_BY) {
         $content = $this->inner_HTML;
     } else {
         $content = parent::render();
     }
     return $content;
 }
开发者ID:Cyberspace-Networks,项目名称:PeopleAggregator,代码行数:13,代码来源:NewestNetworkModule.php

示例3: array

 * http://wiki.peopleaggregator.org/index.php
 * 
 */
$login_required = FALSE;
$use_theme = 'Beta';
//TODO : Remove this when new UI is completely implemented.
include "includes/page.php";
require "{$current_blockmodule_path}/NewestNetworkModule/NewestNetworkModule.php";
$uid = @$_GET['uid'];
$selected_option = @$_GET['sort_by'];
$sorting_options[] = array('caption' => __('Recently Created'), 'value' => 'created');
$sorting_options[] = array('caption' => __('Recently Modified'), 'value' => 'changed');
$sorting_options[] = array('caption' => __('Largest Group'), 'value' => 'members');
$links = '';
if ($selected_option == 'members') {
    $links = Network::get_largest_networks(false, 5, 1, 'member_count');
} else {
    if ($selected_option == 'created') {
        $links = Network::get_largest_networks(false, 5, 1, 'created');
    } else {
        if ($selected_option == 'changed') {
            $links = Network::get_largest_networks(false, 5, 1, 'changed');
        }
    }
}
$obj = new NewestNetworkModule();
$obj->mode = $obj->sort_by = SORT_BY;
$obj->links = $links;
$obj->sorting_options = $sorting_options;
$obj->selected_option = $selected_option;
echo $obj->render();
开发者ID:CivicCommons,项目名称:oldBellCaPA,代码行数:31,代码来源:ajax_sortnetworks.php


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