The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
YAPIH (Yet Another PHPMyChat Integration Hack) 1.0 Details »» | |||||||||||||||||||||||||||
YAPIH (Yet Another PHPMyChat Integration Hack) 1.0
Developer Last Online: Nov 2002
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:
(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 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
|
Comments |
#2
|
||||
|
||||
i've seen plenty of referrals from vb.org and people fiddling around as test, but has no one actually tried this yet? i am surprised, because there are loads of people always requesting this very thing. :surprised:
|
#3
|
|||
|
|||
I cant believe there are no replies to this.
Well I have just installed it and so far so good. I did take a full mysqldump back up - perhaps your warnings put people off - so they should. I can hot link from forums to the phpmychat ok - all I would love to do now is have a dynamic list of live chat rooms from phpmychat, a list of users that are in there - Any ideas Please Also some tidying of course for my own site and wondering how best to integrate your "gender" for the user table into the registration process - what type of input is this supposed to be? And a lot of testing of course - user drop out restarts that sort of thing. Thanks, Steve www.southport.gb.com |
#4
|
||||
|
||||
There isn't by any chance any EASY way to integrate phpMyChat with the vB layout, is there?
|
#5
|
|||
|
|||
I found this one very clear to implement.
Just make sure you do a mysqldump backup first (eg as instructed in vbulletin.com Server - moving server - dummies version). This is the 3rd variant I have tried and if you want only VB registered users in the chat - it looks the best IMHO |
#6
|
||||
|
||||
I think this hack would get a lot more response, and perhaps become one of the more popular hacks, if a bit more in the way of instructions were provided, particularly on passing variables.
I uploaded the files in a /chat directory, no problem. I created/added the tables as outlines in chat.sql, no problem I added the variables to my phpincludes template, no problem. It's the link usage I have a problem with. I can create a link easy - I use a DHTML menu myself - and the chat index opens, but the variables for vb user/password (yes I am logged in) are not passed along. This is natural enough, I imagine, because when calling it from the front page of my site the phpincludes template is not read. I can't seem to get the username/password passed along even if I link to it within my forums. In particular, this statement: Quote:
There also needs to be a way to redirect to the user_not_logged_on template for folks who aren't registered. I could try taking a crack at it, but it might be easier if Version gave some pointers here. |
#7
|
||||
|
||||
ixian, the phpinclude template is always parsed, even for the front page of the site, if you include("$forumpath/global.php").
here's the chatstuff in my phpinclude template: PHP Code:
PHP Code:
here is the contents of the "menu_chat.php" script mentioned above: PHP Code:
|
#8
|
||||
|
||||
The only php pages on my site are the forums. The rest is done via ssi. I have a feeling something will get jacked but good if I try to included global.php on my non-php front page. I wish there was an easy way to add this as a forums addon, right now I can't make heads or tails of what you are doing with the phpinclude template.
|
#9
|
||||
|
||||
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. |
#10
|
|||
|
|||
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 |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|