PunBB Resource

Your ultimate PunBB resource!

Keywords:

    (Extended)

You are not logged in.

#1 2007-01-11 00:59:57

ngharo
Member
Registered: 2006-12-21
Posts: 51

AJAX Chat 1.2

Code:

##
##
##        Mod title:  AJAX Chat
##
##      Mod version:  1.2
##   Works on PunBB:  1.2.14
##     Release date:  01.10.07
##           Author:  Nicholas Hall [ngharo@gmail.com]
##
##      Description:  Adds a chat for registered users into PunBB that logs
##                    messages into a forum of your choosing.
##
##       Affects DB:  Yes
##
##   Affected files:  header.php
##                    style/imports/base.css
##
##       DISCLAIMER:  Please note that 'mods' are not officially supported by
##                    PunBB. Installation of this modification is done at your
##                    own risk. Backup your forum database and any and all
##                    applicable files before proceeding.
##
##          LICENSE: GNU GENERAL PUBLIC LICENSE
##                   See LICENSE file for more detail

Download here

Offline

 

#2 2007-01-11 01:02:08

DanielRJ
Member
Registered: 2006-11-25
Posts: 16

Re: AJAX Chat 1.2

Perfect Timing, Was about to Install the Older One. tongue .

Offline

 

#3 2007-01-11 01:02:29

ngharo
Member
Registered: 2006-12-21
Posts: 51

Re: AJAX Chat 1.2

For a demo please visit http://www.ngharo.com/forum/
Login with demo / demo


This release contains major code changes!  AJAX Chat now adheres to PunBB's $db object and methods.  Also, now the chat should integrate with any style flawlessly!  Also, existing users may notice that you no longer have to refresh after toggling the chat on smile  The biggest fix contained in this release is proper utf8 support!

Enjoy!

Offline

 

#4 2007-01-11 02:44:03

xxtubbyxx
Member
Registered: 2005-12-15
Posts: 168

Re: AJAX Chat 1.2

looks rather nice smile well done on this version.......only suggestion is to have it parse smilies wich would be very easy to implement.

Another thing to think about for the next version!

- A plugin to enable/disable certain features and options of their chat

- Work on sorting out any upcoming bugs that users may report

- Maybe work on not having to include so many files and try to integrate it more in to punbb's files.

Last edited by xxtubbyxx (2007-01-11 02:47:26)


Coming to you soon: FatalGamers

Offline

 

#5 2007-01-11 06:04:04

StevenBullen
Moderator
Registered: 2005-09-13
Posts: 300
Website

Re: AJAX Chat 1.2

Argh... If it was not for the prototype being included sad then this would of been great. Sorry I am not a lover of the prototype.js


Blog - Follow Me and FluxBB on Twitter

Offline

 

#6 2007-01-11 14:52:55

Zimmer92
Member
Registered: 2006-08-01
Posts: 156

Re: AJAX Chat 1.2

Ok, a few problems here.
where did the animation of the chat coming down go? sad

Another thing maybe to think about, is to implement an H2 header on top of the chat box so you can tell what it is and blends in more with the forum.

Maybe instead of the ugly "< >" brackets you could use something like this "»" or ":"

Just some suggestions.
By the way, in your readme you say to apply the CSS changes to the base.css, well I did and it did not work, it only works if I apply it to my style.

Last edited by Zimmer92 (2007-01-11 15:04:09)

Offline

 

#7 2007-01-11 15:19:31

Zimmer92
Member
Registered: 2006-08-01
Posts: 156

Re: AJAX Chat 1.2

Also, please tell me why you used the overflow as "scroll" ?
You should only see the scroll bars if there is scrolling to do. So you should have put it on "auto", at least that is my opinion on it.

Offline

 

#8 2007-01-11 16:25:10

ngharo
Member
Registered: 2006-12-21
Posts: 51

Re: AJAX Chat 1.2

xxtubbyxx wrote:

looks rather nice smile well done on this version.......only suggestion is to have it parse smilies wich would be very easy to implement.

Doh! This was working on last version, I'm not entirely positive why it's not working on 1.2.  Text is being passed through do_smilies().  Hrm..  I will look into this.

xxtubbyxx wrote:

A plugin to enable/disable certain features and options of their chat

Maybe..  Though, there are not many configurable features of the chat.  Unless you have some suggestions.

xxtubbyxx wrote:

Maybe work on not having to include so many files and try to integrate it more in to punbb's files.

I'd rather have more includes than sticking more code into punbb files.  IMO, it's much easier to install/uninstall this way.

StevenBullen wrote:

Sorry I am not a lover of the prototype.js

