コード例 #1
0
ファイル: start.php プロジェクト: remy40/gvrs
function gvtheme_init()
{
    // custom topbar
    elgg_unregister_menu_item('topbar', 'elgg_logo');
    elgg_register_plugin_hook_handler('register', 'menu:topbar', 'gvtheme_custom_topbarmenu_setup');
    elgg_register_plugin_hook_handler('register', 'menu:entity', 'gvtheme_custom_entitymenu_setup');
    elgg_register_plugin_hook_handler('register', 'menu:river', 'gvtheme_custom_rivermenu_setup');
    elgg_register_event_handler('pagesetup', 'system', 'gvtheme_custom_usersettings_pagesetup');
    elgg_extend_view('css/elgg', 'gvtheme/css');
    elgg_extend_view('page/elements/head', 'gvtheme/head');
    // remove entities statistics views from user account
    elgg_unextend_view('core/settings/statistics', 'core/settings/statistics/numentities');
    // override some actions
    $action_base = elgg_get_plugins_path() . 'gvtheme/actions';
    elgg_register_action("avatar/upload", "{$action_base}/avatar/upload.php");
    elgg_register_action("avatar/crop", "{$action_base}/avatar/crop.php");
    elgg_register_action("friends/add", "{$action_base}/friends/add.php");
    // get number of users
    $num_members = get_number_users();
    elgg_register_menu_item('topbar', array('name' => 'member_number', 'href' => "members/newest", 'text' => elgg_echo("gvtheme:num_members", array($num_members)), 'priority' => 1000, 'section' => 'alt'));
    $initiatives_item = new ElggMenuItem('initiatives', elgg_echo('gvtheme:initiatives'));
    $cnc_item = new ElggMenuItem('cnc', elgg_echo('gvtheme:cnc'), 'file/group/9545/all');
    $cnc_item->setItemClass('gvgroup-child-menu');
    $initiatives_item->addChild($cnc_item);
    elgg_register_menu_item('site', $initiatives_item);
}
コード例 #2
0
ファイル: basic.php プロジェクト: pleio/subsite_manager
<?php

// Work out number of users
if (!subsite_manager_on_subsite()) {
    $users_stats = get_number_users();
    $total_users = get_number_users(true);
    $users = $users_stats . " " . elgg_echo('active') . " / " . $total_users . " " . elgg_echo('total');
} else {
    $site = elgg_get_site_entity();
    $options = array("type" => "user", "site_guids" => false, "count" => true);
    $users_stats = $site->getMembers($options);
    $users_pending = (int) $site->countMembershipRequests();
    $users = $users_stats . " " . elgg_echo("active") . " / " . $users_pending . " " . elgg_echo('admin:users:membership');
}
// Get version information
$version = get_version();
$release = get_version(true);
?>
<table class="elgg-table-alt">
	<tr class="odd">
		<td><b><?php 
echo elgg_echo('admin:statistics:label:version');
?>
 :</b></td>
		<td><?php 
echo elgg_echo('admin:statistics:label:version:release');
?>
 - <?php 
echo $release;
?>
, <?php 
        $filter_content = list_entities_by_relationship_count('friend', true, '', '', 0, 10, false);
        break;
    case "active":
        $filter_content = elgg_view("members/online");
        break;
        // search based on name
    // search based on name
    case "search":
        set_context('search');
        $filter_content = list_user_search($tag);
        break;
        // search based on tags
    // search based on tags
    case "search_tags":
        $filter_content = trigger_plugin_hook('search', '', $tag, "");
        $filter_content .= list_entities_from_metadata("", $tag, "user", "", "", 10, false, false);
        break;
    case "newest":
    case 'default':
        $filter_content = elgg_list_entities(array('type' => 'user', 'offset' => $offset, 'full_view' => FALSE));
        break;
}
// create the members navigation/filtering
$members = get_number_users();
$members_nav = elgg_view("members/members_sort_menu", array("count" => $members, "filter" => $filter));
$content = $members_nav . $filter_content;
// title
$main_content = elgg_view_title(elgg_echo("members:members"));
$main_content .= elgg_view('page_elements/contentwrapper', array('body' => $content, 'subclass' => 'members'));
$body = elgg_view_layout("sidebar_boxes", $sidebar, $main_content);
page_draw(elgg_echo('members:members'), $body);
コード例 #4
0
ファイル: search.php プロジェクト: ibou77/elgg
<?php

$params = array('name' => 'member_query', 'class' => 'mbm', 'required' => true);
echo elgg_view('input/text', $params);
echo elgg_view('input/submit', array('value' => elgg_echo('search')));
echo "<p class='mtl elgg-text-help'>" . elgg_echo('members:total', array(get_number_users())) . "</p>";
コード例 #5
0
ファイル: elgg.class.php プロジェクト: lorea/Hydra-dev
 /**
  * Return a count of the number of user which meet $filter criteria
  *
  * @author  Chris Smith <*****@*****.**>
  */
 function getUserCount($filter = array())
 {
     return get_number_users(true);
 }