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 Stasik Stasik is offline
Developer Last Online: May 2009 Show Printable Version Email this Page

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

Hi.... it is my first hack - phpProbe
here is it... it was tested under vbb2x RC2 and phpMyChat 0.14.4

News:
Updated on 19.07.01
- FAQ has been add

Updated on 18.07.01
The hack is compatible with version 0.14.5 of phpMyChat
- there is some javaScript code there, so the hack will not work with browsers without JS support (phpMyChat will not work with these browsers too )
- the Exit link in chat works ok now

Hack:
Step 1:
open /lib/index.lib.php3 in yours phpMyChat Derictory
find:
PHP Code:
// Fix some security holes 
replace it with
PHP Code:
//a VBB integration hack by Stasik (stasik@t-online.de)
//v0.1
//(C)2001

$exiturl "http://www.blabla.com"// the url the user will be redirected exiting the chat

if($Ver == ""){print "
<HTML>
<SCRIPT TYPE=\"text/javascript\" LANGUAGE=\"javascript\">
    <!--
    var NS4 = (document.layers) ? 1 : 0;
    var IE4 = ((document.all) && (parseInt(navigator.appVersion)>=4)) ? 1 : 0;
    var ver4 = (NS4 || IE4) ? \"H\" : \"L\";
function defineVerField()
    {
        if (document.images && ver4 == 'L')
            document.forms['Params'].elements['Ver'].value = 'M';    // js1.1 enabled browser
        else document.forms['Params'].elements['Ver'].value = ver4;
    }
 -->
</SCRIPT>
<FORM ACTION=\"index.php3\" METHOD=\"POST\" AUTOCOMPLETE=\"OFF\" NAME=\"Params\">
<INPUT TYPE=\"hidden\" NAME=\"Ver\" VALUE=\"L\">
</FORM>
<SCRIPT TYPE=\"text/javascript\" LANGUAGE=\"javascript\">
defineVerField();
document.forms.Params.submit();
</SCRIPT>
</HTML>
"
; exit;}

chdir("/path/to/board/");
require(
"./global.php");
chdir("/path/to/chat/");

if (
$bbuserid == 0

print 
"no"//Message if the user has no cookie
exit; 
}
else
{
if (
$bbusername == "" || (isset($bbusername))==0

$getusername=$DB_site->query_first("SELECT username FROM user WHERE userid=$bbuserid"); 
$username=$getusername[username]; 
$bbusername $username
}
else 

$username $bbusername
} }

$U $username;

$pat "[[:space:]]"
$repl ""
$U ereg_replace($pat,$repl,$U); 
$pat ','
$U ereg_replace($pat,$repl,$U); 
stripslashes($U); 

$N 20
$D 10
$Form_Send 1

//Replace admin with your administration nick
if($U != "Admin")
{
$PASSWORD="1";
}

// Fix some security holes 
Step 2:
open /lib/index.lib.php3 in yours phpMyChat Derictory
find:
PHP Code:
$DbLink->query("INSERT INTO ".C_MSG_TBL." VALUES ($EN, '$E', 'SYS exit', '', ".time().", '', 'sprintf(L_EXIT_ROM, \"".special_char($U,$Latin1)."\")')");
        }
    } 
replace it with:
PHP Code:
$DbLink->query("INSERT INTO ".C_MSG_TBL." VALUES ($EN, '$E', 'SYS exit', '', ".time().", '', 'sprintf(L_EXIT_ROM, \"".special_char($U,$Latin1)."\")')");
        }
    }
if(
$exit == "1"){header ("Location: $exiturl"); exit;} 
Step 3:
open /exit.php3 in yours phpMyChat Derictory
find:

PHP Code:
<A HREF="<?php echo("$From?Ver=$Ver&L=$L&U=".urlencode(stripslashes($U))."&E=".urlencode(stripslashes($R))."&EN=$T"); ?>" TARGET="_parent"><?php echo(L_EXIT); ?></A>
replace it with:
PHP Code:
<A HREF="<?php echo("$From?exit=1&Ver=$Ver&L=$L&U=".urlencode(stripslashes($U))."&E=".urlencode(stripslashes($R))."&EN=$T"); ?>" TARGET="_parent"><?php echo(L_EXIT); ?></A>
ENJOY

FAQ:
Q: I`m getting "no" every time.
A: You need to upgrade a cookie option in your VB control panel. Write under: Options->Change Options->[HTTP Headers and output]->Cookie Domain your domainname ONLY (blabla.com).

Q: I`m getting "you need to register" error.
A: Enable chat using for not registered users in your phpMyChat config (/config/config.lib.php3).