Can I ask what you don't like about it (other than the ruby on rails buzz sorrounding it)?

Zimmer92 wrote:

where did the animation of the chat coming down go? sad

I did not think the effect was worth the extra include file (effect.js) needed.

Zimmer92 wrote:

Another thing maybe to think about, is to implement an H2 header on top of the chat box so you can tell what it is and blends in more with the forum.

Not a bad idea.  I'll see how it looks.

Zimmer92 wrote:

Maybe instead of the ugly "< >" brackets you could use something like this "»" or ":"

I think i'll let the users change this to their likings.  Maybe I could impliment a plugin to configure this...

Zimmer92 wrote:

By the way, in your readme you say to apply the CSS changes to the base.css, well I did and it did not work, it only works if I apply it to my style.

That's odd.  Sounds like your style does not have this line: @import url(imports/base.css);

Zimmer92 wrote:

Also, please tell me why you used the overflow as "scroll" ?
You should only see the scroll bars if there is scrolling to do. So you should have put it on "auto", at least that is my opinion on it.

To tell you the truth, I was not aware of the auto attribute.  I've implemented this in my beta code.  While I love programming, I hate designing sad

Last edited by ngharo (2007-01-11 16:25:42)

Offline

 

#9 2007-01-11 16:46:47

Zimmer92
Member
Registered: 2006-08-01
Posts: 156

Re: AJAX Chat 1.2

I could help you on the design part.
Here, I will show you what it looks like with headers and inboxes.
go here
www.ktotheimmy.com/forum.php
Login account is
chatester
pass is
bwcMdQVa

If I cach anyone doing anything stupid with this account I will ban it.
This is just to show you the chat box.

Offline

 

#10 2007-01-11 17:24:26

ngharo
Member
Registered: 2006-12-21
Posts: 51

Re: AJAX Chat 1.2

The header looks pretty nice.  I would recommend putting the extra header HTML into include/user/modchat.htm rather than modchat.php (where im guessing you have it).  This way the header would be hidden if user does not have it on.

Offline

 

#11 2007-01-12 02:10:02

CMan
New member
Registered: 2007-01-06
Posts: 3

Re: AJAX Chat 1.2

I've already posted about this ugly bug (i wrote only 3 lines, but there is 9 of them now). I thout it's only in my forum, but now i see same thing in your demo:

http://img82.imageshack.us/img82/8416/captureif0.th.jpg

What can be the couse of this and how to fix it?

Offline

 

#12 2007-01-12 02:18:04

ngharo
Member
Registered: 2006-12-21
Posts: 51

Re: AJAX Chat 1.2

CMan, that is puzzling.  After each request for new messages, a value is updated that keeps track of the last message received.  This value is used when querying for new messages.

Which browser are you using?  And have you found a way to duplicate this problem on the fly?

Offline

 

#13 2007-01-14 05:45:40

bever
New member
Registered: 2007-01-14
Posts: 4

Re: AJAX Chat 1.2

modchatxmlrpc.php

You did not specify Mod AJAX Chat log forum id. You must edit modchatxmlrpc.php to continue!

Help!

Offline

 

#14 2007-01-14 06:15:32

ngharo
Member
Registered: 2006-12-21
Posts: 51

Re: AJAX Chat 1.2

Bever, I have replied to your email.  For anyone else confused by this, please look at step 4 of INSTALL.  You must take the ID number of the new forum created and edit $db_logForum_id in modchatxmlrpc.php to match.

I.E.
http://ngharo.com/forum/viewforum.php?id=2 is my chat log forum

in modchatxmlrpc.php I have:
$db_logForum_id = 2;

Last edited by ngharo (2007-01-14 06:16:29)

Offline

 

#15 2007-01-16 01:37:38

ngharo
Member
Registered: 2006-12-21
Posts: 51

Re: AJAX Chat 1.2

Thought I'd give an update of what I've been working on lately...

I've been trying to optimize AJAX Chat as much as possible.  In doing so, I have moved much of the server code into client side javascript.  So far, I have reduced the number of server calls by 50%!  I achieved this by returning a list of active users and new messages in one request.  In 1.2, AJAX Chat makes two RPC calls every two seconds... With a group of people chatting requests/sec could get pretty high.  Next version should significantly help out with this!

Also, I'm trying to achieve a GMail chat like feel.  Next version will have the chat statically aligned to the bottom right of the screen, like GMail.  Another neat feature is users who are idle by PunBB's standards (online.idle = 1 in DB) will be faded from the user list.

If you'd like to check out the current test build, please visit http://ngharo.com/punbb/index.php -- You may login as demo / demo.

