1

Topic: [Extension] Ajax Chat

Ajax Chat

This extension provides a simple chat system integrated into your PunBB Forum and does not require database, it works with text files saved on server, so, it is fast and requires very few server resources. This extension compatible with PunBB 1.4.2 and by default is hide from guest.


http://s11.postimg.org/kjww0s3er/chat.jpg

2 (edited by delta 2013-05-19 05:39)

Re: [Extension] Ajax Chat

Download
- Chat 1.0.zip
- Chat 1.1.zip

v1.1 log:
- Fixed time zone issue
- Fixed class App issue

3

Re: [Extension] Ajax Chat

Notes
Some part like set the max post chat, enable link post on chat, create more room, edit  room name, and so on still need manual editing on the setchat.php file. You should find some of this line code below and edit it as your need.

// Maximum number of post chat
define('MAXROWS', 10);             

// allows links in texts (1), not allow (0)
define('CHATLINK', 1);             

// For create more rooms, add lines with this syntax  $chatrooms[] = 'room_name';
// For edit the rooms name, just edit room one and room two with your desire name
$chatrooms = array();
$chatrooms[] = 'Room One';
$chatrooms[] = 'Room Two';

// Password used to empty chat rooms, just edit 12345 with your password
define('CADMPASS', '12345');

// Name of the directory in which are stored the TXT files for chat rooms
define('CHATDIR', 'chattxt');

Demo
- click it

Re: [Extension] Ajax Chat

Fatal error: Class 'App' not found in /home/*******/public_html/extensions/chat/index.php on line 6

got this error after installing the plugin and opening the chat page.

MyFootballCafe.com  is Now Online!

5 (edited by Rolex 2013-05-19 00:32)

Re: [Extension] Ajax Chat

How does one set the chat time? It's May 19 in my country already. But it still shows May 18 in chat.

6

Re: [Extension] Ajax Chat

SuperMAG wrote:
Fatal error: Class 'App' not found in /home/*******/public_html/extensions/chat/index.php on line 6

got this error after installing the plugin and opening the chat page.

Ok, I'll check it now. Thx for the feedback.

7

Re: [Extension] Ajax Chat

Rolex wrote:

How does one set the chat time? It's May 19 in my country already. But it still shows May 18 in chat.

Date and timestamp format by default is set into date('j F H:i'). And you rite, it still lack of timezone support. I will fixed it soon.

8

Re: [Extension] Ajax Chat

Here the update.
- Chat-1.1.zip

For the correct time zone, take a look at the class.ChatSimple.php. Find this lines below and edit the $hourdiff value with your country time zone.

        // date and timezones setting
        $hourdiff = "+7";  // by default is set into +7 a.k.a my country time zone
        $timeadjust = ($hourdiff * 60 * 60);
        $chatdate = gmdate("l, d F Y h:i a",time() + $timeadjust);

9

Re: [Extension] Ajax Chat

^^ Thank you.

Re: [Extension] Ajax Chat

It would be great to be able to password protect rooms.

11 (edited by lucatony 2013-06-09 23:00)

Re: [Extension] Ajax Chat

FANTASTIC !! could you do this for 1.3 also ?? lot of thanks !!!

12

Re: [Extension] Ajax Chat

eirikrye wrote:

It would be great to be able to password protect rooms.

So far, not yet possible to add password protect on single rooms, coz it will lock all whole room.

13

Re: [Extension] Ajax Chat

lucatony wrote:

FANTASTIC !! could you do this for 1.3 also ?? lot of thanks !!!

It should work for v1.3 too, just extract the file, open the manifest.xml file and edit the min version of this extension to your current installed PunBB version.

14 (edited by lucatony 2013-06-11 00:32)

Re: [Extension] Ajax Chat

delta wrote:
lucatony wrote:

FANTASTIC !! could you do this for 1.3 also ?? lot of thanks !!!

It should work for v1.3 too, just extract the file, open the manifest.xml file and edit the min version of this extension to your current installed PunBB version.

I did it and doestn work , but the installation was perfect , so the problem is the script wont work on 1.3 because it keep frozen sad

15 (edited by delta 2013-06-11 14:35)

Re: [Extension] Ajax Chat

lucatony wrote:

I did it and doestn work , but the installation was perfect , so the problem is the script wont work on 1.3 because it keep frozen sad

In my trial error at PunBB 1.3.6 and it still work, you can check on this  PunBB 1.3.6 demo site. I think, there are some conflict with other extension (probably its cause by js cache, since it merge all js things into single file). But I'm not pretty sure.

