• 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

Upgrade to PFC 1.3 breaks my display of chat users in phpbb3

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

Post a reply
1 post • Page 1 of 1

Postby MarkHoward » Tue May 24, 2011 6:36 am

Hi all
I've had a routine working with PFC 1.2 for the last more than a year. It reads the Nicks of the users in the Chatrooms and displays them on the front page of the forum.
I've recently upgraded to PFC1.3 and now the routine doesn't read the chat users.
PHP version 5.2.17.
Website www.nzmotorhome.co.nz

The code is as follows. Does anyone know why this code would not work when used with 1.3 while it did with 1.2?

<?php
//require './../NZMotorhomeChat/src/pfcinfo.class.php';
require_once 'src/pfcinfo.class.php';
$info = new pfcInfo( md5("ForumChat") );
// NULL is used to get all the connected users, but you can specify
// a channel name to get only the connected user on a specific channel
$users = $info->getOnlineNick(NULL);

echo '<div align="center">';
$info = "";
$number = count($users);
$in_chat = "In Chatroom ";
foreach($users as $name)
{
$comma = ($counter == 0) ? ": " : ", ";
$counter++;
$in_chat = $in_chat . $comma . $name ;
}
$in_chat = ($number != 0) ? $in_chat : "In Chatroom : No one";

echo "</div>";
echo "<div>";
echo "<h3 align=left>".sprintf($in_chat)."</h3>";
echo "</div>";

?>

Any assistance will be greatly appreciated.
Last edited by MarkHoward on Tue May 24, 2011 6:39 am, edited 1 time in total.
MarkHoward
Member
 
Posts: 20
Joined: Sun Jul 19, 2009 12:47 am
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 6 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