![]() |
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. :) |
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 |
This happened to me too, can you help?
|
<?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. |
Actually I caught this a while after I posted this. For some reason the code works on my site. :confused:
|
It is an excellent piece of code, thanks!
|
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. :) |
does this hack allow a way to show who is in the chat room on the index.php?
|
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. |
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. |
i sill get the message:
Error The siteID you entered is invalid. Please re-enter this information. |
You gotta change the xxxx in the template to your digichat site ID
|
a demo anywhere?
|
Yup my room is for users only but enter demo/demo as the login info and go here Customers Suck Chat Room
|
coool thanks, someone else is using the demo username right now, but i'll keep checkin to see if i can get in, thanks :)
|
Do you have to purchase DigiChat?
Which version of DigiChat is this using? |
You have to purchase it... It's currently $500 for 100 concurrent users... Believe me it's worth it.. I've got it up and running on my site, and I'm just about to open it up to all members.
I've got some nice integration scripts written and have managed 2-way integration between the DigiChat and vBulletin buddy lists. I'll report back when I get mine open. |
Is it easy to install on your server?
Is it server intensive? Do you moderators have control over the chatroom? |
:confused: ok now I'm irked
|
I'm using this hack and it works great for most people. However, AOL users are not able to get in with it. Has anyone else experienced this, and is there a fix?
Thanks |
Please can you post the location of the demo again?
|
How can I use more than one user group as mods? I have Mods, Admins, and Senior Mods??
|
This isn't working for me right now...well, it sort of is...
However, my user name keeps getting literal: when I enter chat, It says that $bbuserinfo[username] has just entered chat. It's not picking up the variable nickname; I have double-, triple-, and quadruple-checked the language, and all apears to be fine. Anyone else have this problem; a solution maybe? BTW, I am using DigiChat 4.0; brand new release...don't know if this might be the problem or not. |
I attempted to install this but I keep getting a parse error. Here is what I have. Any help would be greatly appreciated. I can't seem to find where the error is.
<?php include("./global.php"); if (!$bbuserinfo[usergroupid]==6 || $bbuserinfo[usergroupid]==6 || $bbuserinfo[usergroupid]==6 || $bbuserinfo[usergroupid]==6) { 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 ?> |
Change include to require;)
Satan |
All times are GMT. The time now is 03:51 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|