Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Beta Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Jpilot Jirc Chat Integration (basic, but it works)... Details »»
Jpilot Jirc Chat Integration (basic, but it works)...
Version: 1.00, by mini2 mini2 is offline
Developer Last Online: Oct 2010 Show Printable Version Email this Page

Version: 3.0.0 Rating:
Released: 01-03-2004 Last Update: Never Installs: 4
Is in Beta Stage  
No support by the author.

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*/
And below "$inforum = array();" I added:

Code:
/*hack*/
$inchat=0;
/*hack*/
Then beneath "eval('$activeusers .= ", ' . fetch_template('forumhome_loggedinuser') . '";');

} " I added:

Code:
/*hack*/
if($loggedin['location']=='/forum/chat.php'){
$inchat++;
}
/*end hack*/
In includes/functions_forumlist.php below "### Start makeforumbit ###" I added:

Code:
/*hack*/
global $inchat;
/*end hack*/
That's it for file mods.

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>
I added:

HTML Code:
<if condition="$forum[forumid]==628 AND $inchat!=0">
<span class="smallfont">($inchat in Chat)</span>
</if>":
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...

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 01-03-2004, 11:01 PM
mini2 mini2 is offline
 
Join Date: Nov 2001
Posts: 114
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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']">
Hope that makes sense and this helps someone somehow!

Reply With Quote
  #3  
Old 01-04-2004, 12:21 AM
Chris Gwynne's Avatar
Chris Gwynne Chris Gwynne is offline
 
Join Date: Jan 2003
Posts: 316
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Code:
<param name="UserName" value="MINI2 $bbuserinfo['username']">
You don't need the MINI2 in there.
Reply With Quote
  #4  
Old 01-04-2004, 06:32 AM
mini2 mini2 is offline
 
Join Date: Nov 2001
Posts: 114
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by a-drive
Code:
<param name="UserName" value="MINI2 $bbuserinfo['username']">
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.

Reply With Quote
  #5  
Old 01-06-2004, 12:36 PM
d3nnis d3nnis is offline
 
Join Date: Jun 2003
Location: Singapore
Posts: 211
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hi all I did something different for jpilot / vb3 integration , the mod can be found here :

https://vborg.vbsupport.ru/showthread.php?p=457345

Reply With Quote
  #6  
Old 07-26-2004, 01:39 AM
RichieBoy67's Avatar
RichieBoy67 RichieBoy67 is offline
 
Join Date: Apr 2004
Location: CT - Down in a hole..
Posts: 3,057
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.... ????
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:16 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04369 seconds
  • Memory Usage 2,257KB
  • Queries Executed 21 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (6)bbcode_code
  • (3)bbcode_html
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (5)postbit
  • (6)postbit_onlinestatus
  • (6)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete