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
YAPIH (Yet Another PHPMyChat Integration Hack) 1.0 Details »»
YAPIH (Yet Another PHPMyChat Integration Hack) 1.0
Version: 1.00, by version version is offline
Developer Last Online: Nov 2002 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 04-08-2002 Last Update: Never Installs: 15
 
No support by the author.

YAPIH (Yet Another PHPMyChat Integration Hack) 1.0 by Joshua McNeese <jmcneese@enterthemuse.com>

Now, first off, this is not an 'out-of-the-box' hack, that you can just uncompress and change a config file and expect to work right off the bat. This hack was the result of me spending a considerable amount of time hand-editing files and replacing variables to convice PHPMyChat to use the VBulletin user database table. You will have to modify this to work with your server/configuration, and if you are not familiar with the PHP internals of VBulletin or with MySQL, turn back now. You have been warned.

(1) Uncompress YAPIH-1.0.zip in the ServerRoot of your server, so that you will access the chat via http://yourhost.com/chat/

(2) Execute the SQL commands in the file 'chat.sql'. This will create the tables needed for PHPMyChat as well as modify your user table. Altering your user table is dangerous, so be sure to have backups handy.

(3) Modify your VB templates:

ADD these two variables to your 'phpinclude' template:
PHP Code:
$chatname str_replace(" ""%20"$bbuserinfo[username]);
$chatpass $bbuserinfo[password]; 
This will replace any space in a username with spaces, as PHPMyChat does not accept spaces in names, and assign it to the variable $chatname. The users hashed password is assigned to $chatpass, for convenience.

(4) Edit the /chat/config/config.lib.php3 to match your server/configuation/preference.

(5) Now, the last (and tricky) part. What you have now is a working PHPMyChat installation that will authenticate on the VBulletin user table, if you followed the instructions faithfully and received no errors. What must be done now is provide your users with a way to access the chatrooms that you have created. I do this via a DHTML/PHP4 menu panel that lists the available chatrooms, and opens the chatroom in a 600x400 java popup box. You can do this anyway you want, so long as the link is provided via a template in VBulletin, or if you know how to pass variables to custom PHP scripts from within the 'phpinclude' template (which is what I do). The URL you must use is in this format:

Code:
/chat/index.php3?U=$chatname&PWD_Hash=$chatpass&Ver=H&L=english&R0=$chatroom&T=1&D=10&N=200&EN=1
Where $chatname and $chatpass are provided by the 'phpinclude' template, and $chatroom is provided by however you choose to assign that variable. It's up to you to figure out how you wish to do so, because everyone structures their site navigation in a different way.

To see the end-user representation of this hack, go to http://www.enterthemuse.com/ and login as 'test', password 'test'. On the left side of the site is a panel-based menu that will include a section 'Chat'. Take a look around, pay attention to where the URLs point and try it out.

It might work for you, it might not, it's totally dependent on your understanding of how to pass variables from your VB templates (in particular 'phpinclude'). Try it, and if all else fails, post your experiences on vb.org.

Download it HERE.

Good luck,

Joshua McNeese

Show Your Support

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

Comments
  #22  
Old 08-04-2002, 08:43 AM
TalkHardRandy's Avatar
TalkHardRandy TalkHardRandy is offline
 
Join Date: Jan 2002
Posts: 69
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by ixian
Gave up on the front page integration, just created a template for it in vb, and I link to it. Works pretty well now...
Any hope of seeing that template & the instructions for linking it?

[high]* TalkHardRandy hoping...
[/high]

[high]* TalkHardRandy praying...[/high]
Reply With Quote
  #23  
Old 08-11-2002, 07:50 AM
ManagerJosh's Avatar
ManagerJosh ManagerJosh is offline
 
Join Date: Feb 2002
Posts: 348
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Very intresting hack though I'm not sure what I did wrong. I decided to test out the installation process on a clean version of vb2.2.6 on a server I have at home and for some reason it isn't cooperating..

I can't get people to login nor have I figured out. I did as suggested, even added the additional coding to the phpinclude template (mind for some reason the server decided not to connect to the mysql)

Could someone enlighten what I did wrong here?
Reply With Quote
  #24  
Old 08-26-2002, 07:53 PM
Bob Ricci Bob Ricci is offline
 
Join Date: May 2002
Location: Temple City, CA
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm fairly new to vB but catch on quickly. I'm also learning php and can pass variables. I'd like to completely install this hack, but I have a couple questions:

1) For this hack to work, does the phpmychat table need to be created as a table within the same db as vB? I've created a separate table for phpmychat.

2) phpinclude has been edited to add the vars $chatname and $chatpass - do I need to modify global.php to include this file, or is it already an included file? I can check this one myself, I suppose.

3) Last question. The var $chatroom can be defined by me for use on a button or {a href} links. But what is the content of this var? The name given in phpmychat? We have multiple 'rooms' already using another software tool, but would prefer embedded integration with vB.

