ElkArte Community

Extending Elk => Addons => Topic started by: wintstar on September 09, 2015, 05:48:10 am

Title: [ADDON] ElkArte Ajax Chat
Post by: wintstar on September 09, 2015, 05:48:10 am
ElkArte Ajax Chat
Integrates the Blueimp´s AJAX-Chat 0.8.8 (https://github.com/Frug/AJAX-Chat) into your ElkArte Forum

Addon: ElkArte Ajax Chat
Version: 1.0.1
Author: wintstar
Language: german informell, english
Themes: Elkarte, Light and Be Social!
ElkArte version: 1.0.6
Download: click here (http://scaricare.de/index.php/downloads)
Plugin: BlueFeeling Theme Plugin (http://scaricare.de/index.php/13-elkarte/4-bluefeeling-theme-plugin)

Description:
This this is a port of my mod SMF Ajax Chat. The AJAX Chat is latest version and was further adapted to ElArte. Many Thanks an Emanuel and Spuds for help. It is no longer possible, if a user does not have the necessary permissions to access with a direct link to the Ajax Chat on this. Also, it is not possible, if the Board in maintenance mode to access the AJAX Chat. Permissions can be now individually configured for the Member groups. Chat moderation can also individually be configured.

AJAX Chat Features:
Spoiler (click to show/hide)

ElkArte Addon Functions
Shoutbox
Chat
Users in chat
* Can be in the Administrator-Center enables / disables.
Permissions, individually for each group

Changelog 1.0.1
Bug fixed

Planned Functions for ElkArte Addon
 
Planned debugging in the future

If not implemented
   
This modification is subject to the licenses

Screenshots:
Title: Re: [ADDON][BETA] ElkArte Ajax Chat
Post by: Spuds on September 09, 2015, 08:04:56 am
Looks AWESOME !
Title: Re: [ADDON][BETA] ElkArte Ajax Chat
Post by: emanuele on September 09, 2015, 08:20:31 am
Great job! :D
Title: Re: [ADDON][BETA] ElkArte Ajax Chat
Post by: wintstar on September 10, 2015, 12:20:36 pm
I have a probleme with the adminarea. The Configuration section of the chat is not displayed. Hook integrate_admin_areas and integrate_sa_modify_modifications are installed.

What have I overlooked?

Chat.integrate.php
Code: (php) [Select]
    public static function integrate_admin_areas(&$admin_areas)
    {
    global $txt;

    loadlanguage('Chat');
    $admin_areas['config']['areas']['addonsettings']['subsections']['chat'] = array($txt['chat']);
    }
    
    public static function integrate_sa_modify_modifications($sub_actions)
    {
        $sub_actions['chat'] = array(
            'dir' => SUBSDIR,
            'file' => 'Chat.subs.php',
            'function' => 'ModifyChatSettings'
        );                
    }
Chat.subs.php
Code: (php) [Select]
<?php
/**
* ElkArte Ajax Chat
*
* @author  wintstar
* @license BSD http://opensource.org/licenses/BSD-3-Clause
* @license Bluimp's AJAX Chat is released under a Modified MIT License (MIT) https://raw.githubusercontent.com/Frug/AJAX-Chat/master/chat/license.txt
*
* @version 0.0.1beta
*/

if (!defined('ELK'))
die('No access...');

/**
* ModifyChatSettings()
*
* - Defines our settings array and uses our settings class to manage the data
*/
function ModifyChatSettings()
{
    global $txt, $scripturl, $context;

    loadlanguage('Chat');
    $context[$context['admin_menu_name']]['tab_data']['tabs']['chat']['description'] = $txt['chat_desc'];

    // Lets build a settings form
    require_once(SUBSDIR . '/SettingsForm.class.php');

    // Instantiate the form
    $chatSettings = new Settings_Form();

    $config_vars = array(
        array('check', 'shoutabove_enabled'),
        array('check', 'anypageshout_enabled'),
        array('check', 'shoutbelow_enabled'),
        array('check', 'chatpage_enabled'),
        array('check', 'chatpopup_enabled'),
        array('check', 'chatbutton_enabled'),
        array('check', 'chatheader_enabled'),
        array('check', 'chatuser_enabled'),
    );

    // Load the settings to the form class
    $chatSettings->settings($config_vars);

    // Saving?
    if (isset($_GET['save']))
    {
        checkSession();
        Settings_Form::save_db($config_vars);
        redirectexit('action=admin;area=addonsettings;sa=chat');
    }

    // Continue on to the settings template
    $context['post_url'] = $scripturl . '?action=admin;area=addonsettings;save;sa=chat';
    $context['settings_title'] = $txt['chat'];

    Settings_Form::prepare_db($config_vars);
    return;
}
Title: Re: [ADDON][BETA] ElkArte Ajax Chat
Post by: emanuele on September 10, 2015, 04:01:12 pm
You are not using a class, so it's useless to use "public static function", use just "function" (even though I would suggest you to wrap these functions into a class because in the future it will become handy).
Actually, if this is exactly what you have in the file, it should generate a syntax error, so most likely you have a:
Code: [Select]
class Something
{
    public static function integrate_admin_areas(
[...]etc.
In that case, the "hook" should be:
Something::integrate_admin_areas
Title: Re: [ADDON][BETA] ElkArte Ajax Chat
Post by: wintstar on September 10, 2015, 04:10:05 pm
I have this change. But, not work. Hooks are all in green display. All active.

sources/ChatIntegrate.php
Code: (php) [Select]
<?php
/**
 * ElkArte Ajax Chat
 *
 * @author  wintstar
 * @license BSD http://opensource.org/licenses/BSD-3-Clause
 * @license Bluimp's AJAX Chat is released under a Modified MIT License (MIT) https://raw.githubusercontent.com/Frug/AJAX-Chat/master/chat/license.txt
 *
 * @version 0.0.1beta
 */

if (!defined('ELK'))
    die('No access...');


function ias_chat(&$actions)
{
    $actions['chat'] = array('Chat.controller.php', 'Chat_Controller', 'action_chat');
}

function ica_chat(&$current_action)
{
    if ($current_action === 'chat')
    {
        if (empty($_REQUEST['action']))
            $current_action = 'chat';
    }
        
}

function imp_chat(&$buttons, &$menu_count)
{
    global $context, $txt, $boardurl, $scripturl;
        
    loadLanguage('Chat');
        
    function chatOnlineUsers(){
    global $scripturl, $txt, $user_info, $modSettings;

    $db = database();

    $userIDs = array();
    $request = $db->query('', '
        SELECT userID
        FROM {db_prefix}chat_online    WHERE NOW() <= DATE_ADD(dateTime, interval 2 MINUTE)' ,
        array()
        );
        while ($row = $db->fetch_assoc($request)) {
            array_push($userIDs, $row['userID']);
        }
            $db->free_result($request);
            return array_unique($userIDs);
        }
        
       $num = !empty($modSettings['enableChatButtonNo']) ? 0 : count(chatOnlineUsers());
       $chatButton = $txt['chat_index'];
       $chatButton .= ($num > 0) ?  ('('.$num.')') : '';        

        $buttons = elk_array_insert($buttons, 'unread', array(
            'chat' => array(
                'title' => $chatButton,
                'href' => $scripturl . '?action=chat',
                'data-icon' => '',
                'show' => $context['allow_admin'],
            ),
    ));    
}

function ihp_chat()
{
    // Load the Chat Help file.
       loadLanguage('Chat');
}  
    
function iaa_chat(&$admin_areas)
{
    global $txt;
        
    loadlanguage('Chat');
    isAllowedTo('admin_forum');
    $admin_areas['config']['areas']['addonsettings']['subsections']['chat'] = array($txt['chat']);
}
    
function imm_chat($sub_actions)
{
    $sub_actions['chat'] = array(
    'dir' => SOURCEDIR,
    'file' => 'ChatIntegration.php',
    'function' => 'ModifyChatSettings'
    );                
}
    
/**
* ModifyChatSettings()
*
* - Defines our settings array and uses our settings class to manage the data
*/
function ModifyChatSettings()
{
    global $txt, $scripturl, $context;

    loadlanguage('Chat');
    $context[$context['admin_menu_name']]['tab_data']['tabs']['chat']['description'] = $txt['chat_desc'];

    // Lets build a settings form
    require_once(SUBSDIR . '/SettingsForm.class.php');

    // Instantiate the form
    $chatSettings = new Settings_Form();

    $config_vars = array(
        array('title', 'chat_Settings'),    
        array('check', 'chat_above_enabled'),
        array('check', 'chat_anypage_enabled'),
        array('check', 'chat_below_enabled'),
        array('check', 'chat_page_enabled'),
        array('check', 'chat_popup_enabled'),
        array('check', 'chat_button_enabled'),
        array('check', 'chat_header_enabled'),
        array('check', 'chat_user_enabled'),
    );

    // Load the settings to the form class
    $chatSettings->settings($config_vars);

    // Saving?
    if (isset($_GET['save']))
    {
        checkSession();
        Settings_Form::save_db($config_vars);
        redirectexit('action=admin;area=addonsettings;sa=chat');
    }

    // Continue on to the settings template
    $context['post_url'] = $scripturl . '?action=admin;area=addonsettings;save;sa=chat';
    $context['settings_title'] = $txt['chat'];

    Settings_Form::prepare_db($config_vars);
    return;
}             



function ilp_chat(&$permissionGroups, &$permissionList, &$leftPermissionGroups, &$hiddenPermissions, &$relabelPermissions)
{  
    global $context, $txt, $helptxt, $modSettings;
        
    loadLanguage('Chat');
        
    $permissionList['membergroup']['chat_admin'] = array(false, 'chat', 'chat');
    $permissionList['membergroup']['chat_moderator'] = array(false, 'chat', 'chat');
    $permissionList['membergroup']['chat_view_chatpage'] = array(false, 'chat', 'chat');
    $permissionList['membergroup']['chat_view_talkbox'] = array(false, 'chat', 'chat');
    $permissionList['membergroup']['chat_view_chatuser'] = array(false, 'chat', 'chat');

    $permissionGroups['membergroup'][] = 'chat';

    $leftPermissionGroups[] = 'chat';
}

function ips_chat()
{
    global $context, $txt, $helptxt, $modSettings;
        
    loadLanguage('Chat');

    // Guests shouldn't be able to have any portal specific permissions.
    $context['non_guest_permissions'] = array_merge($context['non_guest_permissions'], array(
        'chat_admin',
        'chat_moderator',            
    ));
}

sources/controllers/Chat.controller.php
Code: (php) [Select]
<?php
/**
 * ElkArte Ajax Chat
 *
 * @author  wintstar
 * @license BSD http://opensource.org/licenses/BSD-3-Clause
 * @license Bluimp's AJAX Chat is released under a Modified MIT License (MIT) https://raw.githubusercontent.com/Frug/AJAX-Chat/master/chat/license.txt
 *
 * @version 0.0.1beta
 */

if (!defined('ELK'))
die('No access...');

class Chat_Controller extends Action_Controller
{
public function pre_dispatch()
{
global $modSettings;

// Some things we will need
loadLanguage('Chat');

// Are we allowed to view the map?
isAllowedTo('chat_view_chatpage');
}   
   
public function action_index()
{
return $this->action_chat();
}

public function action_chat()
{
global $txt, $context, $scripturl;

loadLanguage('Chat');
        loadCSSFile('chat.css');
loadTemplate('Chat');
$context['sub_template'] = 'chat';
        $context['page_title'] = $context['forum_name'] . ' - ' . $txt['chat_index'];
// Build the link tree.
$context['linktree'][] = array(
'url' => $scripturl . '?action=chat',
'name' => $txt['chat'],
);       
}
   
   
   
}


Title: Re: [ADDON][BETA] ElkArte Ajax Chat
Post by: emanuele on September 10, 2015, 04:26:24 pm
Sorry, but I have some difficulties reading the files one at a time. :-[ Without the whole package I'm out of the games. :-[

Have a look at:
https://github.com/emanuele45/WordReplacer
it should give some hints.
Title: Re: [ADDON][BETA] ElkArte Ajax Chat
Post by: wintstar on September 10, 2015, 04:30:24 pm
Thanks, that helps me continue.   :)


Title: Re: [ADDON][BETA] ElkArte Ajax Chat
Post by: wintstar on September 11, 2015, 09:47:05 am
Have solved the problem. The hook integrate_sa_modify_modifications was too much.

 :)  Little by little I understand the hook system
.

Title: Re: [ADDON][BETA] ElkArte Ajax Chat
Post by: wintstar on September 14, 2015, 03:15:30 pm
Short update   :)

Admin area, Permission settings area and Shoutbox above an below the Board Categories creates.

New Screenshots, looking up in the first post.  :)
Title: Re: [ADDON] ElkArte Ajax Chat
Post by: wintstar on September 21, 2015, 01:07:59 pm
Addon is released! :)

Download, see first post.
Title: Re: [ADDON] ElkArte Ajax Chat
Post by: emanuele on September 21, 2015, 02:22:41 pm
Great job winstar! :D
Title: Re: [ADDON] ElkArte Ajax Chat
Post by: NetFlag on September 22, 2015, 01:26:16 am
Fabulous! Thank you! :)
Title: Re: [ADDON] ElkArte Ajax Chat
Post by: Spuds on September 22, 2015, 08:35:04 am
QuoteAddon is released! :)
Congratulations !
Title: Re: [ADDON] ElkArte Ajax Chat
Post by: Wizard on September 22, 2015, 10:43:25 am
:thumbsup:
Title: Re: [ADDON] ElkArte Ajax Chat
Post by: anagnam on October 21, 2015, 11:04:50 am
@wintstar I tried to install your addon but an error occured. Any idea to fix it? thanks
Title: Re: [ADDON] ElkArte Ajax Chat
Post by: wintstar on October 21, 2015, 11:59:35 am
This is a known bug of Blueimp Ajax Chat. Sometime there has it a change with "datetime" in MySQL and did not resolve until today by the developers of the Ajax Chat. I had corrected this. Which MySQL version you have?

