Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases

Reply
 
Thread Tools
Details »»

Version: , by GeorgeofCS GeorgeofCS is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 06-19-2001 Last Update: Never Installs: 6
 
No support by the author.

Ok I made this small little hack after seeing a few others similar to it, but not quite what I needed, Seeing that I wanted my mods to log into chat as mods as well. Hopefully this will be of some use to someone else.

There is two bugs in it, which is another reason why I'm posting it. (I'm new to this whole php coding thing) It works fine for people logged in with cookies, but not without, It also has some extra code in it that I know it shouldn't need. But again, it works

ok first off copy this and call it chat.php

<?php

include("./global.php");

if (!$bbuserinfo[usergroupid]==7 || $bbuserinfo[usergroupid]==6 || $bbuserinfo[usergroupid]==5 || $bbuserinfo[usergroupid]==7) {
eval("dooutput(\"".gettemplate('chatmod')."\");");
} else {
if( $bbuserid ) {

$user = $DB_site->query_first( "SELECT username
FROM user
WHERE userid = $bbuserid" );
$bbusername = $user[ username ];
eval("dooutput(\"".gettemplate('chat')."\");");
} else {
eval("dooutput(\"".show_nopermission()."\");");

} // end if

?>

Next change the $bbuserinfo[usergroupid] to the #'s of users you'd like to give mod status.

Then create template called chat

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>$bbtitle - $foruminfo[title]</title>
$headinclude
</head>
<body>
$header
<center><!-- *** START APPLET CODE *** -->
<APPLET NAME="DigiChat"
CODEBASE="http://host4.digichat.com/DigiChat/DigiClasses/"
CODE="com.diginet.digichat.client.DigiChatApplet"
WIDTH="200" HEIGHT="100" ALIGN="MIDDLE"
ARCHIVE="client.jar">

<PARAM NAME="siteID" VALUE="XXXX">
<PARAM NAME="cabbase" VALUE="Client.cab">
<PARAM NAME="background" VALUE="0099cc">
<PARAM NAME="textcolor" VALUE="000000">
<PARAM NAME="nickname" VALUE="$bbuserinfo[username]">

DigiChat requires a Java Compatible web browser to run.
</APPLET>
<!-- *** END APPLET CODE *** --></center>
$footer
</body>
</html>

Then make template chatmod

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>$bbtitle - $foruminfo[title]</title>
$headinclude
</head>
<body>
$header<center>





<!-- *** START APPLET CODE *** -->
<APPLET NAME="DigiChat"
CODEBASE="http://host4.digichat.com/DigiChat/DigiClasses/"
CODE="com.diginet.digichat.client.chatmaster.DigiC hatMasterApplet"
WIDTH="200" HEIGHT="120" ALIGN="MIDDLE"
ARCHIVE="ChatMaster.jar">

<PARAM NAME="siteID" VALUE="XXXX">
<PARAM NAME="cabbase" VALUE="ChatMaster.cab">
<PARAM NAME="background" VALUE="0099cc">
<PARAM NAME="textcolor" VALUE="000000">
<PARAM NAME="nickname" VALUE="$bbuserinfo[username]">
DigiChat requires a Java Compatible web browser to run.
</APPLET>
<!-- *** END APPLET CODE *** --></center>
$footer
</body>
</html>

Then just upload chat.php and link it in your site and you should be all set.

Show Your Support

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

Comments
  #2  
Old 06-21-2001, 03:39 AM
fugzy
Guest
 
Posts: n/a
Default

i did what you said... but when i try to access the chat.php file it says this:

Parse error: parse error in e:\inetpub\wwwroot\chat.php on line 21

i'm also trying to incorporate digichat into my vbulletin
Reply With Quote
  #3  
Old 10-26-2001, 12:40 PM
JohnBradshaw's Avatar
JohnBradshaw JohnBradshaw is offline
 
Join Date: Oct 2001
Posts: 31
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This happened to me too, can you help?
Reply With Quote
  #4  
Old 10-26-2001, 12:55 PM
Skwowwy
Guest
 
Posts: n/a
Default

<?php

include("./global.php");

if (!$bbuserinfo[usergroupid]==7 || $bbuserinfo[usergroupid]==6 || $bbuserinfo[usergroupid]==5 || $bbuserinfo[usergroupid]==7) {
eval("dooutput(\"".gettemplate('chatmod')."\");");
} else {
if( $bbuserid ) {

$user = $DB_site->query_first( "SELECT username
FROM user
WHERE userid = $bbuserid" );
$bbusername = $user[ username ];
eval("dooutput(\"".gettemplate('chat')."\");");
} else {
eval("dooutput(\"".show_nopermission()."\");");

} // end if
} // end else

?>

You forgot to close the else statement in line 8.
Reply With Quote
  #5  
Old 10-26-2001, 11:14 PM
GeorgeofCS's Avatar
GeorgeofCS GeorgeofCS is offline
 
Join Date: Oct 2001
Posts: 100
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Actually I caught this a while after I posted this. For some reason the code works on my site.
Reply With Quote
  #6  
Old 10-27-2001, 07:07 AM
JohnBradshaw's Avatar
JohnBradshaw JohnBradshaw is offline
 
Join Date: Oct 2001
Posts: 31
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It is an excellent piece of code, thanks!
Reply With Quote
  #7  
Old 10-27-2001, 11:03 AM
GeorgeofCS's Avatar
GeorgeofCS GeorgeofCS is offline
 
Join Date: Oct 2001
Posts: 100
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

actually here is the updated coding for the chat.php piece. The other one only tells the difference between a mod and others. This piece is if you want a private chat for members only.

<?php

include("./global.php3");

if (!$bbuserinfo[usergroupid]==7 || $bbuserinfo[usergroupid]==6 || $bbuserinfo[usergroupid]==5 || $bbuserinfo[usergroupid]==7) {
eval("dooutput(\"".gettemplate('chatmod')."\");");
} else {
if (!$bbuserinfo[usergroupid]==7 || $bbuserinfo[usergroupid]==2) {
eval("dooutput(\"".gettemplate('chat')."\");");
} else {
eval("dooutput(\"".show_nopermission()."\");");

} // end if
} // end else
?>

again there's a small bug in this one I have yet to fix that required me to put a group in twice, but it works fine for me. Give me a couple more months of learning and I'm sure I'll figure out that bug.
Reply With Quote
  #8  
Old 10-28-2001, 03:00 AM
almighty one
Guest
 
Posts: n/a
Default

does this hack allow a way to show who is in the chat room on the index.php?
Reply With Quote
  #9  
Old 10-28-2001, 03:46 AM
JJR512's Avatar
JJR512 JJR512 is offline
 
Join Date: Oct 2001
Location: Glen Burnie, MD, USA
Posts: 710
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm just getting started with this.

So far, the first problem I had was that it didn't like the statement to include global.php. I looked in some of the regular vBulletin files, and they all seem to require it, not include it. So I changed include("./global.php"); to require('./global.php'); and that problem went away.
Reply With Quote
  #10  
Old 10-28-2001, 10:25 AM
GeorgeofCS's Avatar
GeorgeofCS GeorgeofCS is offline
 
Join Date: Oct 2001
Posts: 100
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yeah again I'm just a newbie and although it appears buggy to everyone else it works for me fine

As far as showing whose in the chat room that is the one piece I have not been able to figure out. My users want that as bad as anything else, but so far no go. The only thing I can think of that may allow something like that to work is the external buddy list thing digichat has, but I have yet to figure that point out.
Reply With Quote
Reply

Thread Tools

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 02:08 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04187 seconds
  • Memory Usage 2,284KB
  • Queries Executed 23 (?)
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
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (7)postbit_onlinestatus
  • (10)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_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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete