The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Does anyone have the digichat login hack for 2.0 like the one used on the hole.com site?
thanks |
#2
|
|||
|
|||
It's easy -- we use it on http://chat.fanhome.com
Basically create a PHP file and embed your digiChat applet in there. then: Code:
// Check and see if the user is logged in if( user is logged in ) { echo "<APPLET .... nickname =\"$some_var_representing_user_name\">"; } // end if |
#3
|
|||
|
|||
Are you using vB on FanHome.Com? I don't see a copyright on it...
|
#4
|
|||
|
|||
Quote:
|
#5
|
|||
|
|||
I have no idea what you mean. I've spent the last 2 years heavily hacking my ubb without any problems. But this is the first time I've ever used php or mysql scripts, so I have a lot to learn. But thanks anyway
|
#6
|
|||
|
|||
Do something like this (PHP and Perl are fairly close so you should be able to understand what I have, if not just ask):
Code:
if( $bbuserid ) { $user = $DB_site->query_first( "SELECT username, canpost, usergroupid FROM users WHERE userid = $bbuserid" ); $bbusername = $user[ username ]; $usergroupid = $user[ usergroupid ]; $canpost = $user[ canpost ]; if( $canpost == 0 or $usergroupid == 366 ) { print( "<font face=\"TREBUCHET MS,ARIAL,HELVETICA\">Sorry, you are banned from FanHome Chat! If you feel this is in error, please e-mail the administration at: <a href=\"mailto:administrators@fanhome.com\">administrators@fanhome.com</a></font><br>" ); } else { print( "<APPLET align=middle code=\"digi.digichat.DigiChatApplet\" codeBase=\"http://www.yourdomain.com/path/to/digichat/\" width=\"600\" height=\"480\" align=\"middle\" ARCHIVE=\"client.jar\" nickname=\"$bbusername\"> <PARAM NAME=\"siteID\" VALUE=\"1000\"> <PARAM NAME=\"cabbase\" VALUE=\"Client.cab\"> <PARAM NAME=\"background\" VALUE=\"FFFFFF\"> <PARAM NAME=\"textcolor\" VALUE=\"000000\"> <PARAM NAME=\"url\" VALUE=\"http://forums.fanhome.com/member.php?action=getinfo&userid=$bbuserid\"> <PARAM NAME=\"openProfileURL\" VALUE=\"true\"> <PARAM NAME=\"room\" VALUE=\"$room\"> <PARAM NAME=\"embedded\" VALUE=\"true\"> FanHome Chat requires a Java Compatible web browser to run. </APPLET>\n" ); } // end if } else { print( "<font face=\"TREBUCHET MS,ARIAL,HELVETICA\">Sorry, you must be logged in to use FanHome Chat!</font><br>" ); } // end if If they're logged out I don't let them in either. You can configure DigiChat to disallow changing of usernames for guests and limit hosts to connect from -- it's a great program. If you want to get fancy you can store more stuff in the users table for their chat settings and you can pass those as more parameters to the chat applet. I simply set up the username and their profile URL. There is also a way to capture any settings they change -- so if they edit their icon in chat and exit you can set it up to write to the database with the particular iconid. It's pretty sweet and it on my "to-do" list. If you have any other questions just ask. |
#7
|
|||
|
|||
Thanks for the help. I hope you don't mind if I ask more questions about this? I couldn't get it to work.
I copied your script to a blank document, and replaced the urls and the site id with my own. I then added <?php and ?> to the top and bottom (just a guess here) and named it vbchat.php. I uploaded it into my forum directory, called it in the browser and received the following error: Fatal error: Call to a member function on a non-object in /usr/www/thingsar/httpd/htdocs/..mydomain/forum/vbchat.php on line 5 (btw, I'm not really grumpy, I'm a nice old lady and am sincerely appreciative of any help you can give me ) |
#8
|
|||
|
|||
you need to add:
Code:
require( "global.php" ); Then it should work. Also change the database query from: Code:
SELECT username, canpost, usergroupid FROM users WHERE userid = $bbuserid" Code:
SELECT username, canpost, usergroupid FROM user WHERE userid = $bbuserid" |
#9
|
|||
|
|||
Thanks for the fast reply! I just tried and received the standard error that the tech dept will be notified. I then recieved the email with this:
Database error in vBulletin: Invalid SQL: SELECT username, canpost, usergroupid FROM user WHERE userid = 1 mysql error: Unknown column 'canpost' in 'field list' mysql error number: 1054 Date: Tuesday 20th of February 2001 01:40:59 PM Script: /forum/vbchat.php Referer: What did I do wrong? and thank you for helping me |
#10
|
|||
|
|||
Are you using 2.0? That code is based on vB1.1.5, so they could've changed around the way things work in 2.0. If you want to ignore that then use:
Code:
require( "global.php" ); if( $bbuserid ) { $user = $DB_site->query_first( "SELECT username FROM users WHERE userid = $bbuserid" ); $bbusername = $user[ username ]; print( "<APPLET align=middle code=\"digi.digichat.DigiChatApplet\" codeBase=\"http://www.yourdomain.com/path/to/digichat/\" width=\"600\" height=\"480\" align=\"middle\" ARCHIVE=\"client.jar\" nickname=\"$bbusername\"> <PARAM NAME=\"siteID\" VALUE=\"1000\"> <PARAM NAME=\"cabbase\" VALUE=\"Client.cab\"> <PARAM NAME=\"background\" VALUE=\"FFFFFF\"> <PARAM NAME=\"textcolor\" VALUE=\"000000\"> <PARAM NAME=\"url\" VALUE=\"http://forums.fanhome.com/member.php?action=getinfo&userid=$bbuserid\"> <PARAM NAME=\"openProfileURL\" VALUE=\"true\"> <PARAM NAME=\"room\" VALUE=\"$room\"> <PARAM NAME=\"embedded\" VALUE=\"true\"> FanHome Chat requires a Java Compatible web browser to run. </APPLET>\n" ); } else { print( "<font face=\"TREBUCHET MS,ARIAL,HELVETICA\">Sorry, you must be logged in to use FanHome Chat!</font><br>" ); } // end if |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|