Version: , by humble
Developer Last Online: Feb 2004
Version: Unknown
Rating:
Released: 11-16-2001
Last Update: Never
Installs: 0
No support by the author.
Here's the pre-info...
Based upon the myphpchat 0.14.5 engine...
Using parts of the code scattered around on how to integrate it to use vb's user db......
THEN!!!
I added a field in the user table called 'phpchat'
Then, I added the code for the UserCP to enable or diable it per user. (this part works great so far)...
Then I created a new template, that contains a new iframe, and launches the myphpchat/index.php inside the iframe...
Then I added a new variable @ the bottom of the footer called $phpchatsystem....
Now... here's the tricky part..
in global.php, I need to add something like this:
PHP Code:
// Check the user's preference to enable the Chat System...
$phpchatcheck=$DB_site->query_first("SELECT phpchatsys FROM user WHERE username = '".$bbuserinfo['username']."'");
if ($phpchatcheck) {
eval("\$phpchatsystem = \"".gettemplate('phpchaton')."\";");
} else {
}
Or something that....
Checks to see if the phpchatsys field for you is on or not, and if it is....
it takes that variable in the footer section, and calls my phpchaton template data...
if it's not, it either calls a phpchatoff template that's empty (been there tried that), or just does nothing is fine...
Here' my problem....
Everything works like a champ, except.... if I turn it on in my user options, it appears for me... and everyone else (even though there setting is off) gets the newtemplate passed through my $phpchatsystem
Now when I just bypass the user settings, this thing is UNREAL... it sits in your footer in a new section, and everytime a registered user logs on, they are instantly authenticated, and brought in to the myphp session... and since it's in the footer... People can navigate around ANYWHERE in the board, and still have somewhat real time chat with every other member logged in.
It works great built in to the header, the footer, and called from a seperate IE window... and all work flawless....
Except... when trying to have it user selectable... Soon as I turn it on for one member, it turns it on for all...
-=-=-=-=-=-=-=-
Quick Summary
-=-=-=-=-=-=-=-
If- you have a variable in your footer, that you want converted to a template ... that is user specific.
AND- you have a new template you want added @ the end of the footer only if that user had the option enabled in his user profile...
AND- everything else is 100% working...
HOW- and WHAT code would you add (and is it in global.php, which I assumed, cuz of the way the: [ $newpmmsg and headnewpm ] are delt with )
To check query for this user, his setting, and if so, use the new template, if not, don't.
-=-=-=-=-=-=-
Thanks!!!!!!!!!
-=-=-=-=-=-=-
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
So to get started like I did... You must download phpmychat v0.14.5, and try to get his hack installed, so that you can use vb's users instead of the phpmychat's users.
His implementation, is external window only, and as the 214 replys summarize, it's not for the weak hearted.
After you get that working.... We're ready to start my vB hack(s) to get it 100% integrated...
I've just got a few more things I want to do to it too....
The AdminCP setting for Global Enable/Disable for the Internal system ONLY.
and the private channels being restricted by usergroup.... which is going to be a bit diffucult.... BUT they way i'm thinking of designing it.....
There will be a new menu in the AdminCP... Where you can have lets say 10 channel fields, and a checkbox for public or private.... and if the private is selected, it then looks at another field that basically looks for 'and require access to forumid="xx"'...
i.e.
The CP menu would have:
Channel Name: --------- Public or Private -------- Require Forum ID
=============================================
Boardname ---------------Public --------------------- None
Moderators ---------------Private -------------------- 12
Admins ---------------------Private---------------------13
Where forum 12 = my Moderators forum, where only the moderator's usergroup has access... and 13 = the admin's forum, where only the admin usergroup has access...
so you can continue to do your security as vb designed, but also allowed to use that check, to secure your Chat channels as well!