Enable Chat Widget on OTRS Dashboard

Dont create your support topics here! No new topics with questions allowed!

Moderator: crythias

skizzo88
OTRS newbie
Posts: 25
Joined: 02 May 2011, 18:15
OTRS Version?: 3.07
Real Name: Roccon Manuel
Company: xx

Enable Chat Widget on OTRS Dashboard

Postby skizzo88 » 12 Jul 2011, 15:38

Hello everyone!

Some time ago I went looking for a way to have a chat
in OTRS to communicate with my colleagues in different locations,
until I managed to fit a chat php open source
(http://www.phpfreechat.net/) and use it in the dashboard.

To use it I attached the modified package and simplified
from me, you have to configure apache to run php scripts,
create the folder c: \ Program Files \ OTRS \ Apache \ htdocs \ phpfreechat and
unpack the files in there.
Enter into OTRS, in admin, sysconfig, and enter the module Framework ->
Frontend:: Agent:: Dashboard

Change the DashboardBackend # # # 0200-Image as photos (and changing
adding the fields that are not there),
ip xxx.xxx.xxx.xxx put in your server OTRS

Finally, the results as is the dashboard as photo ..

guide.JPG


The chat system automatically detects the user logged in and create an identical user
to chat.

File:
Rar part1:
phpfreechat.part1.rar

Rar part2:
phpfreechat.part2.rar


I hope this helps,

Manuel
You do not have the required permissions to view the files attached to this post.

MichaelR
OTRS superhero
Posts: 250
Joined: 12 Oct 2010, 01:35
OTRS Version?: 3.0.9
Company: LRS Health

Re: ENABLE CHAT WIDGET ON OTRS DASHBOARD

Postby MichaelR » 13 Jul 2011, 03:15

I can see this being asked by many others, can you explain also how to setup Apache to handle PHP?
OTRS: 3.0.9 & ITSM 3.0.4 - OS: Windows 7 - DB: MySQL - Heaps of random/useful hacks :)
[Major Code Changes]
ArticleFreeTime1-3
Ability to search ArticleFreeText

User avatar
crythias
Moderator
Posts: 9920
Joined: 04 May 2010, 18:38
OTRS Version?: 4.0.x
Location: SouthWest Florida, USA
Contact:

Re: ENABLE CHAT WIDGET ON OTRS DASHBOARD

Postby crythias » 15 Jul 2011, 23:06

For linux, it's pretty much apt-get or yum install mod_php (or mod-php or whatever the package name is)
For Windows, it's not a lot different, go to http://windows.php.net/download/
OTRS 4.0.x (private/testing/public) on Linux with MySQL database. Also on github.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask

maureliosilverio
OTRS newbie
Posts: 17
Joined: 25 Aug 2011, 19:22
OTRS Version?: 3
Real Name: Marcos Aurélio Silvério
Company: Suntech

Re: ENABLE CHAT WIDGET ON OTRS DASHBOARD

Postby maureliosilverio » 26 Sep 2011, 23:20

Sorry, but i dont know where i put the phpfreechat files on my linux server. Can you help me?
What field i must add in Framework>> Frontend:Agent:Dashboard ??
OTRS 3.0.8 and ITSM 3.0.4 on Ubuntu Server 10.0.4.3 (running on Citrix XenServer)

User avatar
schaffel
OTRS expert
Posts: 90
Joined: 20 May 2008, 12:50
OTRS Version?: 3.1.X
Real Name: Felix
Company: SyroCon Consulting GmbH
Location: Darmstadt

Re: ENABLE CHAT WIDGET ON OTRS DASHBOARD

Postby schaffel » 19 Oct 2011, 16:52

