إنضمامك إلي منتديات استراحات زايد يحقق لك معرفة كل ماهو جديد في عالم الانترنت ...

انضم الينا
استراحات زايد الصفحة الرئيسية

  #1  
قديم 12-31-2009, 07:13 AM
عضو ماسي
بيانات محروم.كوم
 رقم العضوية : 503
 تاريخ التسجيل : Dec 2007
الجنس : female
علم الدوله :
 المشاركات : 2,100,669
عدد الـنقاط :3341
 تقييم المستوى : 2141

Hello. I use Blueimp's AJAX Chat and a modified navbar to display the number of people in the chatroom. As you can see, the count displays fine when I am in Forums or Blogs, but when I am in the CMS it doesn't display (showing just "Chat []" instead of "Chat [1]"). Can anyone help me figure out why?

Attachment 40982Attachment 40981

Here's how I have it set up:

includes/functions.php
Code:
function render_navbar_template($navbits)
{
global $vbulletin, $vbphrase;
$vbphrase['chatcount'] = count(getChatOnlineUserIDs());
[...]
Then in my style template for 'navbar':
Code:
Chat [{vb:rawphrase chatcount}]
[...]
And I don't think it matters, but here are the chat functions I define in functions.php immediately preceding the render_navbar_template function above:
Code:
function getChatInterface() {
static $ajaxChat;
// Path to the chat directory:
if (!defined('AJAX_CHAT_PATH')) {
if (empty($_SERVER['SCRIPT_FILENAME'])) {
$_SERVER['SCRIPT_FILENAME'] = $_SERVER['DOCUMENT_ROOT'].$_SERVER['SCRIPT_URL'];
}
define('AJAX_CHAT_PATH', realpath(dirname($_SERVER['SCRIPT_FILENAME']).'/chat').'/');
}


// Include Class libraries:
require_once(AJAX_CHAT_PATH.'lib/classes.php');

// Initialize the chat interface:
$ajaxChat = new CustomAJAXChatInterface();


return $ajaxChat;
}

function getChatOnlineUsers() {
$chatInterface = getChatInterface();

if($chatInterface) {
// Clean out any users who didn't log out properly by calling removeInactive()
// Not necessary but a good idea. You can take out this line if you want.
$chatInterface->removeInactive();
// Now get the online users:

return $chatInterface->getOnlineUsers();
}
else {
return array();
}
}

function getChatOnlineUserIDs() {
return ($chatInterface = getChatInterface()) ? $chatInterface->getOnlineUserIDs() : array();
}
So I'm stumped on how to get this to display properly in the CMS navbar. Any help would be much appreciated!
Attached Images
__DEFINE_LIKE_SHARE__
رد مع اقتباس
إضافة رد

مواقع النشر (المفضلة)


تعليمات المشاركة
لا تستطيع إضافة مواضيع جديدة
لا تستطيع الرد على المواضيع
لا تستطيع إرفاق ملفات
لا تستطيع تعديل مشاركاتك

BB code is متاحة
كود [IMG] متاحة
كود HTML معطلة
Trackbacks are متاحة
Pingbacks are متاحة
Refbacks are متاحة


المواضيع المتشابهه
الموضوع كاتب الموضوع المنتدى مشاركات آخر مشاركة
CMS CMS & Blog Navbar links (2nd row) - where are they generated? محروم.كوم منتدى أخبار المواقع والمنتديات العربية والأجنبية 0 06-27-2010 11:20 AM
Navbar Notifications Notification of new blog comment محروم.كوم منتدى أخبار المواقع والمنتديات العربية والأجنبية 0 04-09-2010 09:40 PM
Blog navbar links should contain bburl محروم.كوم منتدى أخبار المواقع والمنتديات العربية والأجنبية 0 05-11-2009 01:30 PM
Blog menu on navbar محروم.كوم منتدى أخبار المواقع والمنتديات العربية والأجنبية 0 04-28-2009 07:10 PM
Blog menu on navbar محروم.كوم منتدى أخبار المواقع والمنتديات العربية والأجنبية 0 04-28-2009 05:20 PM


الساعة الآن 05:45 AM


Powered by vBulletin® Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.5.2 TranZ By Almuhajir

RSS RSS 2.0 XML MAP HTML