For the weekend I am going to post a solution.
Title: Re: [ADDON] ElkArte Ajax Chat
Post by: anagnam on October 21, 2015, 11:46:19 pm
@wintstar  yes its version 5.5.32-5.5.42
Title: Re: [ADDON] ElkArte Ajax Chat
Post by: wintstar on October 23, 2015, 12:40:37 am
Here's the fix:
Unpack the original package ElkAjaxChat_1.0.0.zip. Delete the install.php. Download the install.zip and unpack this.  And add this install.php in the package. Pack the package in a Zip package, and you can install the addon in your board.

I would suggest you to update your database. Because this fix is for an outdated database, I will not update the addon to a new version. The fix has been tested with on your database versions and worked on my Test Area.

Fix for Bug with Database error "Invalid default value for 'dateTime'":
Title: Re: [ADDON] ElkArte Ajax Chat
Post by: anagnam on October 23, 2015, 03:18:31 am
@wintstar Ive isntall the addon but I recieved this error inside that chat window. What does it mean?
Title: Re: [ADDON] ElkArte Ajax Chat
Post by: wintstar on October 23, 2015, 03:55:13 am
If you get a 500 Connection error you might have to set your file permissions as well.
There are 1 folder (talk) for ElkArte Ajax Chat.
For ElkArte Ajax Chat be sure to change the file permissions (CHMOD) /talk/ and subdirectories to 755.

