vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   VB eIRC chat intergration hack 1.0 (https://vborg.vbsupport.ru/showthread.php?t=37424)

springbok 05-03-2002 09:33 PM

Hi,

A quick intro. I am brand newbie to vBulletin and paid for my license tonight. I have tried to install this but it won't work.

The page just comes up blank and if I change the path testing various possiblies it mostly give me the not found error. Any ideas? I am running vBulletin on a win2k machine, might this be the issue?

I would really appreciate any help you could give.

BrAinZ 05-08-2002 08:46 PM

I have installed this hack but when you try to load it it seems to "pause" for ages then comes up with :

Closing Link ...blah blah.. (USER: bad username)

Any ideas ?

andrew67 05-09-2002 02:02 AM

To solve the error in the login, in the chat template change the line

<param name="username" value="$bbuserinfo[username]">

to

<param name="username" value="javauser">

or put your site name or something there instead of "javauser"....

xeon 05-09-2002 07:43 PM

Quote:

Originally posted by andrew67
To solve the error in the login, in the chat template change the line

<param name="username" value="$bbuserinfo[username]">

to

<param name="username" value="javauser">

or put your site name or something there instead of "javauser"....

What exactly does this do? The reason I ask is it my chat works great for my admin name and for other's so far. But, I have a regular user account so I can view the board as a regular user. When I try to chat with my "Mike's Dad" as my user name, it first gives me a user name taken, then all subsequent nick changes result in the error message given above, bad user name. I am going to try what you said above, but what exactly is the problem? I'm just interested.

wot-Mike 05-09-2002 09:32 PM

Some characters can not be used in usernames. I don't know about the requirements for this particular chat, but if a name contains invalid characters then you will not get into chat.

xeon 05-10-2002 12:35 PM

Well that was something I overlooked, the apostraphe is invalid. Any suggestions on how to work the apostraphe? Can these be masked out or something? Thanks in advance, if all else fails I can edit members user names and make a note when registering not to use ' in the user name. Currently out of about 450, only 14 member names have the invalid charachter.

[edit] I figured out how to strip the apostraphe using the str_replace, but now I seem to get the apostraphe stripped and it only uses the first part of the user name, ie. Mike's Dad is Mikes. Here is my chat.php
PHP Code:

<?php
error_reporting
(7);

require(
'./global.php');

$chatusername=str_replace(" ","_",$bbuserinfo[username]);
$chatusername=str_replace("'","",$bbuserinfo[username]);

eval(
"dooutput(\"".gettemplate('forumchat')."\");");

?>

I am using the the Sylverdale forumchat template with the chatusername replacements. Yes I am learning on the fly. ;)

wot-Mike 05-10-2002 08:54 PM

Well, look at your code:

the first "$chatusername=..." line, what does this do? It looks at $bbuserinfo[username] (Mike's Dad), replaces each space with an underscore, and then stores the edited value in $chatusername (Mike's_Dad)

The second line again looks at $bbuserinfo[username] (Mike's Dad), removes each apostrophe, and the stores the edited value in $chatusername (Mikes Dad), overwriting the already existing value of Mike's_Dad :(
Since the first value was overwritten, $chatusername now has a value of "Mikes Dad".
Your chat only accepts the first part, before the space, meaning "Mikes Dad" will be logged in as "Mikes".

Back to the drawing board ;)

Slynderdale 05-11-2002 01:50 AM

Quote:

Originally posted by xeon
Well that was something I overlooked, the apostraphe is invalid. Any suggestions on how to work the apostraphe? Can these be masked out or something? Thanks in advance, if all else fails I can edit members user names and make a note when registering not to use ' in the user name. Currently out of about 450, only 14 member names have the invalid charachter.

[edit] I figured out how to strip the apostraphe using the str_replace, but now I seem to get the apostraphe stripped and it only uses the first part of the user name, ie. Mike's Dad is Mikes. Here is my chat.php
PHP Code:

<?php
error_reporting
(7);

require(
'./global.php');

$chatusername=str_replace(" ","_",$bbuserinfo[username]);
$chatusername=str_replace("'","",$bbuserinfo[username]);

eval(
"dooutput(\"".gettemplate('forumchat')."\");");

?>

I am using the the Sylverdale forumchat template with the chatusername replacements. Yes I am learning on the fly. ;)

use:
PHP Code:

$chatusername=str_replace(" ","_",$bbuserinfo[username]);
$chatusername=str_replace("'","",$chatusername); 


xeon 05-13-2002 08:09 PM

Thanks for the input and Slynderdale, your code worked great. Thanks again.

megatest 05-15-2002 04:59 AM

Hell'o there. Many thanx for that great and easy hack.

BUT I'M STILL WONDERING...

Is there a way to have an "Who's chatting on line" list
for that ?


All times are GMT. The time now is 12:51 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01252 seconds
  • Memory Usage 1,754KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete