PDA

View Full Version : Jpilot Jirc Chat Integration (basic, but it works)...


mini2
04 Jan 2004, 00:51
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:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



And below "$inforum = array();" I added:



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



Then beneath "eval('$activeusers .= ", ' . fetch_template('forumhome_loggedinuser') . '";');

} " I added:



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



In includes/functions_forumlist.php below "### Start makeforumbit ###" I added:



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



That's it for file mods.

Then in forumhome_forumbit_level2_post under:



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



I added:



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



If you do this, replace the value for forumid with whatever id the forum has you use.

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...

mini2
04 Jan 2004, 01:01
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:


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



Hope that makes sense and this helps someone somehow!

:)

Chris Gwynne
04 Jan 2004, 02:21
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



You don't need the MINI2 in there. ;)

mini2
04 Jan 2004, 08:32
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



You don't need the MINI2 in there. ;)
Very true. I stuck it in so I can see at a glance who comes via the web, and who comes via IRC.

;)

d3nnis
06 Jan 2004, 14:36
hi all I did something different for jpilot / vb3 integration , the mod can be found here :

http://www.vbulletin.org/forum/showthread.php?p=457345

:D

RichieBoy67
26 Jul 2004, 03:39
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.... ????