News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

AjaxChat Integration (latest version 3.2.1)

Started by .HuNTeR., August 27, 2008, 12:59:06 AM

Previous topic - Next topic

TheListener

Quote from: JamesCameron on December 01, 2011, 03:09:58 PM
Can anyone tell me, why the shoutbox needs hell of long to load ?
Default server settings...

We need more information than this!!!

T3CHN0

Quote from: Brack1 on December 01, 2011, 06:48:12 PM
Quote from: maryclare on December 01, 2011, 09:00:33 AM
Thanks for the file location.  Unfortuneately it didn't work.

I am running SMF 2.01 and Ajax Chat 3.2.2b. 

If anyone knows a way to move the shoutbox to the bottom, I'd appreciate it.  I am running the default theme, and only have the shoutbox on the main page.

Moving the shoutbox to the bottom has been covered within the topic before.
can you add a link to where it is. I have been looking around the boards for some time and can't find it.

T3CHN0

Quote from: JamesCameron on December 01, 2011, 03:09:58 PM
Can anyone tell me, why the shoutbox needs hell of long to load ?
Default server settings...
Here is my FAQ with info I have collected and info I have found out my self
maybe something in this can help you out.... after downloading it, open it with your browser

cutedoctor

Quote from: hcfwesker on November 29, 2011, 05:15:19 PM
Quote from: cutedoctor on November 29, 2011, 12:24:27 PM
Thank you very much ,
Could you please make the following rooms:
1-Public room
2-Inner circle's room
3-Private room
4-Admin room

File uploaded


Thanks, again

I'm sorrry but I'm not going to add custom rooms/channels.  these will have to be boards already made on your forum.  Give me the board IDs to these boards, and I can possibly add therm.  Also, you only needed to post my quote one time, not 4.

Your file is attached.  Denied members changing their names, and made one Public Room only.

Thanks but after uploading to the server it resulted in this error :
QuoteParse error: syntax error, unexpected T_GLOBAL in /home/www/club4mdp.info/mdp/chat/lib/config.php on line 1

BTW those multiple replies were because of some technical issues in this forum , I removed them.

hcfwesker

#8524
Quote from: cutedoctor on December 02, 2011, 08:15:18 PM
Thanks but after uploading to the server it resulted in this error :
Parse error: syntax error, unexpected T_GLOBAL in /home/www/club4mdp.info/mdp/chat/lib/config.php on line 1

Strange error to pop up on line 1, unless I accidentally hit "f" instead of "cntrl F" to search, and it posted an f at the top of the file.

Reattached.  Sorry about that.

JamesCameron

Anyone already has a solution to let the user decide if the wants to hear the notification sounds on a new message ?
The chat has it, but the shoutbox doesn't.

T3CHN0

#8526
Anyone Interested I have made updates or would rather say changes to Ajax 3.2.2b

I made 3 Custom Ajax Chats and tested on 2.0.1 > ""Anyone using 1.1.X that could test it and let others know if it works would be great""

Ajax Chat 3.3A
Is simply the install on custom themes should no longer be a problem
File permissions chmod 755 settings AUTO correct them selves on a normal hosted server such a blue hosting.
The shrink bar shows your forums name as well before the word ShoutBox and copyright removed from shrink bar as there is copyright
in the chat window. the other 2 Ajax Chat B and C have this as well and more
Chat window in 3.3a is the same as it was before in 3.2.2b and shoutbox window syill uses css settings for shoutbox colors.


B and C are the same except C has no shrink bar. I have a dark theme and found chat looks better without it.
No one ever shrinks the window anyway so to me was a waist of having it shrink,
But could stay there as well as it might look good on other sites! That's the reason for B still having the shrink bar.
SOUTBOX
More Emoticon
insert image button
sound off or on button
scroll off or on button
emoticons show or hide button
color select button
shrink bar removed ON C ONLY
virtual keyboard
shoutbox backgrown changes color to suit the forum it's installed on

Chat Window
More Emoticon
New style buttons for more modern look
Emoticons show or hide
virtual keyboard
All board index Channels removed, only public channel. users can still make there own channel with there own user name.
NEW Image for header. can be changed to your own forums header logo but keep file width and height the same.

AJAX CHAT B

AJAX CHAT C


Settings
Auto file permissions on install to set \shoutbox\ and \chat\index.php chmod settings to 755.
Also in the admin control a new link to member permissions board.


Notice the first 4 options are darker, as the last 2 are not important to the mod

Permisions
all I changed was the words to look darker here as well to help newbies locate the permissions faster


All the support on this MOD still stands. I only made changes to the pre 3.2.2b
No install edits have changed and the parser for 3.2.1 still applies if needed.

All I did was tell the install to place the edits in other places to fix the custom theme install problems.
some custom themes will still miss out on the numbering of who is in chat under the time, But believe me you don't want it there anyway
as it also shows at the bottom of the main index board and can show on the chat button as well if you want by selecting the 5th option in settings.

I don't think I missed anything. but if I did I will add it later

Over the next few days if you wish to have a look at Ajax Chat C working then go to this link

Cheers, I hope you'll like the new edits

T3CHN0

Quote from: JamesCameron on December 04, 2011, 09:48:01 AM
Anyone already has a solution to let the user decide if the wants to hear the notification sounds on a new message ?
The chat has it, but the shoutbox doesn't.
my Ajax Chat B or C has the option you want but not A, if you want to add it to the chat you already have
find /shoutBox/lib/template/shoutbox.html and /chat/lib/template/shoutbox.html and add this edit

                                <input type="image" class="button" id="audioButton" alt="[LANG]toggleAudio[/LANG]" title="[LANG]toggleAudio[/LANG]" onclick="ajaxChat.toggleSetting('audio', 'audioButton');"/>

