The Arcive of vBulletin Modifications Site. |
|
|
#1
|
|||
|
|||
|
I am using this code for an AJAX Chat Integration.
https://vborg.vbsupport.ru/showthrea...=269509&page=2 Updated to the following recently: vBulletin 4.2.3 Patch Level 2 PHP 5.6.27-0+deb8u1 (cli) And now the user counter doesn't work properly on the nav bar. FYI, I've updated the "global_bootstrap_init_start" slightly, to make it a little more specific (and to remove duplicate login entries): Code:
$resCNT = mysql_query("SELECT COUNT(userID) FROM ajax_chat_online GROUP BY userID");
$num_chatting = $resCNT[0];
vB_Template::preRegister('navbar',array('num_chatting' => $num_chatting));
vB_Template::preRegister('FORUMHOME',array('num_chatting' => $num_chatting));
|
|
#2
|
|||
|
|||
|
It's not outputting anything because you don't fetch the results.
What you want to do is COUNT all DISTINCT records, example (untested): PHP Code:
|
| 4 благодарности(ей) от: | ||
| Dragonsys, grey_goose, MarkFL, sixpackspeak | ||
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|