Do you able to mention your current installed extension, punbb ver and your forum link?
If I have some spare time, I'll try to check it out and thx for the report.

16 (edited by lucatony 2013-06-11 10:33)

Re: [Extension] Ajax Chat

delta wrote:
lucatony wrote:

I did it and doestn work , but the installation was perfect , so the problem is the script wont work on 1.3 because it keep frozen sad

In my trial error at PunBB 1.3.6 and it still work, you can check on this  PunBB 1.3.6 demo site. I think, there are some conflict with other extension (probably its cause by js cache, since it merge all js things into single file). But I'm not pretty sure.

Do you able to mention your current installed extension, punbb ver and your forum link?
If I have some spare time, I'll try to check it out and thx for the report.

thanks for the help !! i`ll check it
my version is 1.3.6 and the link of the forum is http://ps3pirata.com and the chat url http://ps3pirata.com/extensions/chat/index.php

big_smile

17 (edited by delta 2013-06-11 14:38)

Re: [Extension] Ajax Chat

lucatony wrote:

thanks for the help !! i`ll check it  big_smile

From your chat html source code, the define forum_root seem not matched and it cause some files to be 404/not found, eg:

http://ps3pirata.com/chatfiles/chatfunctions.js
should be
http://ps3pirata.com/extensions/chat/chatfiles/chatfunctions.js
etc

.
That why your chat room look like keep on frozen.

Open your index.php in chat extension folder and make sure the define forum_root (in line 2) is correct with your extension folder path, by default is set to:

define('FORUM_ROOT', '../../');

If it is correct then the file will no longer be 404/not found and your chat will be work like on this v1.3.6 demo.

18 (edited by lucatony 2013-06-11 21:41)

Re: [Extension] Ajax Chat

delta wrote:
lucatony wrote:

thanks for the help !! i`ll check it  big_smile

From your chat html source code, the define forum_root seem not matched and it cause some files to be 404/not found, eg:

http://ps3pirata.com/chatfiles/chatfunctions.js
should be
http://ps3pirata.com/extensions/chat/chatfiles/chatfunctions.js
etc

.
That why your chat room look like keep on frozen.

Open your index.php in chat extension folder and make sure the define forum_root (in line 2) is correct with your extension folder path, by default is set to:

define('FORUM_ROOT', '../../');

If it is correct then the file will no longer be 404/not found and your chat will be work like on this v1.3.6 demo.

I  did it , but that doestnt work . The pathway is wrong , so perhaps is another extension interfering . desesperated sad
2 hours testing things and nothing results

/domains/ps3pirata.com/public_html/extensions/chat

In the other hand the same root of a forum on 1.4 , /domains/ps4pirata.com/public_html/extensions/chat WORK PERFECT

Re: [Extension] Ajax Chat

finally I fix the problem
users can now chat !!!
I want to give you some ideas for the future version of this excelent chat , for example :

-Private rooms ( for moderators ) using a password o directly by rank
-Admin or moderator permissions to delete messages , links or ban users

Thank you very very mucha delta

20

Re: [Extension] Ajax Chat

I'm running Chrome 23.0.1271.97 and seem to have an issue with the scrollbar reverting to the latest chat after around 1 second while trying to read older chats at the top of the room. Any suggestions?

21

Re: [Extension] Ajax Chat

Sure, the ajax script is configured to make the scrollbar auto scroll to the latest/recent chat post. But you can play around with the css there, eg: to solve your issue you can customize the width property in the css file as your desire.

For example to your issue:

Find this line in the css file

#chats{margin:2px auto 3px 2px;[b]width:78%[/b];height:330px;border:1px solid #aaaafe;background-color:#fdfdfe;overflow:auto;padding:2px;box-shadow:.18em .18em .2em #a0a1d2;-webkit-box-shadow:.18em .18em .2em #a0a1d2;-moz-border-radius:.8em;-webkit-border-radius:.8em;-khtml-border-radius:.8em;border-radius:.8em}

In that line, you can edit the width css property into 100% to make it fit without scrolling. Else for the balance, the other optional is to set the width on #chatarea css tag into 100% too. So, your chat room will display fit to screen.

For other layout/display issue, all you can do is just to play arround with the css there.

22

Re: [Extension] Ajax Chat

Hi, how command kick/ban spammer users?

Re: [Extension] Ajax Chat

This extension works with Punbb 1.4.4 ?

24

Re: [Extension] Ajax Chat

zetrader wrote:

This extension works with Punbb 1.4.4 ?

Try this Live chat.

Re: [Extension] Ajax Chat

Use  2 in 1, Private Chat