• Forum
  • Doc
  • Screenshots
  • Download
  • Donate
  • Contributors
  • Contact
  • Follow @phpfreechat
  • DEMO
  • Board index ‹ Version 1.x branch ‹ phpBB, Simple Machines Forum (SMF), and Forum Software (v1.x)
  • Change font size
  • FAQ
  • Register
  • Login

User count

Moderators: OldWolf, re*s.t.a.r.s.*2

Post a reply
1 post • Page 1 of 1

Postby Jacktips » Wed Sep 21, 2011 7:02 pm

I'm using at this moment on my site (MYBB forum) the Ajax Chat..but I would like to use phpfreechat....what's holding me ? at the moment I have a plugin which shows the users in the Ajax chat..... http://mods.mybb.com/view/ajax-chat-user-count
Image
Here is the basic code :

Code: Select all
<?php

/*
   Ajax-Chat User-Count Plugin for MyBB
   Copy this file into your plugins directory and activate in the admin control panel
*/

if(!defined("IN_MYBB")) {
    die("This file cannot be accessed directly.");
}

$plugins->add_hook('index_start','ajaxchatusercount',1000);
$plugins->add_hook('global_start','ajaxchatusercount',1000);

function ajaxchatusercount_info() {
   return array(
      'name'         => 'ajaxchatusercount',
      'description'   => 'AjaxChat User Count',
      'website'      => 'mailto:felix@walderdorff.org',
      'author'      => 'fwalderd',
      'authorsite'   => 'mailto:felix@walderdorff.org',
      'version'      => '0.1',
      'compatibility' => '16*'
   );
}

function ajaxchatusercount_activate() {
//   global $db, $mybb;
}

function ajaxchatusercount_deactivate() {
//   global $db,$mybb;   
}

function ajaxchatusercount() {
   global $ajaxchatusercount,$db,$mybb;
//Count Users in Ajax Chat and return a string: Chat(x)
   $query=$db->query("SELECT userID FROM ajax_chat_online");
   $usercount=0;
   while($record=$db->fetch_array($query)) {
      $usercount=$usercount+1;
   }
//If you want a different output, edit the line below
   $ajaxchatusercount="Chat <strong>(".$usercount.")</strong>";
}
?>

Can I modify or create something similar for phpfreechat????
Jacktips
New member
 
Posts: 5
Joined: Tue Jul 12, 2011 9:40 pm
Top

Post a reply
1 post • Page 1 of 1

Return to phpBB, Simple Machines Forum (SMF), and Forum Software (v1.x)

Who is online

Users browsing this forum: No registered users and 10 guests

  • Board index
  • The team • Delete all board cookies • All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
cron
Sign in
Wrong credentials
Sign up I forgot my password
.
jeu-gratuit.net | more partners
Fork me on GitHub