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