Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: , by humble humble is offline
Developer Last Online: Feb 2004 Show Printable Version Email this Page

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.

Comments
  #2  
Old 11-16-2001, 10:10 PM
humble's Avatar
humble humble is offline
 
Join Date: Nov 2001
Location: MidWest USA
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Examples of what i'm doing...

The new template. (with table based graphic borders around it)
Attached Files
File Type: (21.4 KB, 83 views)
Reply With Quote
  #3  
Old 11-16-2001, 10:13 PM
humble's Avatar
humble humble is offline
 
Join Date: Nov 2001
Location: MidWest USA
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

here's what the user cp looks like...
Attached Files
File Type: (21.4 KB, 330 views)
Reply With Quote
  #4  
Old 11-16-2001, 10:17 PM
humble's Avatar
humble humble is offline
 
Join Date: Nov 2001
Location: MidWest USA
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

here's what the phpchat system, enabled in the footer looks like.
Attached Files
File Type: (21.4 KB, 296 views)
Reply With Quote
  #5  
Old 11-16-2001, 10:30 PM
humble's Avatar
humble humble is offline
 
Join Date: Nov 2001
Location: MidWest USA
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i'm working on several other very cool & key features... (after I get past this bug)...

#1, a Admin CP option, to enable or disable it globally...

#2, usergroup settings, so you can have seperate chat channels secured by usergroup.

#3, tightning every /command settings to work with the vb userdb, cuz as the vb hack integration sits.. it works for using vb's user db... launched in a seperate window... But all the advanced commands still use the old code for users & authentication... so they all say, you must be registered, even though they're logged in, and chatting away...

#4, integrating the phpmychat smiley options, with vb's smileys...

#5, - #10 you'll have to wait and see
Reply With Quote
  #6  
Old 11-16-2001, 11:17 PM
humble's Avatar
humble humble is offline
 
Join Date: Nov 2001
Location: MidWest USA
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i've also tried this in my global.php

PHP Code:
 $phpchatcheck=$DB_site->query_first("SELECT phpchatsys FROM user WHERE userid=$bbuserinfo[userid]");
 if (
$phpchatcheck) {
 eval(
"\$phpchatsystem = \"".gettemplate('phpchaton')."\";");
 } else {
 eval(
"\$phpchatsystem = \"".gettemplate('phpchatoff')."\";");
 } 
right above

PHP Code:
$header='';
$footer=''
but still same thing, If i anyone turns it on, it's on for everyone... not just that user's page. and since it's in the footer, it turns on in every page, for every user.
Reply With Quote
  #7  
Old 11-17-2001, 01:37 AM
snyx's Avatar
snyx snyx is offline
 
Join Date: Oct 2001
Location: Vancouver (whistler.2010)
Posts: 556
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

holly hack'atistic humble!
incredible! simply incredible!

any beta to test or what man?
I would LOVE to help!

snyx
Reply With Quote
  #8  
Old 11-17-2001, 05:57 AM
DjSap DjSap is offline
 
Join Date: Nov 2001
Location: Stockholm, Sweden
Posts: 105
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

First go to the "# Start templates #" section in global.php and add your two templates in the line that beginns with "$templatesused=."

Then add this before the line "$newpmmsg=0;"

if ($bbuserinfo['phpchatsys']==1) {
eval("\$phpchatsystem = \"".gettemplate('phpchaton')."\";");
} else {
eval("\$phpchatsystem = \"".gettemplate('phpchatoff')."\";");
}

This presumes that value "1" in the user table means that it should be on.
Reply With Quote
  #9  
Old 11-17-2001, 05:46 PM
|DarkManX|'s Avatar
|DarkManX| |DarkManX| is offline
 
Join Date: Oct 2001
Posts: 161
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this is awesome..........any luck with this??????
Reply With Quote
  #10  
Old 11-17-2001, 08:18 PM
humble's Avatar
humble humble is offline
 
Join Date: Nov 2001
Location: MidWest USA
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

THAT worked like an ABSOLUTE champ!!!

I'm SOOO close to being done with this... (locally)...

so i don't know how long it would take, or If it's even 'acceptable' to package a hack instructions for this... but i'm looking in to it...

It works PERFECT.... THANK you SO very much... i've been fighting this for two days now!!!

Now my users can enable or disable it in there user cp... and i'm going to add a quick shortcut under the chat window that will instantly (one-click) disable it, and then enable it by default for everyone, and let them turn it off (via the new shortcut) or via the User Options menu...

I'm also working in a VERY simple Admin CP section, where you can globally turn it on / off.. (not adjusting the user's setting) just not running the code period if the admin flag says NO.

And then, a more complex setup, where you can add/remove public & private chat channels, and also restrict by usergroup for axs to the private channels....

(i.e. if you want board users in the default channel, but want a seperate channel for different usergroups/staff etc.)

And then... a final check of all the advanced chat commands like /join /invite /etcetc, so that they can be set by vb usergroup as well... (i.e. Users can't /invite, but mods can etc)

I can't tell you guys how much I love this so far, it's REALLY quite amazing, and secure, and integrated,... every part... shared users, new templates, new .php's, edited .php's, new tables in the db, but everything 100% is configurable/contrallable, and it works / looks SO good either as a seperate IE window, or built in your headers or footers, or just the main forum summary page, you decide....

it'll basically be, put $phpchatsys where ever you want the frame to apear, and set your channels in the CP....

Because of the massive complexity of the install, i'll be looking for someone to help build a install_php for it, so that we/I can get this to the masses (if / and when it's ready)...
Attached Files
File Type: (21.4 KB, 152 views)
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 11:13 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.04727 seconds
  • Memory Usage 2,335KB
  • Queries Executed 24 (?)
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
  • (3)bbcode_php
  • (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
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (4)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)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
  • postbit_attachment
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete