Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

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
  #312  
Old 04-18-2002, 10:45 AM
Stasik Stasik is offline
 
Join Date: Nov 2001
Posts: 233
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

if he enters tha chat there is no cookie problem

can he use another phpMyChats too?
Reply With Quote
  #313  
Old 04-18-2002, 12:50 PM
mojotim mojotim is offline
 
Join Date: Oct 2001
Posts: 58
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Don't know yet. I gave him a link to the phpmychat's demo. I'll let you know what I find out from him.

Wouldn't it be great if everyone just updated their darn browsers. I mean come on already, they're free!!
Reply With Quote
  #314  
Old 04-21-2002, 01:54 AM
FCorner's Avatar
FCorner FCorner is offline
 
Join Date: Jan 2002
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Help help help!

I am having a problem with SOME of my users not being able to get into the chatroom. I've followed all of the suggestions etc, and I think I know where the problem is.

Where you suggest in the FAQ:

Quote:
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).
When I do that, it messes up my cookies for my secondary domain. For example, my site domain is familycorner.com, but because I didn't own that for the first couple of years, I had everything on thefamilycorner.com, hence there are hundreds of links on the net pointed to thefamilycorner.com, so I have both set up to work. So if I set my cookie domain to familycorner.com, then it screws up the cookies on thefamilycorner.com, and vice versa.

I think this may be the problem that some users are experiencing. Do you have any suggestions on how I can handle this domain problem?

If you need it, the forums are here http://www.familycorner.com/forums (and/or) http://www.thefamilycorner.com/forums

The chat button is at the top of the forums.

Thanks!
Reply With Quote
  #315  
Old 04-21-2002, 02:01 AM
FCorner's Avatar
FCorner FCorner is offline
 
Join Date: Jan 2002
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by FTDave
Is anyone else having the problem I posted above or is it something you guys just live with?
Dave

I don't have this problem because I have the chatroom set in frames, therefore the url remains the same constantly. Maybe this could work for you?
Reply With Quote
  #316  
Old 04-21-2002, 02:04 AM
FCorner's Avatar
FCorner FCorner is offline
 
Join Date: Jan 2002
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by MomofThree
I've had this hack working with no problems. Today a member was trying to get into the chat room and was not able to. Instead the member got the page for the unregistered users to join in order to use this feature. She made sure she was logged in and still got to this page. Anyone here have any clues why this member is the only one not able to get in?

Thanks!
I am having the same problem, but it has been fixed for some users by having them go into their control panel and edit their options. They need to make sure that they have "browse the board with cookies" set to "yes" and tell them to allow the board to log them in automatically when they return (the other cookie option). Thsi worked for some!
Reply With Quote
  #317  
Old 04-21-2002, 02:40 AM
webhost's Avatar
webhost webhost is offline
 
Join Date: Oct 2001
Location: St. Louis
Posts: 577
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

do the cookie domain in the cp and then have the user work with cookie domain in their user control panel.
Reply With Quote
  #318  
Old 04-21-2002, 02:50 AM
FCorner's Avatar
FCorner FCorner is offline
 
Join Date: Jan 2002
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just want to make sure I understand what you are saying ...

You are saying to go into the admin control panel and set the cookie domain to familycorner.com, then to have the registered users only use that domain when they enter the boards, is that right?

Problem with this is that I get visitors for both thefamilycorner.com and familycorner.com. Therefore, when someone clicks the link for the boards, they are taken to the /forums directory for whatever domain they entered on. For example, if they arrived through www.thefamilycorner.com then they will be taken to www.thefamilycorner.com/forums, but NOT to www.familycorner.com/forums

Did that mak sense? Sorry for the trouble, and thank you for your help
Reply With Quote
  #319  
Old 04-21-2002, 02:56 AM
webhost's Avatar
webhost webhost is offline
 
Join Date: Oct 2001
Location: St. Louis
Posts: 577
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

admin cp correct then have those users having problems turn on their cookies in their user cp
Reply With Quote
  #320  
Old 04-21-2002, 11:12 AM
FCorner's Avatar
FCorner FCorner is offline
 
Join Date: Jan 2002
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there anyway to specify two domains for the cookies in the admin control panel?
Reply With Quote
  #321  
Old 05-05-2002, 07:55 PM
AnkisethGallant's Avatar
AnkisethGallant AnkisethGallant is offline
 
Join Date: Oct 2001
Location: Las Vegas
Posts: 113
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I just installed this, the only problem is when I try to load phpMyChat.php3:

Quote:
Parse error: parse error in /home/virtual/site8/fst/var/www/html/boards/chat/lib/index.lib.php3 on line 91

Fatal error: Call to undefined function: send_headers() in /home/virtual/site8/fst/var/www/html/boards/phpMyChat.php3 on line 20
Can someone PLEASE help?
Reply With Quote
Reply


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:58 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.04720 seconds
  • Memory Usage 2,345KB
  • 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
  • (4)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
  • (1)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