MyBB Community Forums

Full Version: phpFreeChat v.1-1beta released
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
All,
If you are using/trying out the phpFreeChat plugin, please download the latest, updated beta release - 1.1-beta.  It's now posted on the MyBB Mods site.

To this site's admins (MusicalMidget and crew):
Could you please remove the older 1.0-beta download or rename it from "phpFreeChat Integration" to "phpFreeChat Integration (1.0-beta)"?  The new 1.1-beta is significantly better, and I'd hate to confuse anyone attempting to download the plugin into thinking the one labled "phpFreeChat Integration" is a release version that's better than the "phpFreeChat Integration (v1.1-beta)", which is actually the newer one.  Not putting a version # in the label of my original post was a faux paux on my part.  Thanks!
You can update and/or remove your submissions from your control panel located at http://mods.mybboard.com/usercp.php.
Hi, I have uploaded the new beta version overwriting the older one. I am having the problem now of being connected to the chat room and then being disconnected.

Any ideas?
Thanks Musical... I'll do that then.  Muchos gracias!

spikescot2005 Wrote:Hi, I have uploaded the new beta version overwriting the older one. I am having the problem now of being connected to the chat room and then being disconnected.

Any ideas?

Spikes, I would suspect that your phpFreeChat session is acting odd because the new session name is the same as the old one.  (You can change session names at the bottom of the list of options for my plugin in the Admin CP.)  However, rather than simply tweaking the name to something else, try flushing phpFreeChat's cache and seeing if that works.  To do so, simply go to its "data" directory and empty out both the "public" and "private" folders underneath.  To be doubly-safe, I would recommend disabling this plugin before doing that so hopefully no one is using it when you do.  Wink

As best I can tell, this cache dumping is an important process for phpFreeChat in its present state.  I do it regularly with my board everytime I make any change to my chat settings, etc.  In fact, if you look at the plugin's code, I downloaded and included some code that is supposed to do the cache flushing for you from the phpFreeChat forums site.  (It's commented out in there.)  I decided not to use it because I did NOT want my mod erasing anything on anyone's box.  I chose to just leave it in case another coder wanted to patch it in on their own.

Anyway, see if that helps you out.  Please let me know the result!
Ichi
Well that kinda worked. If i click on the lobby i seem to stay there if i dont i get disconected. Before when i joined the chat room i was automaticaly in the lobby but now i have to click on the lobby to enter and stay in that room.

Hope you get what im trying to say.

Just a few other things i have found -

In the admin cp if i change the ''phpFreeChat Title'' it doesn't change it.
If i change the phpFreeChat Default Channel should that change the name of the room?
Also i keep getting this message ''Maximum number of joined channels has been reached'' even though there is only one room.

Not had a chance to see if the private message room works yet but ill let you know.

Also how would i add another room?

Thanks for all your help and for this great mod.
spikescot2005 Wrote:Well that kinda worked. If i click on the lobby i seem to stay there if i dont i get disconected. Before when i joined the chat room i was automaticaly in the lobby but now i have to click on the lobby to enter and stay in that room. -- Sad Sorry about the connect issue. I'm not sure about this one.

Hope you get what im trying to say.

Just a few other things i have found -

In the admin cp if i change the ''phpFreeChat Title'' it doesn't change it. -- I'm suspecting caching, see my write-up below.

If i change the phpFreeChat Default Channel should that change the name of the room? -- yes... probably caching again.

Also i keep getting this message ''Maximum number of joined channels has been reached'' even though there is only one room. -- hmmm... sorry, that sounds phpFreeChat-related. I'm not sure what would cause it.

Not had a chance to see if the private message room works yet but ill let you know. -- this could still be problematic, and could be phpFreeChat related.

Also how would i add another room? -- I think you can just use a '/' command to do it. But, you may also be able to just create a comma-separated list of channel names in the Default Channels option in Admin CP. (I think it takes an array as a param.) I'll have to look.

Thanks for all your help and for this great mod.

(See my annotations in red above.)

