function get_users_online()
{
    $template = UserOnline_Core::$options->templates['useronline'];
    $template = str_ireplace('%PAGE_URL%', UserOnline_Core::$options->url, $template);
    $template = str_ireplace('%MOSTONLINE_COUNT%', get_most_users_online(), $template);
    $template = str_ireplace('%MOSTONLINE_DATE%', get_most_users_online_date(), $template);
    return UserOnline_Template::format_count(get_users_online_count(), 'user', $template);
}
Beispiel #2
0
function get_useronline_count($display = false)
{
    _deprecated_function(__FUNCTION__, '2.70', 'users_online_count()');
    if (!$display) {
        return get_users_online_count();
    }
    users_online_count();
}
Beispiel #3
0
 function page_general_stats($content)
 {
     $stats_display = get_option('stats_display');
     $str = _n('<strong>%s</strong> user online now.', '<strong>%s</strong> users online now.', get_users_online_count(), 'wp-useronline');
     if ($stats_display['useronline'] == 1) {
         $content .= html('p', html('strong', __('WP-UserOnline', 'wp-useronline'))) . html('ul', html('li', sprintf($str, number_format_i18n(get_users_online_count()))) . html('li', UserOnline_Template::format_most_users()));
     }
     return $content;
 }
Beispiel #4
0
 function rightnow()
 {
     if (!current_user_can('manage_options')) {
         return;
     }
     $total_users = get_users_online_count();
     $str = _n("There is <strong><a href='%s'>%s user</a></strong> online now.", "There are a total of <strong><a href='%s'>%s users</a></strong> online now.", $total_users, 'wp-useronline');
     $out = sprintf($str, add_query_arg('page', $this->args['page_slug'], admin_url('index.php')), number_format_i18n($total_users));
     $out .= '<br>';
     if ($tmp = get_users_browsing_site()) {
         $out .= $tmp . '<br>';
     }
     $out .= UserOnline_Template::format_most_users();
     echo html('p', $out);
 }
Beispiel #5
0
 public function initItem()
 {
     parent::initItem();
     $onlinetip = _('Nur Sie sind online');
     $user_count = get_users_online_count(10);
     // Should be the same value as in public/index.php
     if ($user_count) {
         if ($user_count == 1) {
             $onlinetip = _('Außer Ihnen ist eine Person online');
         } else {
             $onlinetip = sprintf(_('Es sind außer Ihnen %d Personen online'), $user_count);
         }
     }
     $this->setImage(Icon::create('community', 'navigation', ["title" => $onlinetip]));
 }
Beispiel #6
0
}
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * *   L O G I N - P A G E   ( N O B O D Y - U S E R )   * *
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
PageLayout::setHelpKeyword("Basis.Startseite");
// set keyword for new help
PageLayout::setTitle(_("Startseite"));
Navigation::activateItem('/start');
PageLayout::setTabNavigation(NULL);
// disable display of tabs
// Start of Output
include 'lib/include/html_head.inc.php';
// Output of html head
include 'lib/include/header.php';
$index_nobody_template = $GLOBALS['template_factory']->open('index_nobody');
$index_nobody_template->set_attributes(array('num_active_courses' => count_table_rows('seminare'), 'num_registered_users' => count_table_rows('auth_user_md5'), 'num_online_users' => get_users_online_count(10)));
if (Request::get('logout')) {
    $index_nobody_template->set_attribute('logout', true);
}
echo '<div><div class="index_container">';
echo $index_nobody_template->render();
$layout = $GLOBALS['template_factory']->open('shared/index_box');
// Prüfen, ob PortalPlugins vorhanden sind.
$portalplugins = PluginEngine::getPlugins('PortalPlugin');
foreach ($portalplugins as $portalplugin) {
    $template = $portalplugin->getPortalTemplate();
    if ($template) {
        echo $template->render(NULL, $layout);
        $layout->clear_attributes();
    }
}