Q: I`m getting "wrong password" error.
A: Make shure you have deleted all user accounts in your chat and have only administrative one. If you are logging is as administrator note that you have to enter your password EVERY time you are logging in.

Questions or Bug reports?
Post it here I`ll answer ASAP.

Show Your Support

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

Comments
  #222  
Old 11-18-2001, 04:22 PM
Stasik Stasik is offline
 
Join Date: Nov 2001
Posts: 233
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by dbdbdbdb
Hi Stasik,

first, thanks for this hack! I hope I'll be able to give something back to the community of vbhackers.

And here is my question:

I don't get it working. I can't get rid of the "no".

What I did:

First I installed the chat in a second database, so now i use the same as vbulletin.

I've set "Registration of users" to:
define("C_REQUIRE_REGISTER", '0');
define("C_EMAIL_PASWD", '0');

I've got clean tables. Just myself in "c_reg_users" with the same password and the same username as in my forum.

In index.lib.php3 I configured:

chdir("/homepages/htdocs/forum/");
require("./global.php4");
chdir("/homepages/htdocs/chat/");

I cleaned all my cookies, reloged in again and again, but I can't get rid of the "no". Why?

Please help. I've been searching for ages...

dbdb

Ps: I am able to login admin.php3, but there are no rooms listed (to clean up).

PS: I had phpmychat working before, but did a clean install.
First.. make sure, cookies can work on your chat domain (better you use same domain name as forum)
Second: make sure vb saves cookies....
Reply With Quote
  #223  
Old 11-18-2001, 05:16 PM
pgowder's Avatar
pgowder pgowder is offline
 
Join Date: Nov 2001
Location: West Columbia, SC
Posts: 537
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What type of admin functions can be done in this chat room?

Can moderators ban users? Edit things?

When I go into admin.php3, should all my users show up there as registered users? It is empty?

thanksa
Reply With Quote
  #224  
Old 11-18-2001, 05:19 PM
webhost's Avatar
webhost webhost is offline
 
Join Date: Oct 2001
Location: St. Louis
Posts: 577
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

click the "?' in chat
Reply With Quote
  #225  
Old 11-18-2001, 05:21 PM
pgowder's Avatar
pgowder pgowder is offline
 
Join Date: Nov 2001
Location: West Columbia, SC
Posts: 537
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks, I see all the commands now.

What about the users, should they show up?
Reply With Quote
  #226  
Old 11-18-2001, 05:26 PM
webhost's Avatar
webhost webhost is offline
 
Join Date: Oct 2001
Location: St. Louis
Posts: 577
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

As far as users that have logged into your forum then when they go into the chat room then yes there name should should show up in chat like ours did when we were there. I don't believe however that the user names will showup in the chat admin panel, Don't see how they can because they do not show up in the chat user table anymore because you are now using the forum user table.
Reply With Quote
  #227  
Old 11-18-2001, 05:28 PM
pgowder's Avatar
pgowder pgowder is offline
 
Join Date: Nov 2001
Location: West Columbia, SC
Posts: 537
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, that makes sense!

Thanks!
Reply With Quote
  #228  
Old 11-18-2001, 06:57 PM
pgowder's Avatar
pgowder pgowder is offline
 
Join Date: Nov 2001
Location: West Columbia, SC
Posts: 537
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm testing out the chat room now. I just tried to kick someone out.

But it said I wan't a moderator. Does it not pick up the moderators from vb?
Reply With Quote
  #229  
Old 11-18-2001, 07:27 PM
Stasik Stasik is offline
 
Join Date: Nov 2001
Posts: 233
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You have to put you nickt to the hack part
Reply With Quote
  #230  
Old 11-18-2001, 07:28 PM
pgowder's Avatar
pgowder pgowder is offline
 
Join Date: Nov 2001
Location: West Columbia, SC
Posts: 537
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can you explain that? I don't understand?
Reply With Quote
  #231  
Old 11-19-2001, 02:00 AM
pgowder's Avatar
pgowder pgowder is offline
 
Join Date: Nov 2001
Location: West Columbia, SC
Posts: 537
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, I replaced nickname with my username on vb. But I still can't make announcements etc.

???
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 07:44 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.11223 seconds
  • Memory Usage 2,338KB
  • Queries Executed 25 (?)
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_php
  • (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
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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