* Note: Current builds do not support IE browser (if you're good at debugging IE javascript please shoot me an email!!)

Last edited by ngharo (2007-01-16 02:24:02)

Offline

 

#16 2007-01-18 07:41:50

Rekzai
Member
Registered: 2007-01-08
Posts: 13

Re: AJAX Chat 1.2

I was wondering if it would be possible to change the size of it because that's a little bulky for me ..

Offline

 

#17 2007-01-18 17:02:39

ngharo
Member
Registered: 2006-12-21
Posts: 51

Re: AJAX Chat 1.2

Sure is.  Change the "Height" value in the CSS located in style/imports/base.css.  Try 150px instead of 250px smile

Code:

#modchatoutputcontainer {
  float: left; 
  width: 79%;
  height: 250px;
  margin-bottom: 5px;
  overflow: scroll;
  overflow-x: hidden;
}

#modchatuserlistcontainer {
  float: right;
  width: 20%;
  height: 250px;
  margin-bottom: 5px;
  overflow: scroll;
  overflow-x: hidden;
}

Offline

 

#18 2007-01-18 19:56:45

Zimmer92
Member
Registered: 2006-08-01
Posts: 156

Re: AJAX Chat 1.2

Ngharo, I believe that if you put it at the top with a H2 span it would look much better than at the bottom.
People would forget it was there.
Sadly, putting it in a box and h2 span screws the whole chat up. hmm
Hopefully the new version wont. smile

Offline

 

#19 2007-01-18 21:08:24

ngharo
Member
Registered: 2006-12-21
Posts: 51

Re: AJAX Chat 1.2

Zimmer, I still believe that if you put the h2 HTML in the correct spot, it will not be screwed up.

Could you paste the extra HTML you'd like to see and i'll see if I can get it working right.

Offline

 

#20 2007-01-19 11:50:55

rapyd
New member
Registered: 2007-01-19
Posts: 2

Re: AJAX Chat 1.2

Thankyou ngharo, I'm a fan of prototype, great mod!

I've a problem with user list: number of users  0, no listing.
Chat log forum and messages via rpc are ok, but the users box write 0 users.

Do you have some suggestions?

http://www.weblogitalia.com/warriors/forum
demo demo

bye

Offline

 

#21 2007-01-20 05:18:28

xxtubbyxx
Member
Registered: 2005-12-15
Posts: 168

Re: AJAX Chat 1.2

you do not only place an h2 span that is why.....you must surround the entire ajax chat with a div block like this:

Code:

<div class="block"><h2><span>Chat here</span></h2><div class="box"><div class="inbox">//Ajax chat content all goes in here//</div></div></div>

i jsut typed this so there is no tabs or anything tongue just an example

and another suggestion.....maybe instead of having a "toggle chat" option at the top for displaying the chat......you could store a checkbox inside of their profile under the display options smile i think it would fit rather well with punbb, be easy to set up, and use less javascript wich intern would be more efficient as far as this forum software goes.

Last edited by xxtubbyxx (2007-01-20 05:37:35)


Coming to you soon: FatalGamers

Offline

 

#22 2007-01-20 11:43:34

rapyd
New member
Registered: 2007-01-19
Posts: 2

Re: AJAX Chat 1.2

OK ngharo I've found the problem.
You missed some {$db->prefix}  in modchatxmlrpc.php code  of activeUsers(), receive() and toggleChat() SQL strings.

fixed.
smile

Last edited by rapyd (2007-01-23 14:19:16)

Offline

 

#23 2007-01-21 10:16:02

Nullig
New member
Registered: 2007-01-21
Posts: 9

Re: AJAX Chat 1.2

Is it possible to toggle the chat window off?

Offline

 

#24 2007-01-21 21:43:52

Nullig
New member
Registered: 2007-01-21
Posts: 9

Re: AJAX Chat 1.2

OK, I found a couple of missing {$db->prefix}, which fixed the toggle on/off, but I still have 2 problems:

- It always shows number of users  0, no listing.
- Smilies don't show up in the chat window correctly, although they do in the log.

Thanks for the great mod.

Nullig

Offline

 

#25 2007-01-23 00:44:50

Mek
New member
Registered: 2007-01-22
Posts: 1

Re: AJAX Chat 1.2

Very nice mod. Only problem I had was the few missing prefixes in the toggleChat(), activeUsers() and receive().

Wishlist:
Some admin functions like kicking or banning users.
Usergroup restrictions.
A way to choose which BBcodes are allowed or toggle it completely off.

Offline

 

Board footer

Based on PunBB
© Copyright 2002–2005 Rickard Andersson

© Copyright 2004–2006 Kristoffer Jansson

User contributed files are property of their respective owners.