AJAX Chat Integration
So I have been using vBulletin for awhile and have been very frustrated with the current lack of integration with AJAX Chat by blueimpu. So, I have decided to do the integration myself and with the help of other users on vB.org I have put together a few plugins.
Add Popup Link for Chat: I started by adding in the Chat popup link to my navbar. In your navbar template, add the following code to display the Chat Link. HTML Code:
<a class="navtab" href="#" onClick="MyWindow=window.open('http://www.wavingthewheat.com/chat/index.php','MyWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,width=800,height=600'); return false;">Chat ({vb:raw num_chatting})</a> PHP Code:
$result = mysql_query("SELECT * FROM ajax_chat_online");
Displaying UserNames of Those Online: Just like in the above there are two parts to this plugin. Modifying a template and creating a plugin. First we need to modify your FORUMHOME template. Right below the <!-- end logged in users --> line add the following. HTML Code:
<!-- chat users --> <div id="wgo_onlineusers" class="wgo_subblock section"> <h3 class="blocksubhead"><img src="{vb:stylevar imgdir_misc}/users_online.png" alt="Users In Chat" />{vb:raw num_chatting} Users In Chat</h3> <div> <p>{vb:raw chat_userlist}</p> </div> </div> <!-- end chat users --> PHP Code:
global $vbulletin;
Download No files for download. |