The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
I have a login hack for my DigiChat room, and it works great. Unfortunately, it also allows users awaiting email confirmation to still access the chat. Therefore, people can get in without even providing a valid email.
So, I'd like to know if there is a way to restrict access to only members in the Registered usergroup? At this point, I have my 'awaiting email confirmation' usergroup set up to not allow access to the forum at all, preventing them from getting in the chat. But I really don't want that as a permanent option. Can I add a usergroup variable to this and if so, what should it be? Here is my code: PHP Code:
Thanks |
#2
|
||||
|
||||
Add the variable "usergroupid" to the select statement:
Quote:
Post back if you need example code. |
#3
|
|||
|
|||
Thank you! And yes, example code would be appreciated.
|
#4
|
||||
|
||||
It appears your code is for vb 1.1.x but if you want to do something with 2.0, this sort of thing would get you where you want to go:
PHP Code:
|
#5
|
|||
|
|||
okay that code works okay for digichat, but i get this error:
Parse error: parse error in e:\inetpub\wwwroot\vb\chat2.php(7) : eval()'d code on line 27 im using vb2.0 help me plz |
#6
|
||||
|
||||
PHP Code:
|
#7
|
|||
|
|||
k it works... here is the full code i use to incorporate digichat 3.5 into vbulletin 2.0
<?php include("./global.php"); if (!$bbuserinfo[userid] || $bbuserinfo[usergroupid]==1 || $bbuserinfo[usergroupid]==3) { show_nopermission(); } eval("dooutput(\"".gettemplate("chat")."\");"); if( $bbuserid ) { $user = $DB_site->query_first( "SELECT username FROM user WHERE userid = $bbuserid" ); $bbuserinfo = $user[ username ]; print( "<APPLET align=middle code=\"com.diginet.digichat.client.DigiChatApplet\ " codeBase=\"http://www.blah.com/DigiChat/DigiClasses/\" width=\"200\" height=\"100\" align=\"middle\" ARCHIVE=\"client.jar\" nickname=\"$username\"> <PARAM NAME=\"siteID\" VALUE=\"1000\"> <PARAM NAME=\"cabbase\" VALUE=\"Client.cab\"> <PARAM NAME=\"background\" VALUE=\"000000\"> <PARAM NAME=\"textcolor\" VALUE=\"ffffff\"> <param name=\"floodControl\" value=\"1000\"> <PARAM NAME=\"nickname\" VALUE=\"$bbuserinfo\"> <PARAM NAME=\"openProfileURL\" VALUE=\"true\"> <PARAM NAME=\"room\" VALUE=\"chat-room-name\"> Our Chat requires a Java Compatible web browser to run. </APPLET>\n" ); } else { print( "<BODY BGCOLOR=\"#000000\"> <CENTER> <FONT FACE=\"verdana, arial\" size=\"2\" color=\"white\"> Sorry, you must be logged into the Forum to use Chat!</font><br>" ); } // end if it still needs a lil cleanin up... cause it displays the connect string all weird on the page, etc... can it like close the old window when a person clicks on chat? |
#8
|
|||
|
|||
it keeps bringin up a window saying the siteid you entered is invalid yet it still works... why is that? but sometimes my users can't get on... hrmm
can someone plz post a complete working hack for digichat 3.5 to work with vbulletin 2.0... complete with the chat.php and the templates that you're suppose to add... |
#9
|
||||
|
||||
PHP Code:
Code:
<APPLET align=middle code="com.diginet.digichat.client.DigiChatApplet" codeBase="http://www.yoursite.com/DigiChat/DigiClasses/" width="200" height="100" align="middle" ARCHIVE="client.jar" nickname="$bbuserinfo[username]"> <PARAM NAME="siteID" VALUE="site id"> <PARAM NAME="cabbase" VALUE="Client.cab"> <PARAM NAME="background" VALUE="{ pagebgcolor}"> <PARAM NAME="textcolor" VALUE="{ pagetextcolor}"> <param name="floodControl" value="1000"> <PARAM NAME="nickname" VALUE="$bbuserinfo[username]"> <PARAM NAME="openProfileURL" VALUE="true"> <PARAM NAME="room" VALUE="chat-room-name"> Our Chat requires a Java Compatible web browser to run. </APPLET> |
#10
|
|||
|
|||
Anyone know what the usergroup id for (COPPA) Users Awaiting Moderation is??
And i would assume all i'd have to do would be to add that into the code you have JohnM <?php include("./global.php"); if (!$bbuserinfo[userid] || $bbuserinfo[usergroupid]==1 || $bbuserinfo[usergroupid]==3 || $bbuserinfo[usergroupid]==?) { show_nopermission(); } eval("dooutput(\"".gettemplate("chat")."\");"); ?> Of course i'd replace the ? with whatever the coppa usergroup id is. Thanks in advance |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|