I'm using vB 2.2.6. phpMyChat is installed and functional. I call it using a simple button that opens it as target=_blank so my users never really leave vB. I can certainly change this.

HEY! One more question. Is there a way to show in Who's On-Line which users are in chat? That would be kewl!
Reply With Quote
  #25  
Old 08-29-2002, 07:47 AM
Bob Ricci Bob Ricci is offline
 
Join Date: May 2002
Location: Temple City, CA
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm really surprised that I haven't received a single response and it has been several days. At any rate, I have answered most of my own questions. Here is where I am at:

I have added:

Code:
$chatname=str_replace(" ", "%20", $bbuserinfo[username]);
$chatpass=$bbuserinfo[password];
$chatroom="General";
to phpinclude. I have created a link EXACTLY as indicated in the instructions. In fact, I've followed all of the instructions. But each time I pass the user name with a space replaced by %20 I am told by phpMyChat that usernames with spaces are not allowed.

I can log into phpMyChat just fine without integration. It works.

What am I missing?
Reply With Quote
  #26  
Old 08-31-2002, 08:43 PM
ManagerJosh's Avatar
ManagerJosh ManagerJosh is offline
 
Join Date: Feb 2002
Posts: 348
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How do I access administrative features in phpmychat? I get Warning: Failed opening './localization/6.lib.php3' for inclusion (include_path='.:/usr/share/php') when I try to use it :-X
Reply With Quote
  #27  
Old 09-03-2002, 12:13 PM
Smelly Fed Smelly Fed is offline
 
Join Date: Mar 2002
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Am having trouble getting phpmyChat (integrated with my vbulletin userbase) to allow users with AOL 7.0 to enter chat. Anyone else experienced this and more importantly, anyone else figure a way to fix this?
Reply With Quote
  #28  
Old 10-25-2002, 08:03 AM
mtha's Avatar
mtha mtha is offline
 
Join Date: Jul 2002
Location: US
Posts: 775
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by solent
well version i don't use dhtml menus.
again i passed the exact code as you did in my phpinclude but yet username and password are not passed through.
I couldnt make it work in phpinclude template somehow, so I just add the lines into index.php, and it works just fine. This hack is great

PHP Code:
$chatname str_replace(" ""%20"$bbuserinfo[username]);
$chatpass $bbuserinfo[password]; 
Reply With Quote
  #29  
Old 10-29-2002, 04:09 AM
Silver_2000_)! Silver_2000_)! is offline
 
Join Date: Mar 2002
Location: Texas
Posts: 102
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Smelly Fed
Am having trouble getting phpmyChat (integrated with my vbulletin userbase) to allow users with AOL 7.0 to enter chat. Anyone else experienced this and more importantly, anyone else figure a way to fix this?
Fred

The only way I got AOL users to be happy in chat is to tell them to use Internet explorer... Otherwise they login ok but cant post and get logged out before than can post

I was looking to integrate the phpmychat into my VB forum to keep the chat trolls to a minimum but so far the hacks seem unreliable

Doug
Reply With Quote
  #30  
Old 10-29-2002, 04:13 AM
ashy ashy is offline
 
Join Date: Dec 2001
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I too have the same problem with AOL users for the last few weeks. Anyone any idea of what the problem might be?
Reply With Quote
  #31  
Old 01-15-2003, 05:45 PM
svoec svoec is offline
 
Join Date: Mar 2002
Location: KY
Posts: 45
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hey guys...

I did some work, and came up with a 'chat entry page' for this hack.

Just add a link somewhere on your forum for CHAT - that points to this page . You can even link to this page from any html, ssi, shtml or whatever page.

What it does is transfer all the variables for you, and give the user some info about chat (how many people are in chat, who they are, what chat rooms are open) -- I also thought it would be a good place to display rules and stuff.

This also makes the hack easier to install, because you don't have to edit any of the templates or php files. (not really a big deal anyway)

this is very ugly, and is just for illustration purposes right now. Most of the code (99%) is from what version posted earlier, so I can't really take much credit for any of this...

this version does not show a list of available chat room, as I plan to control what rooms are open myself by editing this file. I generally only use one chat room. - but this part wouldn't be too hard to add. (I left the code needed for it in)

Maybe after I finish this, I will post a better looking version of it.--

Let me know if anyone is interested in seeing the finished entry page.
I am pretty new to this stuff, and I KNOW there is some extra code in there that I don't need (but I'm not done yet) -- I am open to sugestions of what else people would like to see in here.

You will have (AT LEAST) have to do some edits here, especially the login stuff at the bottom -(www.yoursite.com)
This script drops straight in your forum folder.
with a little html cleanup, this will be a nice piece!
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 12:23 AM.


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.05325 seconds
  • Memory Usage 2,324KB
  • 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
  • (2)bbcode_code
  • (2)bbcode_php
  • (3)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
  • (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