コード例 #1
0
ファイル: start.php プロジェクト: socialweb/PiGo
function live_notifications_notifier()
{
    global $CONFIG;
    if (elgg_is_logged_in()) {
        $user_guid = elgg_get_logged_in_user_guid();
        $tooltip = elgg_echo("live_notifications");
        //get unread messages
        $num_notifications = count_unread_notifications(25);
        $text = elgg_view('live_notifications/topbar_icon', array('num_notifications' => $num_notifications));
        elgg_register_menu_item('topbar', array('name' => 'notification', 'href' => '#live_notifications', 'rel' => 'popup', 'text' => $text, 'priority' => 600, 'title' => $tooltip, 'id' => 'live_notifications_link'));
    }
}
コード例 #2
0
ファイル: refresh_count.php プロジェクト: socialweb/PiGo
<?php

gatekeeper();
echo count_unread_notifications(25);