vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   [Request] Cool PHP ChatHack (https://vborg.vbsupport.ru/showthread.php?t=2894)

09-02-2000 03:25 PM

Hi all!

I need the ChatHack, which show me on the forum index page how many users in the chat.
All in one hack pls with ZIP file .. and so ...

Please .. i search all day long 4 it ...

ThX

09-02-2000 03:36 PM

I don't know if I ever have posted this but it is what I use for phpMyChat. This code goes in $index.php. Just make sure to insert this code before the section in index.php that relates to 'loggedinusers'

Code:

// Chatters Hack
 
  // Cleanup Old Users First!
  // 240 = Wait 4 mins before deleteing inactive users
 
  $DB_site->query("DELETE from c_users where u_time < ".(time() - 120)." and u_time > 0");
 
  // Ok Get Users and Stats
  $chatusers=$DB_site->query("SELECT username from c_users");
  if ($chatuser=$DB_site->fetch_array($chatusers))
  {

      $numchatusers = $DB_site->query_first("SELECT COUNT(username) as chatcount from c_users");
      $numchatuser = $numchatusers[chatcount];
 
      $chatusername=$chatuser[username];
      $activechatusers=$chatusername;
      while ($chatuser=$DB_site->fetch_array($chatusers))
      {
        $chatusername=$chatuser[username];
        $activechatusers.=", ".$chatusername;
      }
      if ($numchatuser == 1)
      {
        $numchatuser = "1 User";
      }
      else
      {
        $numchatuser = $numchatuser . " Users";
      }
  }
  else
  {
      $numchatuser = "No Users";
  }

$numchatuser will either be 1 User, X Users (more than 1), No Users
$activechatusers will be be the list of user names.

I access these two variables from the loggedinusers template.

09-02-2000 03:55 PM

hmm..

where can i find phpmychat ???
and , i have to install it normaly?
then your source in index.php ,
and all must work ?

09-02-2000 04:02 PM

Here ; http://www.phpheaven.net/phpmychat.php3

09-02-2000 04:14 PM

oh man,
that site doesn´t work .... blank site

shit .. where can i get the chat zip file....

09-02-2000 04:19 PM

Works for me but here is the file http://www.phpheaven.net/download.ph...hat-0.13.1.zip

09-02-2000 05:01 PM

thx ! :)

09-02-2000 05:12 PM

one question after all..

i have vbulletin installed in my mysql
can i install phpmychat in the same mysql?
without errors?

thx 4 answer!

09-02-2000 05:26 PM

yes

09-02-2000 05:27 PM

forget the question above.

so i installed the chat.

so now i desided, to insert the code in index.php
but if i do, i get an database error ! :(

and also i wondering, where the code is to login in the chat ! ?

please help ! thx


All times are GMT. The time now is 04:41 AM.

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.01907 seconds
  • Memory Usage 1,726KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete