|
إنضمامك إلي منتديات استراحات زايد يحقق لك معرفة كل ماهو جديد في عالم الانترنت ...
انضم الينا |
#1
| ||
| ||
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
|
![]() |
مواقع النشر (المفضلة) |
| |
![]() | ||||
الموضوع | كاتب الموضوع | المنتدى | مشاركات | آخر مشاركة |
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 |