Very interesting.
To bad it did not work for me.
Is someone out there who managed to get this working on a Linux OS?

  • I have php running
  • First I copied the files (as root) from the part one rar file to /var/www/phpfreechat/
  • Then I copied the files from the second rar to the same folder /var/www/phpfreechat/ (replacing the old files)
  • In the next step I registered the chat to the dashboard like discribed above
  • ... and ran into an error message on the dashboard that the chatcache is not writable
  • So I changed the owner of the files to the otrs web user.
  • Next I fixed the DB credentials in the otrs/config.php file from the package
  • As a result I get a perfect grey square on the dashboard with nothing in it but a link to the phpfreechat index which does not show anything as well :(

Perhaps someone could write an howto for phpfreechat integration for linux.

I will try harder tomorrow,
feix:end
production: OTRS 5.0.X | OTRS:ITSM 5.0.X | AWS-RDS MariaDB 10.1.X | CentOS 7

Gibt es im Raum Frankfurt/Darmstadt OTRS/ITSM-Benutzer, die an einem Erfahrungsaustausch interessiert sind? Dann meldet euch um mit Gleichgesinnten über OTRS in der Praxis und den ganzen Rest zu reden.

juanman80
OTRS newbie
Posts: 44
Joined: 11 Nov 2011, 10:30
OTRS Version?: 5.0.15

Re: ENABLE CHAT WIDGET ON OTRS DASHBOARD

Postby juanman80 » 30 Nov 2011, 17:49

schaffel wrote:Very interesting.
To bad it did not work for me.
Is someone out there who managed to get this working on a Linux OS?

  • I have php running
  • First I copied the files (as root) from the part one rar file to /var/www/phpfreechat/
  • Then I copied the files from the second rar to the same folder /var/www/phpfreechat/ (replacing the old files)
  • In the next step I registered the chat to the dashboard like discribed above
  • ... and ran into an error message on the dashboard that the chatcache is not writable
  • So I changed the owner of the files to the otrs web user.
  • Next I fixed the DB credentials in the otrs/config.php file from the package
  • As a result I get a perfect grey square on the dashboard with nothing in it but a link to the phpfreechat index which does not show anything as well :(

Perhaps someone could write an howto for phpfreechat integration for linux.

I will try harder tomorrow,
feix:end


Hi,
If you only see a link, maybe you didn't change the Module to Kernel::Output::HTML::DashboardIFrame
I've succesfully installed this chat, but it won't recognize my agents, everybody is "guestXXX". Anybody knows anything about it?
OTRS 5.0.15 on CentOSLinux with MariaDB database connected to an Active Directory for Agents and Customers.

juanman80
OTRS newbie
Posts: 44
Joined: 11 Nov 2011, 10:30
OTRS Version?: 5.0.15

Re: ENABLE CHAT WIDGET ON OTRS DASHBOARD

Postby juanman80 » 01 Dec 2011, 14:20

juanman80 wrote:
schaffel wrote:Very interesting.
To bad it did not work for me.
Is someone out there who managed to get this working on a Linux OS?

  • I have php running
  • First I copied the files (as root) from the part one rar file to /var/www/phpfreechat/
  • Then I copied the files from the second rar to the same folder /var/www/phpfreechat/ (replacing the old files)
  • In the next step I registered the chat to the dashboard like discribed above
  • ... and ran into an error message on the dashboard that the chatcache is not writable
  • So I changed the owner of the files to the otrs web user.
  • Next I fixed the DB credentials in the otrs/config.php file from the package
  • As a result I get a perfect grey square on the dashboard with nothing in it but a link to the phpfreechat index which does not show anything as well :(

Perhaps someone could write an howto for phpfreechat integration for linux.

I will try harder tomorrow,
feix:end


Hi,
If you only see a link, maybe you didn't change the Module to Kernel::Output::HTML::DashboardIFrame
I've succesfully installed this chat, but it won't recognize my agents, everybody is "guestXXX". Anybody knows anything about it?


Ok, I'll answer myself: It seems I have a problem with the cache. A new computer logged on to the system and its nick is ok. I should find a way to clear the cache
OTRS 5.0.15 on CentOSLinux with MariaDB database connected to an Active Directory for Agents and Customers.

morido
OTRS newbie
Posts: 1
Joined: 04 Dec 2011, 18:12
OTRS Version?: 2.4

Re: Enable Chat Widget on OTRS Dashboard

Postby morido » 05 Dec 2011, 13:33

The approach seems very appealing. However it did not work out for me at all...
Here is a quick list of the problems I ran into, and how I finally fixed them:

First of all:
The 2 archives by the OP incorporate the entire chat system. So you do not need to download any files from the phyfreechat-Website. Since I can only see minor adjustments made to the code (basically adding an "otrs"-Subdirectory that handles the username-generation,) I would greatly appreciate to turn those archives into a patch against the original chatting system rather than distributing them this way...

  1. If you still run OTRS 2.4 (like me), you need to make sure to install the IFrame-Dashboard-Backports-Package (is there a shorter name for this?) from the 3.0-series in order to actually embed the chat in the way suggested by the OP. See here: http://blog.otrs.org/category/otrs-development/page/2
  2. Since the chat system relies on the Session-Cookie generated by OTRS to determine the correct user name, it has to be able to read that cookie (which usually means it has to run in a subdirectory underneath your OTRS-installation -- I use the "Alias"-directive on our apache-webserver to accomplish that).
  3. The original look-and-feel of the chat is rather bloated (several chatrooms, interface with lots of icons, notifications for all sorts of things). So I spent some time slimming it down. Basically I did a "display:none" on most of the div-containers that I thought are not mandatory and set some variables in the index.php (see http://www.phpfreechat.net/parameters) accordingly. I finally ended up with a simplistic black-and-white window that would even fit in the smaller right part of the Dashboard.
  4. The most severe problem I had was to rewrite the otrs/OTRS_Session.php which handles the database-request to determine the current user (based on the Session-Cookie mentioned earlier) and forwards this information to the actual chat system. In my opinion the version supplied makes is of no use at all (at least it does not generate a proper username). My adapted file looks like this (this wont win a price for good coding, but at least it works):

    Code: Select all


    class OTRS_Session 
    {
        
        var $sessionID
    ;
        var $databaseDSN;
            var $sessOK;
            var $userLogin;

        function OTRS_Session($SessID = null, $cookieName = 'Session')
        {
        if ($SessID === null) {
                $this->sessionID = isset($_COOKIE[$cookieName]) ? $_COOKIE[$cookieName] : null;
            } else {
                $this->sessionID = $SessID;
            }
            if ($this->sessionID) {
                            //echo "fine costruttore, parte loadsessiondata<br>";
                $this->loadSessionData();
            }
        }
      function loadSessionData()
        {
                    //echo "In loadsessiondata!<br>";
                    $db=new mysql();
                    //echo "SELECT session_value FROM sessions WHERE session_id='".$this->sessionID."'<br>";
                    $result=$db->do_query("SELECT session_value, session_id FROM sessions WHERE session_id='".$this->sessionID."'");
                    $row=mysql_fetch_row($result);
            if ($row) {
                $fields = explode(';', $row[0]);
                foreach($fields as $field) {
                    $split = explode(':', $field);
                    if ( $split[0] == "_UserLogin" )
                            {
                                    $this->userLogin = base64_decode($split[1]);
                            }
                }
                            if($this->sessionID==$row[1]){ $this->sessOK='ok';}
            }
        }
    }
     
  5. Last thing: The way the otrs/OTRS_Session.php is linked to the chat-system (via index.php) does not look too appealing to me either... Anybody got a clue what the initial if-statement is good for?

Cheers,
Moritz

brensly
OTRS newbie
Posts: 10
Joined: 15 Feb 2012, 09:56
OTRS Version?: 5.0.3
Real Name: Alexander Eriksson

Re: Enable Chat Widget on OTRS Dashboard

Postby brensly » 15 Feb 2012, 13:11

Tried this on a Linux server, but I am getting this error:

Code: Select all

 [error] slurp_filename('/opt/otrs/bin/cgi-bin/freephpchat') / opening: (2) No such file or directory at /usr/lib/perl5/ModPerl/RegistryCooker.pm line 541


Does anyone have a clue of what is wrong? I can't find out why it's even looking for a file named freephpchat in /opt/otrs/bin/cgi-bin/, makes no sense to me.

Misfitz
OTRS newbie
Posts: 43
Joined: 22 Feb 2012, 16:21
OTRS Version?: 3_3_3
Real Name: Patrick Veit
Company: Ametras mobility

Re: Enable Chat Widget on OTRS Dashboard

Postby Misfitz » 29 May 2012, 15:39

Hi,

i don't know what i have to do with this statement:
Last thing: The way the otrs/OTRS_Session.php is linked to the chat-system (via index.php) does not look too appealing to me either... Anybody got a clue what the initial if-statement is good for?


Can anybody help me please??

How must i change the index.php to get the Usernames of OTRS??

steste123
OTRS ninja
Posts: 494
Joined: 25 Sep 2012, 19:04
OTRS Version?: OTRS Help Desk
Real Name: Stefan

Re: Enable Chat Widget on OTRS Dashboard

Postby steste123 » 30 Oct 2012, 21:14

Hi,
i installed PHP in CGI-Mode. But now i get a blank site.
The Errorcodes from the apache log are:

Code: Select all

[Tue Oct 30 20:06:45 2012] [error] [client 127.0.0.1] PHP Strict Standards:  Non-static method pfcGlobalConfig::Instance() should not be called statically, assuming $this from incompatible context in D:\\Program Files (x86)\\OTRS\\Apache\\htdocs\\phpfreechat\\src\\phpfreechat.class.php on line 44
[Tue Oct 30 20:06:45 2012] [error] [client 127.0.0.1] PHP Strict Standards:  Non-static method pfcI18N::Init() should not be called statically, assuming $this from incompatible context in D:\\Program Files (x86)\\OTRS\\Apache\\htdocs\\phpfreechat\\src\\pfcglobalconfig.class.php on line 649
[Tue Oct 30 20:06:45 2012] [error] [client 127.0.0.1] PHP Strict Standards:  Non-static method pfcI18N::GetAcceptedLanguage() should not be called statically, assuming $this from incompatible context in D:\\Program Files (x86)\\OTRS\\Apache\\htdocs\\phpfreechat\\src\\pfci18n.class.php on line 59
[Tue Oct 30 20:06:45 2012] [error] [client 127.0.0.1] PHP Strict Standards:  Non-static method pfcI18N::GetDefaultLanguage() should not be called statically, assuming $this from incompatible context in D:\\Program Files (x86)\\OTRS\\Apache\\htdocs\\phpfreechat\\src\\pfci18n.class.php on line 60
[Tue Oct 30 20:06:45 2012] [error] [client 127.0.0.1] PHP Strict Standards:  Non-static method pfcContainer::Instance() should not be called statically, assuming $this from incompatible context in D:\\Program Files (x86)\\OTRS\\Apache\\htdocs\\phpfreechat\\src\\pfcglobalconfig.class.php on line 687
[Tue Oct 30 20:06:45 2012] [error] [client 127.0.0.1] PHP Strict Standards:  Non-static method pfcContainer::Instance() should not be called statically, assuming $this from incompatible context in D:\\Program Files (x86)\\OTRS\\Apache\\htdocs\\phpfreechat\\src\\pfcglobalconfig.class.php on line 934
[Tue Oct 30 20:06:45 2012] [error] [client 127.0.0.1] PHP Strict Standards:  Non-static method pfcI18N::GetAcceptedLanguage() should not be called statically, assuming $this from incompatible context in D:\\Program Files (x86)\\OTRS\\Apache\\htdocs\\phpfreechat\\src\\pfcglobalconfig.class.php on line 939
[Tue Oct 30 20:06:45 2012] [error] [client 127.0.0.1] PHP Strict Standards:  Non-static method pfcContainer::Instance() should not be called statically, assuming $this from incompatible context in D:\\Program Files (x86)\\OTRS\\Apache\\htdocs\\phpfreechat\\src\\pfcglobalconfig.class.php on line 738
[Tue Oct 30 20:06:45 2012] [error] [client 127.0.0.1] PHP Strict Standards:  Non-static method pfcUserConfig::Instance() should not be called statically, assuming $this from incompatible context in D:\\Program Files (x86)\\OTRS\\Apache\\htdocs\\phpfreechat\\src\\phpfreechat.class.php on line 47
[Tue Oct 30 20:06:45 2012] [error] [client 127.0.0.1] PHP Strict Standards:  Non-static method pfcGlobalConfig::Instance() should not be called statically, assuming $this from incompatible context in D:\\Program Files (x86)\\OTRS\\Apache\\htdocs\\phpfreechat\\src\\pfcuserconfig.class.php on line 21
[Tue Oct 30 20:06:45 2012] [error] [client 127.0.0.1] PHP Strict Standards:  Non-static method pfcGlobalConfig::Instance() should not be called statically, assuming $this from incompatible context in D:\\Program Files (x86)\\OTRS\\Apache\\htdocs\\phpfreechat\\src\\pfcuserconfig.class.php on line 58
[Tue Oct 30 20:06:45 2012] [error] [client 127.0.0.1] PHP Strict Standards:  Non-static method pfcGlobalConfig::Instance() should not be called statically, assuming $this from incompatible context in D:\\Program Files (x86)\\OTRS\\Apache\\htdocs\\phpfreechat\\src\\pfcuserconfig.class.php on line 58
[Tue Oct 30 20:06:45 2012] [error] [client 127.0.0.1] PHP Strict Standards:  Non-static method pfcGlobalConfig::Instance() should not be called statically, assuming $this from incompatible context in D:\\Program Files (x86)\\OTRS\\Apache\\htdocs\\phpfreechat\\src\\pfcuserconfig.class.php on line 58
[Tue Oct 30 20:06:45 2012] [error] [client 127.0.0.1] PHP Strict Standards:  Non-static method pfcGlobalConfig::Instance() should not be called statically, assuming $this from incompatible context in D:\\Program Files (x86)\\OTRS\\Apache\\htdocs\\phpfreechat\\src\\pfcuserconfig.class.php on line 58
[Tue Oct 30 20:06:45 2012] [error] [client 127.0.0.1] PHP Strict Standards:  Non-static method pfcGlobalConfig::Instance() should not be called statically, assuming $this from incompatible context in D:\\Program Files (x86)\\OTRS\\Apache\\htdocs\\phpfreechat\\src\\pfcuserconfig.class.php on line 58
[Tue Oct 30 20:06:45 2012] [error] [client 127.0.0.1] PHP Strict Standards:  Non-static method pfcGlobalConfig::Instance() should not be called statically, assuming $this from incompatible context in D:\\Program Files (x86)\\OTRS\\Apache\\htdocs\\phpfreechat\\src\\phpfreechat.class.php on line 99
[Tue Oct 30 20:06:45 2012] [error] [client 127.0.0.1] PHP Strict Standards:  Non-static method pfcUserConfig::Instance() should not be called statically, assuming $this from incompatible context in D:\\Program Files (x86)\\OTRS\\Apache\\htdocs\\phpfreechat\\src\\phpfreechat.class.php on line 100
Scalars leaked: 1
OTRS 5.x - Debian 8 - apache 2.4 - MySQL 5.x

Van27
OTRS newbie
Posts: 3
Joined: 25 Nov 2012, 01:24
OTRS Version?: 3.1.10

Re: Enable Chat Widget on OTRS Dashboard

Postby Van27 » 26 Nov 2012, 16:36

Hi

Ive done the installation on Ubuntu (msysql), OTRS 3.1.11 but still get the following errors, anybody help ?

phpFreeChat cannot be initialized, please correct these errors:

'nick' parameter must be a charatere string
'language' parameter is not valid. Available values are: 'nl_NL, ko_KR, nl_BE, tr_TR, pt_PT, en_US, eo, hr_HR, vi_VN, es_ES, zh_TW, nn_NO, ru_RU, id_ID, hu_HU, th_TH, hy_AM, oc_FR, da_DK, de_DE-formal, uk_RO, nb_NO, fr_FR, it_IT, sv_SE, uk_UA, sr_CS, ar_LB, bg_BG, pt_BR, ba_BA, bn_BD, el_GR, zh_CN, gl_ES, pl_PL, de_DE-informal, ja_JP'

Thanks

Van27
OTRS newbie
Posts: 3
Joined: 25 Nov 2012, 01:24
OTRS Version?: 3.1.10

Re: Enable Chat Widget on OTRS Dashboard

Postby Van27 » 28 Nov 2012, 15:20

The issues have been resolved. The chat is running fine on Ubuntu - OTRS 3.1.11

Solution: Edit the right credentials in the phpfreechat folder config file. Edited the index.php file with the appropriate language settings for en

User avatar
klausneil
OTRS ninja
Posts: 616
Joined: 29 May 2012, 22:47
OTRS Version?: 5.0.12
Real Name: Klaus Salazar
Company: SLP
Location: Perú

Re: Enable Chat Widget on OTRS Dashboard

Postby klausneil » 30 Nov 2012, 06:32

Hi but anybody can make the steps for include the Chat on the dashboard? 'cause the steps before write are with errors

jniltinho
OTRS newbie
Posts: 1
Joined: 12 Dec 2012, 22:01
OTRS Version?: 3.1.11
Real Name: Jose Nilton
Company: Criare

Re: Enable Chat Widget on OTRS Dashboard

Postby jniltinho » 12 Dec 2012, 22:56

Change src/pfcglobalconfig.class.php

var $language = 'i18n/it_IT';

User avatar
klausneil
OTRS ninja
Posts: 616
Joined: 29 May 2012, 22:47
OTRS Version?: 5.0.12
Real Name: Klaus Salazar
Company: SLP
Location: Perú

Re: Enable Chat Widget on OTRS Dashboard

Postby klausneil » 18 Jan 2013, 19:01

no, you don't understand only appears image in white and does not load, too my system is linux and the example is in windows

bascobug
OTRS newbie
Posts: 2
Joined: 19 Jan 2013, 22:57
OTRS Version?: 3.1.12

Re: Enable Chat Widget on OTRS Dashboard

Postby bascobug » 20 Jan 2013, 01:05

Hello,

Stuck with error : 'nick' parameter must be a charatere string
How did you make phpfreechat working ?

Thanks

chilly8901
OTRS newbie
Posts: 4
Joined: 07 Jun 2013, 01:12
OTRS Version?: 3.2.1
Real Name: bo feng
Company: onecloud

Re: Enable Chat Widget on OTRS Dashboard

Postby chilly8901 » 30 Jun 2013, 10:53

Van27 wrote:The issues have been resolved. The chat is running fine on Ubuntu - OTRS 3.1.11

Solution: Edit the right credentials in the phpfreechat folder config file. Edited the index.php file with the appropriate language settings for en



HI:
I get the same problem with you like this:
•'nick' parameter must be a charatere string
•'language' parameter is not valid. Available values are: 'nl_NL, ko_KR, nl_BE, tr_TR, pt_PT, en_US, eo, hr_HR, vi_VN, es_ES, zh_TW, nn_NO, ru_RU, id_ID, hu_HU, th_TH, hy_AM, oc_FR, da_DK, de_DE-formal, uk_RO, nb_NO, fr_FR, it_IT, sv_SE, uk_UA, sr_CS, ar_LB, bg_BG, pt_BR, ba_BA, bn_BD, el_GR, zh_CN, gl_ES, pl_PL, de_DE-informal, ja_JP'
But I don't know php well.Could you tell me how to edit these config file?Thanks!

virtualsky
OTRS newbie
Posts: 1
Joined: 03 Jul 2013, 07:15
OTRS Version?: 3.0.1
Real Name: vsky

Re: Enable Chat Widget on OTRS Dashboard

Postby virtualsky » 03 Jul 2013, 07:35

I am not able to view the below files as it not the link but it is just a text..

File:
Rar part1:
phpfreechat.part1.rar

Rar part2:
phpfreechat.part2.rar

Please help.

Wojtek
OTRS newbie
Posts: 26
Joined: 17 Mar 2014, 12:11
OTRS Version?: 3.3.8
Real Name: Wojciech
Company: UKE

Re: Enable Chat Widget on OTRS Dashboard

Postby Wojtek » 31 Jul 2014, 13:01

I managed to run chat in OTRS 3.2.6 ( haven't checked yet with 3.3.8 ).

It's on Debian + PHP working.

I copied extracted files (first post-to have access need to be logged in this forum) to: /opt/otrs/phpfreechat
Changed rights to files: chmod 0775 /opt/otrs/phpfreechat/ -R
Changed owner of files to server user: chown www-data /opt/otrs/phpfreechat/ -R

Apache (Debian):
added to: /etc/apache2/sites-enabled/000-default:
..
Alias /phpfreechat /opt/otrs/phpfreechat
..

phpfreechat:
set global settings: phpfreechat/src/pfcglobalconfig.class.php
..
var $language = 'en_US';
..

set connection to OTRS session: phpfreechat/otrs/OTRS_Session.php
changed function below as follows:

..
function loadSessionData()
{
//echo "In loadsessiondata!<br>";
$db=new mysql();
//echo "SELECT session_value FROM sessions WHERE session_id='".$this->sessionID."'<br>";
//$result=$db->do_query("SELECT session_value, session_id FROM sessions WHERE session_id='".$this->sessionID."'");
$result=$db->do_query("SELECT data_value, session_id FROM sessions WHERE data_key='UserLogin' AND session_id='".$this->sessionID."'"); <-- this is new, looks like data is organised different than in previous OTRS versions
$row=mysql_fetch_row($result);
if ($row) {
//$fields = explode(';', $row[0]);
//foreach($fields as $field) {
// $split = explode(':', $field);
// if ($split[0] != '_UserPw') {
// if ($split[0] == '') {
// continue;
// }
// $split[0] = strtolower(substr($split[0], 0, 1)) . substr($split[0], 1);
// $this->$split[0] = base64_decode($split[1]);
// $this->$split[0] = base64_decode($split[1]);
// }
//}
//echo 'row[0]=';
// $row[0];
// $this->userLogin = base64_decode($row[0]);
$this->userLogin = $row[0]; <-- get agent login
if($this->sessionID==$row[1]){ $this->sessOK='ok';}
}
}
..

edited begining of the file, set parameters: phpfreechat/index.php
..
$otrs_sess=new OTRS_Session();
if(!$otrs_sess->sessOK=='ok')
{
exit(" You don't have access to chat. </br> Please contact with Admin.");
// echo "entro<br>";
//$params["nick"]=$otrs_sess->userLogin;
}
//echo $params["nick"];
$params = array();
$params["theme"] = "zilveer";
$params["title"] = "";
$params["nick"]=$otrs_sess->userLogin;
//$params["nick"] = "guest".rand(1,1000); // setup the intitial nickname
$params['firstisadmin'] = true;
//$params["isadmin"] = true; // makes everybody admin: do not use it on production servers;)
$params["serverid"] = md5(__FILE__); // calculate a unique id for this chat
$params["debug"] = false;
$params["language"] = "en_US";
$params["max_nick_len"] = 25;
$params["display_pfc_logo"] = false;
$params["connect_at_startup"] = true;
..


set db connection parameters: phpfreechat/otrs/config.php
..
const host='localhost';
const user='otrs';
const pass='password'; <- for OTRS user default password is '$otrs$'
const db='otrs';
..


OTRS:

Edit Config Settings in Framework -> Frontend::Agent::Dashboard
DashboardBackend###0200-Image

Block ---> ContentLarge
Default ---> 1
Description ---> Chat (widget)
Height ---> 680
Module ---> Kernel::Output::HTML::DashboardIFrame
Title ---> Chat
URL ---> http://x.x.x.x/phpfreechat/
Width ---> 100%

phpfreechat

To edit default look of a chat (css, theme zilveeer), e.g. width look for a file:
phpfreechat/themes/zilveer/style.css.php

and html in:
phpfreechat/themes/default/chat.html.tpl.php

Regards,
Wojtek
OTRS 3.3.8
Debian

lmasal
OTRS newbie
Posts: 6
Joined: 10 Jul 2014, 09:21
OTRS Version?: 3.3.8

Re: Enable Chat Widget on OTRS Dashboard

Postby lmasal » 26 Oct 2014, 19:42

Good evening ,

did someone managed to install chat on OTRS in windows?

thanks.

lmasal
OTRS newbie
Posts: 6
Joined: 10 Jul 2014, 09:21
OTRS Version?: 3.3.8

Re: Enable Chat Widget on OTRS Dashboard

Postby lmasal » 27 Oct 2014, 15:10

Hello everyone,

In our company we have installed OTRS 3.3.9 on Windows Server 2012 R2 with MS SQL 2012 R2 and with IIS 8.5 and everything is working perfectly.

Is it possible to have chat on this kind of configuration?

thanks.

nanotowers
OTRS superhero
Posts: 203
Joined: 19 Aug 2014, 17:27
OTRS Version?: 3.1.18
Real Name: Vlad
Location: Bogotá (Colombia)
Contact:

Re: Enable Chat Widget on OTRS Dashboard

Postby nanotowers » 14 Mar 2015, 17:44

is possible create a chat window when the agents can get comunication with the customers?
OTRS: 3.1.18, OTRS::ITSM 3.1.10
Apache2/MySQL 5+

NanoTowerS
"Try not to become a man of success, but rather try to become a man of value." - Albert Einstein


Return to “Howtos”

Who is online

Users browsing this forum: No registered users and 1 guest