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
  #12  
Old 06-13-2002, 08:38 AM
BigJohnson BigJohnson is offline
 
Join Date: Nov 2001
Posts: 535
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This hack look amazing i am just having some trouble with one thing though. When i go to register and i register and click send info i get this data base error.

Database error: Invalid SQL: INSERT INTO user VALUES ('Nem1386', '1', '62fbd3c41f33c0b62996c15429cf55fa', 'Kyle', 'Walker', '', '', 'Nem@aol.com', 0, 'user', '',1023960753, '24.186.207.37', '')
MySQL error: 1136 (Column count doesn't match value count at row 1)
Session halted.

Does anyone no what i can do?
Reply With Quote
  #13  
Old 06-13-2002, 11:26 AM
version's Avatar
version version is offline
 
Join Date: Nov 2001
Posts: 22
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by solent
well i try it and i found it great although i have a couple of problems.

First my username and password is not directly passed when i click on the chat rooms although i did exactly as you said.

Second the chat room dose not open in a new window in the specified resolution that i passed to it.

Any ideas please
wherever you are calling the chat url from (whether in a vbb page or in a seperate page) you must make sure that $chatname and $chatpass are declared (i showed how i did it in the phpinclude template), and further that is it correctly passed to the actual chat script. this is totally up to you how you want to do this. i do it via an intermediary script (menu_chat.php), which then interprets $chatname as $username and $chatpass as $password. think about the sequence of how things are layed out and then decide how it must be done for your site, because there is no one-size-fits-all answer.

regarding the chatroom window, you must use a javascript popUp script if you want to specify resolutions.
Reply With Quote
  #14  
Old 06-13-2002, 06:13 PM
BigJohnson BigJohnson is offline
 
Join Date: Nov 2001
Posts: 535
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What about my prb up two posts.
Reply With Quote
  #15  
Old 06-13-2002, 06:58 PM
ixian's Avatar
ixian ixian is offline
 
Join Date: Oct 2001
Location: Denver, CO
Posts: 189
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by version
ixian,

ah, i understand what you mean now. what i can suggest is that you build a front page in PHP, since that can be coded in such a way as to work like SSI (ala include(), exec(), virtual(), etc.), then you can include the global.php and have the phpinclude parsed even for your front page.

what exactly are you trying to display on your front page? give me an example, and maybe i can help out with an alternative.
I'm not gonna rebuild my entire site design for a hack, no matter how good Converting to php would totally jack about 900 different things I built.

Here's all I want, maybe I am making this too difficult:

Have a link on my front page to the chat room that auto-logs someone in with their vb name and password, or redirects them to the registration page if not.

What I'm thinking is, I should create a seperate page for chat. Maybe even a vb template. Then, all the link on the front page does is take them to that page, where they can then log in, etc, etc.

Anyone have a quick vb template and a way to call it withen a php page?
Reply With Quote
  #16  
Old 06-14-2002, 06:32 AM
solent solent is offline
 
Join Date: May 2002
Posts: 66
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.

any other ideas.

by the way great site you have m8. aswome i have to admit that is the best board site i have ever since.

can i contact you to give me a couple of tips??
Reply With Quote
  #17  
Old 06-14-2002, 02:35 PM
version's Avatar
version version is offline
 
Join Date: Nov 2001
Posts: 22
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

sure
Reply With Quote
  #18  
Old 07-01-2002, 09:52 PM
ixian's Avatar
ixian ixian is offline
 
Join Date: Oct 2001
Location: Denver, CO
Posts: 189
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Gave up on the front page integration, just created a template for it in vb, and I link to it. Works pretty well now, so off to click the "install" button I go.

Couple quick questions Version:

[Edit - NM, found the answers. I'll post them for others]

Where do you set the page <TITLE> at? Dunno if you know this, but it's set to "ETM Chat" which probably works for you but doesn't apply to me

Answer - in the chat/lib/index.lib.php3 file, NOT chat/index.php3. You can change a lot of variables in the former file.

Which CSS file/variables do ya edit for changing the chat color settings (background, etc).

start_page.css.php3. There are many variables - to change the main window background, for example, it's the 'background-color' attribute of the class 'ChatBody'. Play around and enjoy.

Last (guess this is 3 questions )

Where do you change the default text users see when they first enter a room?

Still haven't got the answer to this one....yet

Thanks!
Reply With Quote
  #19  
Old 07-02-2002, 03:51 AM
solent solent is offline
 
Join Date: May 2002
Posts: 66
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i still have a problem parseing my variables to the chat javascript window.

everything else works fine.

although i included everything that version said in my phpinclude template.
Reply With Quote
  #20  
Old 07-20-2002, 08:21 AM
rstark rstark is offline
 
Join Date: May 2002
Location: Honolulu, HI
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by version
(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.
Okay, I'm a dummy. How do you do this? :dead:
Reply With Quote
  #21  
Old 07-22-2002, 04:07 AM
solent solent is offline
 
Join Date: May 2002
Posts: 66
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i am using linux and i do it through webmin. Very easy to execute and backup and administrate any my-sql database.

another solution for you is to do it with phpMyAdmin. it is very cool web based my-sql clinet tool
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:50 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.07197 seconds
  • Memory Usage 2,317KB
  • 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
  • (1)bbcode_code
  • (1)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
  • (3)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