after the last <input.....line> on both them files

JamesCameron


MrNicotine

Thanks, Techno, I'll have a look at the "C" version. ;)
One question, I have one of my globals assigned as a chatmoderator,
but this is ofcourse not visible in chat userlist. Is there a way to make it clear in that window?
Like an image behind the name or another solution?

Thanks in advance

T3CHN0

#8530
your welcome; glade you like it

yes, you can make him a different colour. maybe can have an image... I will look into that right now for you
will get back to you in 20 minutes or so.
But if you also download the FAQ I included, it tells you in it how to change user colours
for moderators admins users and guests. but not for custom groups.. this is why I made in my edits
all members have the same colours as other members start asking for there own groups colours
and it can be done but you need to know how to edit your data base in cpanel to do it "and I don't" know how
to do that.


OK tested and yes. you can have an image for moderator but is a backgrown image.
you can make it stand out more my adding an image to site behind the moderators name
and change the moderators name colour to look better with the backgrown colour you made.
EDIT BOTH  /shoutBox/css/shoutbox.css and /chat/css/shoutbox.css

find
#ajaxChatContent .moderator {
    color:#C68E17;

Change to
#ajaxChatContent .moderator {
    color:#C68E17;
   background: url('../img/moderator.png') 90% -200px;
you can find colour codes here

you will need to make your image width 5pixels Height 20 Pixels
the 90% -200px will auto fill the behind area of the full name
so you don't need to bother with making an image that will be
the correct size it it will auto adjust it's self.

don't forget to make the image called moderator.png and save it to \chat\img and \shouBox\img

MrNicotine

#8531
Tech to the rescue!! :D

Thanks, Techno, I'll give this a go when I get home.

Abavagada

There was an error mentioned back on page 39 of this thread (2.5 years ago) that I was also getting.
"... should not be called statically, assuming $this from incompatible context in ..."
These probably occurs because of an upgrade in PHP versions, and while they should be fixable by changing a setting in the php.ini of the server to not use strict error checking, it doesn't work.

I have found a solution, and am posting it here for others that might be having this problem. I don't know if it should be put in the FAQ or changed in the package download.

The changes are simply putting the word "static" in front of the function declaration in 3 files in the forum\chat\lib\class directory:

AJAXChatString.php
static function subString
static function stringLength

AJAXChatEncoding.php
static function getSpecialChars
static function getRegExp_NO_WS_CTL
static function convertEncoding
static function htmlEncode
static function encodeSpecialChars
static function decodeSpecialChars
static function encodeEntities
static function decodeEntities
static function unicodeChar
static function removeUnsafeCharacters

AJAXChatFileSystem.php
static function getFileContents

Hope this helps some people.

Great MOD! Thanks!

T3CHN0

Cheers buddy. all support for the mod is awesome as the creator no longer supports this mod as far as I was told.

so your saying if I edit each file you mentioned like this

I will use AJAXChatString.php full contents as an example

<?php
static function subString
static function stringLength

/*
 * @package AJAX_Chat
 * @author Sebastian Tschan
 * @copyright (c) Sebastian Tschan
 * @license GNU Affero General Public License
 * @link https://blueimp.net/ajax/
 */
// Class to provide multibyte enabled string methods
class AJAXChatString {
    function 
subString($str$start=0$length=null$encoding='UTF-8') {
        if(
$length === null) {
            
$length AJAXChatString::stringLength($str);
        }        
        if(
function_exists('mb_substr')) {
            return 
mb_substr($str$start$length$encoding);
        } else if(
function_exists('iconv_substr')) {
            return 
iconv_substr($str$start$length$encoding);
        } else {
            return 
substr($str$start$length);
        }
    }
    function 
stringLength($str$encoding='UTF-8') {
        if(
function_exists('mb_strlen')) {
            return 
mb_strlen($str$encoding);
        } else if(
function_exists('iconv_strlen')) {
            return 
iconv_strlen($str$encoding);
        } else {
            return 
strlen($str);
        }
    }
}
?>


Abavagada

T3CHN0: not even that.. I just meant put the word "static" in front of the function itself:

class AJAXChatString {
    static function subString($str, $start=0, $length=null, $encoding='UTF-8') {
        if($length === null) { ......



T3CHN0

OK sweet, thanks for that.

I will test it soon, Might re-do all my mod edits and re-upload all 3 download's with the extra static
as already apart of the mod on install.

cheers

Abavagada

Sounds good.
If you are one that can make changes to the mod, I would suggest a small one in the chat template.
Put a limit like: style="width: 100px"  on the channel select option because if the channel names are very long, they will push the language selection box down to the next line.

T3CHN0

good idea. as my users only have short names I never seen that happen.
I will look into that as well. and correct it if I can... doesn't sounds like a big thing and should be easy to do.
cheers

Podologo



Is it possible to prevent chat users from deleting messages in the chat room?........ The reason I ask is that one of my members is being abused  by two others, and I believe they say their nasty remarks and then delete them............ I want to be able to see what has been said.

Any help on this will be greatly appreciated.

JP
The richest person is not the one who has the most, but the one who needs the least.

hcfwesker

Quote from: Podologo on December 12, 2011, 03:21:12 PM
Is it possible to prevent chat users from deleting messages in the chat room?

chat/lib/config.php

Find
// Allow/Disallow registered users to delete their own messages:
$config['allowUserMessageDelete'] = true;


change true to false.  chat admins and mods will still be able to delete posts, only ffects regular members in the chat.

Advertisement: