• Forum
  • Doc
  • Screenshots
  • Download
  • Donate
  • Contributors
  • Contact
  • Follow @phpfreechat
  • DEMO
  • Board index ‹ Version 1.x branch ‹ General Support (v1.x)
  • Change font size
  • FAQ
  • Register
  • Login

phpFreeChat 1.0 Beta 5 and phpBB

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

Post a reply
5 posts • Page 1 of 1

Postby andrewbelcher » Mon Sep 11, 2006 3:40 am

Heya,

Sorry I've been so lame with the whole phpBB integration thing. I've been away quite a bit and had a lot of other work that unfortunately took priority. But I've not got a month before I go to university, and I thought it would be worth spending a few hours to actually finish this off.

Then I realised you'd re-written a lot of stuff for b5... Which meant I started from scratch a couple hours ago.

I've got all the chatroom stuff working, and now all I need to do is get the phpBB admin panel sorted, and the who's online thing.

With previous versions (this might be as old as 0.9.x), I was able to do a simple:
Code: Select all
$chatroom_users = array();
$dir_handle = opendir("chatroom/data/private/chat/s_vrforum/nicknames/");
while (false !== ($file = readdir($dir_handle)))
{
   if ($file == "." || $file == "..") continue; // skip . and .. generic files
   $chatroom_users[] = urldecode(base64_decode($file));
}

And that would return an array of the usernames...

However - this has changed since I last worked on it, and it doesn't seem as though this is still how it's done, as it now just returns a load of gibberish.

From reading other things, it appears you've now got an API to do this. However, as I'm wanting to access this from outside any form of phpFreeChat container (the index page of the forums to be precise), I don't want to have to include the whole phpFreeChat stuff.

Could you give me the code I need to do the who's online? So essentially I need some code that I can put into and php file that when given a specific directory (including the serverid path etc) will return all the usernames, and which room they are in.

I tried to actually find it within you're container, but I couldn't :(

Thankyou very much!

I'm going to go to bed now, and tomorrow I will do all the admin panel stuff, and then it's just this who's online thing to go and it's all done. I'll then post it all up and give links for the files etc...


Once there is a mysql container this will be very powerful with phpBB! Even now it will be to be honest! But once there is a mysql container, all these things will be much simpler. Hehe. Sorry... I'm a database boy at heart! And as I've learnt my php mainly through programming phpBB I don't really know much about file stuff... :p
andrewbelcher
Member
 
Posts: 32
Joined: Tue Feb 28, 2006 1:47 am
Top

Postby phpfreechat » Mon Sep 11, 2006 7:39 am

Ok so for the whoisonline feature you just need to know the serveur id (put it into $serverid) then just write that :
Code: Select all
require_once dirname(__FILE__)."/../src/pfcinfo.class.php"; // adjust the path to your phpfreechat installation
$info  = new pfcInfo( $serverid );
// 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);
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top

Postby andrewbelcher » Mon Sep 11, 2006 11:42 am

Fantastic!

I might have this finished by the end of today!
andrewbelcher
Member
 
Posts: 32
Joined: Tue Feb 28, 2006 1:47 am
Top

Postby andrewbelcher » Mon Sep 11, 2006 12:32 pm

Is there a list of params for 1.0? As the only list I've seen are the 0.9 list, and things have changed since then.

Cheers.
andrewbelcher
Member
 
Posts: 32
Joined: Tue Feb 28, 2006 1:47 am
Top

Postby phpfreechat » Mon Sep 11, 2006 12:34 pm

Not yet, as 1.x version is not stable I didn't wrote documentation.

However, you can look at this file for a parameter list oveview : src/pfcglobalconfig.class.php
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top


Post a reply
5 posts • Page 1 of 1

Return to General Support (v1.x)

Who is online

Users browsing this forum: No registered users and 9 guests

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