Unfortunately Spikes, some of those questions (those relating to private channels, max number of channels, and potentially connect/disconnect issues) are more phpFreeChat related than plugin related.  I really can't say too much about those things since those are not issues I've come across.  (Well, I have seen the issues with private channels, and I'm hoping future releases of phpFreeChat address those.) I would encourage anyone having issues like these to check the phpFreeChat forums at http://www.phpfreechat.net/forum/. You may find the answers you need there.

That said, other issues you mentioned like changing information in the Admin CP and not seeing it effect your board are issues probably tied to syncing the plugin to the chat session.  My recommendation is to always flush your cache and rename your chat session everytime you make any change.  In the past, I've experienced similar anomalies on my board when I made changes and didn't dump the cache and/or rename the session.  If you do not reset the session, I suspect that the globalized instance of you chat session is not being updated.  (I assume your server is rarely rebooted.) Thus, even though you are making changes, nothing may be happening.

These sync issues - annoying as they are - are precisely why I chose to use phpFreeChat over many of the other open source chat sessions out there.  It's flat-text file back-end, though not as sexy as a database back-end, makes wiping it out and starting fresh MUCH easier.  If all this chat info was in a database and was not syncing properly, this would be a real pain. In fact, if you like, you can delete the entire chat directory and reinstall it without impacting any other part of your server.

In closing: Part of my hope for this plugin is that both the MyBB and the phpFreeChat communities will benefit from this integration. I'm FAR from a PHP guru (in fact, this plugin is my first foray into it! :mrgreenSmile. Yet, it's easy enough to learn that I hope many folks will try diggin' into the code and tweaking it to make things better. So, perhaps some of MyBB's php gurus will check out phpFreeChat and help it mature; while at the same time, perhaps some of the phpFreeChat coders will bring their talents to MyBB to help it to continue to improve as well.
Quick update:

I just double-checked this out on my board, and was able to change the title of the chat session, and make other changes, and get them to show up.  To do so, I had to do the following:

1.) disable the plugin
2.) wipe out the public and private directories (dump the cache)
3.) enable the plugin
4.) make changes in Admin CP
5.) rename the Server ID (this may be optional since the cache was just dumped, but it doesn't hurt.)

That caused my changes to show-up.

That said, I too am getting the "max channels reached".  hmmm... I'll try to investigate this a bit, but I would suggest peeking at the phpFreeChat boards for this.
DOH!  I just found a "bug" in my plugin that's causing your channel problem.

In short, when my co-admin and I were trying this out on our site we must have locked the channel down to 1 just to check functionality.  Apparently, that never got restored.  So, if you look at php file for my plugin, you will see:
				$params["max_channels"]			= 1;        // limit the number of joined channels tab to 3
				$params["max_privmsg"]			= 1;        // limit the number of private message tab to 1

These lines should be something like (the defaults offered by phpFreeChat):
				$params["max_channels"]			= 10;        // limit the number of joined channels tab to 10
				$params["max_privmsg"]			= 5;        // limit the number of private message tab to 5

Sad  Sorry.  If you make that change, you should be able to create multiple channels, etc.

Now, as I took a quick look at that, I realized that 1 of my assumptions regarding phpFreeChat may be incorrect.  I assumed that variables we did not set through the Admin CP or through my plugin would be set to their default values.  However, I'm no longer confident they are being initialized to a default value.  So, I'll work on a subsequent revision of this that will attempt to address EVERY variable.  Hopefully that will help those of you that are driving this little thing harder than I am.  Smile

Thanks for your inputs and sorry about the error.
Thanks for that i will have another read though later.

Sorry for this but i get another error message that pops up

Error: the XML response that was returned fron the server is invalid.
Received:
Hmm... as I said before I'm a bit of a newb-cake at PHP, XML, and friends. So, my debuggin' skills with these languages aren't up to snuff. Make sure when you're making the code mods that you don't lose track of a ';' or something like that. I made the exact mods I proposed to you to my own site and it fired up fine, so they should be ok.

Good luck... I'll work those settings, as well as a slew of others, into a new patch for this.

Hopefully I'll get to it this weekend.
I'm tempted to try your plugin, but I had a few questions first.
I am using the "stable" version of the freephpchat, not the beta version. Will your plugin work with both versions or just the newest one?
And when the chat is integrated into mybb, can only members use it? When a member goes into the chat, does it log them in with their username, or do they still have to enter a nickname?
Thanks
You can use any version of freephpchat.

Yes members can be set only to use the chat room this option is in the admin cp.

No members do not have to enter a nick name
Pages: 1 2