The Arcive of vBulletin Modifications Site. |
|
Jpilot Jirc Chat Integration (basic, but it works)... Details »»
|
|||||||||||||||||||||||||||
|
Jpilot Jirc Chat Integration (basic, but it works)...
Developer Last Online: Oct 2010
This is my first hack I've shared, because it's quite generic. It's not probably quite as "complete" as it could be with forum style integration, but it works very well for what I required.
Basically I have a chat room (jirc) on my site already, but I wanted to show the number of people in the chat room, in the same way the forum home lists the number viewing each forum. I've uploaded my jpilot files to the forum directory, and called the main chat page chat.php You could probably integrate it better by making a new chat.php file and creating a new chat template, but I don't want my chat room to look like part of the forums, so I didn't do it that way. The way I've dont it requires two files to be modified, and one template modified. How I did it. index.php I added a few small changes to get the people in the chat room counted up. In the mysql query below "### LOGGED IN USERS ###" after "session.lastactivity," I added: Code:
/*hack*/session.location,/*end hack*/ Code:
/*hack*/ $inchat=0; /*hack*/ } " I added: Code:
/*hack*/
if($loggedin['location']=='/forum/chat.php'){
$inchat++;
}
/*end hack*/
Code:
/*hack*/ global $inchat; /*end hack*/ Then in forumhome_forumbit_level2_post under: HTML Code:
<if condition="$show['browsers']"> <span class="smallfont"> (<phrase 1="$forum[browsers]">$vbphrase[x_viewing]</phrase>) </span> </if> HTML Code:
<if condition="$forum[forumid]==628 AND $inchat!=0"> <span class="smallfont">($inchat in Chat)</span> </if>": The forum must be added as a "link" forum to the chat room URL (chat.php) for it to show in the forum list. As I say, there's probably other ways of doing this, and I've no real intention just now of upgrading this, but it works nicely. Attached is a small screen shot of the chat room listing on the forumhome... Show Your Support
|
|||||||||||||||||||||||||||
| Comments |
|
#2
|
|||
|
|||
|
Probably worth adding that for my chat room I check the user is logged in etc (which would be simple if you made a new chat template) and then I use the username for the log in:
HTML Code:
<param name="NickName" value="$bbuserinfo['username']"> <param name="UserName" value="MINI2 $bbuserinfo['username']">
|
|
#3
|
||||
|
||||
|
Code:
<param name="UserName" value="MINI2 $bbuserinfo['username']">
|
|
#4
|
|||
|
|||
|
Quote:
|
|
#5
|
|||
|
|||
|
hi all I did something different for jpilot / vb3 integration , the mod can be found here :
https://vborg.vbsupport.ru/showthread.php?p=457345
|
|
#6
|
||||
|
||||
|
Will this work with the VBXIRC hack???? It seems like it would but I'm not sure how I could get the popup chat box to show whos online.... ????
|
![]() |
|
|