HTTP Error 500 Internal server error (http://www.checkupdown.com/status/E500.html)

If it still this does not work, update MySQL and PHP on your server to the current version.



Title: Re: [ADDON] ElkArte Ajax Chat
Post by: anagnam on October 23, 2015, 04:18:37 am
@wintstar verything was set to 755 and still the error persist. But I change index.php to 755 and the error was gone. Btw, when I enable the chat, the chat shows up as shoutbox. is it the same as chat or there is a setting to change? also I cant find the setting to enable the menu. can you help?
Title: Re: [ADDON] ElkArte Ajax Chat
Post by: anagnam on October 23, 2015, 04:19:59 am
@wintstar  also when you refresh the page, the chat in the textbox dissappears. but when I typed something, it shows up. is this a glitch?
Title: Re: [ADDON] ElkArte Ajax Chat
Post by: wintstar on October 23, 2015, 05:46:55 am
Yes it is true the activation to chat page is missing. Since I have inserted an incorrect file the in the package . There will be give a new version. The other error you are reporting, I can not fix. Since, in my view an error of your server configuration. Some Hoster block chat system on their servers.

Requirements for Blueimp Ajax Chat (https://github.com/Frug/AJAX-Chat)
Server-Side Client-Side
PHP >= 5 Enabled JavaScript
MySQL >= 4 Enabled Cookies
Ruby >= 1.8 (optional) Flash Plugin >= 9 (optional)





Title: Re: [ADDON] ElkArte Ajax Chat
Post by: anagnam on October 23, 2015, 05:59:40 am
ok thanks for the update @wintstar how do I enable the chat instead of the shoutbox?
Title: Re: [ADDON] ElkArte Ajax Chat
Post by: anagnam on October 23, 2015, 06:02:29 am
@wintstar btw the text area where you type the text is not responsive. maybe you could also fix that in your next version.
Title: Re: [ADDON] ElkArte Ajax Chat
Post by: wintstar on October 23, 2015, 06:11:09 am
I'm just going to rebuild the package. Will then still test the package. Download sources.zip, unzip the package. Include the Sources folder in the root of your board. Overwrite the existing file ManageTalk.controller.php. 

I will provide an update on Version 1.0.1 issue at the latest next week. @ anagnam many thanks for error Message :)



Title: Re: [ADDON] ElkArte Ajax Chat
Post by: wintstar on October 23, 2015, 06:14:18 am
Quote from: anagnam – @wintstar btw the text area where you type the text is not responsive. maybe you could also fix that in your next version.
I'll look into it, but am assuming that the error is caused by your Server Configuration.

EDIT
@anagnam
What stands in the error log? Admin button => Error Log
Create a screenshot please from an admin center Main => Support & Credits = Support Information


Example


Title: Re: [ADDON] ElkArte Ajax Chat
Post by: anagnam on October 23, 2015, 06:29:17 am
@wintstar  I have overwriten the file ManageTalk.controller.php and I got this error.
Title: Re: [ADDON] ElkArte Ajax Chat
Post by: anagnam on October 23, 2015, 06:47:17 am
@wintstar here is the file you requested.
Title: Re: [ADDON] ElkArte Ajax Chat
Post by: anagnam on October 23, 2015, 06:54:56 am
@wintstar just as a quick hack, I put an inline style in the text area so it respond to its parent like so:

Code: [Select]
<textarea id="ajaxChatInputField" style="width: 100%;"
Title: Re: [ADDON] ElkArte Ajax Chat
Post by: wintstar on October 23, 2015, 07:03:48 am
The chat is created on the original contained Theme. In other Theme used, the design adjustments themselves must be made.



Title: Re: [ADDON] ElkArte Ajax Chat
Post by: anagnam on October 23, 2015, 10:42:43 am
Hi @wintstar do you know where can I adjust  the shoutbox? currently its default to 10 shouts only and I want to increase it.
Title: Re: [ADDON] ElkArte Ajax Chat
Post by: wintstar on October 23, 2015, 12:10:08 pm
Look in the Ajax Chat Tips, and this:


QuoteThe AJAX Chat contains two additional configuration files:
root*/chat/lib/config.php - This file contains the server-side (PHP) settings
root*/chat/js/config.js - This file contains the client-side (JavaScript) settings
Do you mean?
root*/chat/lib/config.php
Code: (php) [Select]
// Max number of messages to display on each request:
$config['requestMessagesLimit'] = 10;

Title: Re: [ADDON] ElkArte Ajax Chat
Post by: anagnam on October 24, 2015, 02:17:10 am
@wintstar yes thats it. thanks! btw, im curious to know if the messages are deleted after say 10 (which is the default) or is it saved somewhere? where I can archive it on a daily basis just for archive purposes.
Title: Re: [ADDON] ElkArte Ajax Chat
Post by: wintstar on October 24, 2015, 02:55:15 am
To my knowledge, there is no archiving system for Blueimp Ajax Chat. You can issue to the support for Blueimp Ajax Chat, click here. (https://groups.google.com/forum/#!forum/ajax-chat)
Title: Re: [ADDON] ElkArte Ajax Chat
Post by: anagnam on October 24, 2015, 04:28:19 am
@wintstar thanks but do you know where in the folder it saves the messages?
Title: Re: [ADDON] ElkArte Ajax Chat
Post by: anagnam on October 24, 2015, 05:00:29 am
@wintstar is it possible to set that members can view the shoutbox even if they are inside a forum?  currently if members are in the homepage only they can see the shoutbox, but if they are inside a forum, its not visible.
Title: Re: [ADDON] ElkArte Ajax Chat
Post by: emanuele on October 24, 2015, 08:31:50 am
Judging by the database structure (and the fact there is a database) I'd guess messages are saved.
Title: Re: [ADDON] ElkArte Ajax Chat
Post by: wintstar on October 24, 2015, 08:33:36 am
Messages are stored in the database "*_chat_messages".

View the shoutbox
Look under Permissions:
Title: Re: [ADDON] ElkArte Ajax Chat
Post by: anagnam on October 25, 2015, 01:11:31 am
@wintstar yes, I already set the permission thats why only logged in members can view the chat in the homepage. but even logged in members if they are inside one of the forum, the chat is not visible. there is not settings that I can set in the permission that will allow logged in members to view the chat inside a forum. only in the homepage.
Title: Re: [ADDON] ElkArte Ajax Chat
Post by: wintstar on October 25, 2015, 03:57:58 am
You can read it clearly in the description
Quote from: click here (http://www.elkarte.net/community/index.php?topic=2929.0)Shoutbox

    Enable shoutbox above at the Board Categories*
    Enable shoutbox below at Board Categories*

Board Categories is the main forum page (Homepage). Within the forums, the shoutbox is not visible. This function does not exist.   And the chat can be seen only on the chat page. Provided that the corresponding thereto permissions are set correctly.


Title: Re: [ADDON] ElkArte Ajax Chat
Post by: wintstar on October 28, 2015, 01:59:59 pm
Update is in progress. The progress can follow her here => My Projects (http://scaricare.de/index.php/projekte)
Title: Re: [ADDON] ElkArte Ajax Chat
Post by: wintstar on November 01, 2015, 01:43:59 pm
Addon updated to version 1.0.1
Changelog 1.0.1

Bug fixed

Download, see first post.
Title: Re: [ADDON] ElkArte Ajax Chat
Post by: wintstar on December 21, 2015, 09:02:21 pm
Update to new version 1.0.6 ElkArte not necessary.
Title: Re: [ADDON] ElkArte Ajax Chat
Post by: tan3v88 on December 10, 2016, 01:40:14 pm
Hi guys.I am sorry for this question,but I am very new at this matter.I like Elkarte forum and want to insert a chat.Downloaded this Ajax file,but I have NO idea how to instal it at my Elkarte forum.Please wrote some begginers guide or something.PLEASE.
Title: Re: [ADDON] ElkArte Ajax Chat
Post by: emanuele on December 10, 2016, 03:44:16 pm
/me feels there is no guide on how to install the addons... something new to add to the todo list. xD

Anyway, welcome to elkarte.net. :)

To answer your question, you have to go to admin > package manager > upload package
then you can upload the package you have just downloaded, when the upload is finished you should be presented with the option to install the addon, alternatively you can (again) go to admin > package manager browse packages, locate the "ElkArte Ajax Chat" line and click on "install" that you'll find on the right.
Title: Re: [ADDON] ElkArte Ajax Chat
Post by: tan3v88 on December 10, 2016, 05:05:06 pm
The package you are trying to download or install is either corrupt or not compatible with this version of the software.!!! :(
Is there any solution of this?Some other way to insert a chat?
Title: Re: [ADDON] ElkArte Ajax Chat
Post by: Spuds on December 10, 2016, 05:42:42 pm
Are you trying to run it on 1.1?  It seemed to install fine on 1.0.9 when I tried.
Title: Re: [ADDON] ElkArte Ajax Chat
Post by: tan3v88 on December 10, 2016, 07:12:21 pm
SMF-AjaxChat_1.0.1
Can you upload 1.0.9 somewhere,or send me to the email tan3v88@gmail.com
Title: Re: [ADDON] ElkArte Ajax Chat
Post by: Spuds on December 10, 2016, 08:05:41 pm
No I mean are you using ElkArte 1.0.9 (current release) or ElkArte 1.1 (Beta) ? 

QuoteAlso you need to use SMF-AjaxChat_1.0.1
You need to use the ElkAjaxChat_1.0.1.zip not the SMF one.  It is the one at this link http://scaricare.de/index.php/downloads/download/10-elkarte-einsnull/7-elkarte-ajax-chat
Title: Re: [ADDON] ElkArte Ajax Chat
Post by: tan3v88 on December 10, 2016, 08:57:36 pm
My version was 1.0.7 and I have followed this instructions  http://www.elkarte.net/community/index.php?topic=3940.0 to update it.
But when I press "Install"the same text shows up.Do I need to unrar the files before upload them ?
Title: Re: [ADDON] ElkArte Ajax Chat
Post by: ahrasis on December 10, 2016, 09:53:47 pm
No. You did not have to unrar them (at least for 1.0.9 patch).

If you really have 1.0.7 version installed, then I don't think you got an incompatible package (but may be I am wrong, so do check). You can emulate it too.

But I rather think you didn't get the package downloaded properly, so it states that your package is corrupted.

Note: Should we separate the version and corrupted package warning @emanuele, @Spuds?

Edited: Ok, I noticed that there is a to do on that part of the code already. :)
Title: Re: [ADDON] ElkArte Ajax Chat
Post by: tan3v88 on December 11, 2016, 12:41:43 pm
 I have this: Files in archive ElkArte_v1-0-9_patch.zip:
modifications.xml (6309 bytes)
package-info.xml (847 bytes)
serialize.php (6530 bytes)
update.php (449 bytes)
I think it is downloaded properly.
What mean to emulate it :D

Title: Re: [ADDON] ElkArte Ajax Chat
Post by: badmonkey on December 11, 2016, 01:21:38 pm
Emulate means the package may be installed emulating a different version number of Elk.  This is useful when the mod package was written for a different version.  When this is the case you should see the Install link in the package manager saying something like Install Emulating X.x or something like that. 
Title: Re: [ADDON] ElkArte Ajax Chat
Post by: emanuele on December 11, 2016, 02:08:18 pm
Quote from: tan3v88 – I have this: Files in archive ElkArte_v1-0-9_patch.zip:
Let's stop here for a second.
You said you were on 1.0.7, did you move to 1.0.8 before installing 1.0.9? (Just to be sure.)
And second question: are we now talking about installing the Ajax chat or the update? :)

Note to @Spuds
Spoiler (click to show/hide)
Title: Re: [ADDON] ElkArte Ajax Chat
Post by: tan3v88 on December 11, 2016, 03:03:12 pm
I did't move to 1.0.8.I am trying to move directly on 1.0.9 from 1.0.7 :D
Title: Re: [ADDON] ElkArte Ajax Chat
Post by: tan3v88 on December 11, 2016, 03:14:59 pm
Guys I am an idiot.Now from 1.0.7 update to 1.0.8 and there was no problem after that to update to 1.0.9 and the chat was successful installed without any problems.Thank you so much for the help and I am sorry for taking your time.
Title: Re: [ADDON] ElkArte Ajax Chat
Post by: badmonkey on December 11, 2016, 03:27:38 pm
It's just a learning opportunity.  Doesn't make you an idiot.  It certainly isn't a waste of time.   ;) 
Title: Re: [ADDON] ElkArte Ajax Chat
Post by: tan3v88 on December 11, 2016, 04:15:44 pm
How I can adjust this error (https://scontent-vie1-1.xx.fbcdn.net/v/t1.0-9/15380624_1055728474556503_6724611702715378395_n.jpg?oh=606623f43b182ad2dd6bb5472b7a8aed&oe=58F65804)
Title: Re: [ADDON] ElkArte Ajax Chat
Post by: emanuele on December 11, 2016, 04:34:43 pm
404 seems a "file not found", but a translation in English would help quite a bit... :)
Title: Re: [ADDON] ElkArte Ajax Chat
Post by: badmonkey on December 11, 2016, 05:17:39 pm
You don't happen to be running nginx by chance?
Title: Re: [ADDON] ElkArte Ajax Chat
Post by: tan3v88 on December 11, 2016, 05:57:27 pm
:D Chatbot: Error : Connection status : 404
No nginx
Title: Re: [ADDON] ElkArte Ajax Chat
Post by: emanuele on December 12, 2016, 08:07:12 am
Any other addon?
Title: Re: [ADDON] ElkArte Ajax Chat
Post by: tan3v88 on December 12, 2016, 08:43:57 am
No.This was my first experience with addon installation :D
Title: Re: [ADDON] ElkArte Ajax Chat
Post by: emanuele on December 12, 2016, 01:16:55 pm
Not sure why it gives that answer.
I guess I have to install it...
Title: Re: [ADDON] ElkArte Ajax Chat
Post by: tan3v88 on February 04, 2017, 05:44:27 am
Guys,pls if someone have time to check what's wrong with this shoutbox ( Connection status : 404 ) . Do I need to make some settings after installation?May be this is the problem?
Title: Re: [ADDON] ElkArte Ajax Chat
Post by: badmonkey on February 04, 2017, 08:45:02 am
What elk version are you running?  To make it work on 1.1, the action must be changed from chat to talk.  The button can still work as well with a subs edit. 
Title: Re: [ADDON] ElkArte Ajax Chat
Post by: tan3v88 on February 04, 2017, 03:25:08 pm
Ajax chat is version 1.0.1
Elkarte is 1.0.9 patch. version 1.0.0
Title: Re: [ADDON] ElkArte Ajax Chat
Post by: badmonkey on February 04, 2017, 05:37:55 pm
Perhaps check file and directory permissions?  It should install and work out of the box with your version. 

Also, by chance are you running nginx? 
Title: Re: [ADDON] ElkArte Ajax Chat
Post by: tan3v88 on February 16, 2017, 09:50:46 am
Do I need to create chat page,if I want to run the shoutbox ? Also at my browse packages is signed "talk" instead "chat",should it be like that?  (https://scontent-otp1-1.xx.fbcdn.net/v/t31.0-8/16715991_1113584258770924_2534968137315449810_o.jpg?oh=0fc50c55444b52c72f5b9b563b7d883e&oe=594516D6)
Title: Re: [ADDON] ElkArte Ajax Chat
Post by: badmonkey on February 16, 2017, 04:18:36 pm
You should be able to do either/or independently.  Yes, the package will create a directory named "talk".  Looks fine from here.  ;)
Title: Re: [ADDON] ElkArte Ajax Chat
Post by: augras on May 10, 2018, 10:29:13 am
Hi,
i'm looking for a shoutbox and maybe this addon will be what i need.
Does it work with ElkArte1.1.3 ?
Philippe
Title: Re: [ADDON] ElkArte Ajax Chat
Post by: ' Tzs , on November 15, 2022, 04:29:29 pm
Is this file still available, or is it just me who can't find it? The download link redirects to a broken German domain.
Title: Re: [ADDON] ElkArte Ajax Chat
Post by: Spuds on November 15, 2022, 09:45:47 pm
Looks like they never released it to the addon site ...

I checked my archive and found this, don't know if it works on 1.1 or even if it was the latest.
Title: Re: [ADDON] ElkArte Ajax Chat
Post by: ' Tzs , on November 16, 2022, 04:33:10 am
Thank you for sharing!
Title: Re: [ADDON] ElkArte Ajax Chat
Post by: Vector on November 17, 2023, 12:30:01 pm
When installing the latest version of the chat on the forum version 1.1.9, it gives an error - vsprintf(): Argument #2 ($values) must be of type array, string given
Title: Re: [ADDON] ElkArte Ajax Chat
Post by: ahrasis on November 18, 2023, 12:50:29 am
Which one did you install? @Spuds shared 1.1 just a few post before yours, though I am not sure that gonna work either as I have never installed it and it seems pretty old too.
Title: Re: [ADDON] ElkArte Ajax Chat
Post by: Spuds on December 03, 2023, 11:39:33 am
Quote from: Vector – When installing the latest version of the chat on the forum version 1.1.9, it gives an error - vsprintf(): Argument #2 ($values) must be of type array, string given
That seems like a PHP 8 error.

Doing a quick look at the addon, it utilizes AJAX-Chat (by Blueimp) which I did find on GitHub.  However it has not been updated in 7 years, so its unlikely to work with PHP 8. 

This addon is really a wrapper around that program, so until the AJAX-Chat author decides to update that code, this addon is not going to work.  Perhaps there is a fork of that project that has been updated that could be used here, I did not look into that.