Author Topic: Chat extension  (Read 69718 times)

chester

  • Newbie
  • *
  • Posts: 2
    • View Profile
    • Email
Re: Chat extension
« Reply #45 on: August 28, 2011, 01:33:38 pm »
Worked like a dream!!! :D

VER

  • Freshman
  • *
  • Posts: 14
    • View Profile
Re: Chat extension
« Reply #46 on: November 18, 2011, 08:06:31 pm »
Worked as a charm at this side as well!!

Thanks!

I placed the chat tab as first one, in order to get my users (kids) to log in automatically when logging into the site.
In this way they will automatically see who's online. And the first one will get noticed automatically when someone posts a message.

The only thing I'm thinking of is that it should be workspace related (if you have a FO site with different clients you obviously don't want them to chat together...)

Thx again

indra

  • Newbie
  • *
  • Posts: 8
    • View Profile
    • Email
Re: Chat extension
« Reply #47 on: November 18, 2011, 09:21:46 pm »
Placing it first as a way to make the logon automatic is realy clever dho i'm afraid my users (office people) wont like to lose the overview. I like the auto logon idea, but not at the expense of functionality.
And having it workspace releated should be a nice feature also.

Thanks for the feedback

ozkish

  • Newbie
  • *
  • Posts: 1
    • View Profile
    • Email
Re: Chat extension
« Reply #48 on: November 22, 2011, 01:49:37 pm »
Dear Indra,

Thank you for all your efforts and help. It worked for me. Though chat could still have a lot of more features, however I am not complaining one bit and thank you again for all the time spent to make this work.

Take care.

indra

  • Newbie
  • *
  • Posts: 8
    • View Profile
    • Email
Re: Chat extension
« Reply #49 on: November 22, 2011, 10:34:31 pm »
With pleasure, yes more features would be fun! But as my programming experience is rather dim, I make do with what I find. And finding is the key, last weekend a friend pointed me to Openmeetings (dot de).
A feature rich open source web conferencing platform, same blueish look as Feng, a little bit different feel.
Got it running pretty easy on my zentyal (ubuntu) server alongside Feng Office both on their own mysql databases. Both support LDAP, so there might be a path for integration, later :-).

chester

  • Newbie
  • *
  • Posts: 2
    • View Profile
    • Email
Re: Chat extension
« Reply #50 on: November 27, 2011, 10:30:59 am »
I have started trying to get FreiChat to integrate with Feng Office (1.7.5). Everything works fine except that users are displayed as Guest - ### (# being either a digit or a numeral).

I have edited the header section of .../application/layouts/website.php  as follows:

<?php

$ses = null; // Return null if user is not logged in

if(isset($_SESSION['userid'])){
if($_SESSION['userid'] != null) // Here null is guest
{
$ses=$_SESSION['userid']; //LOOK now userid will be parsed to FreiChatX
}
}

if(!function_exists("freichatx_get_hash")){
function freichatx_get_hash($ses){

       if(is_file("C:/KSGServer/www/meetpoint/freichat/arg.php")){

               require "C:/KSGServer/www/meetpoint/freichat/arg.php";

               $temp_id =  $ses . $uid;

               return md5($temp_id);

       }
       else
       {
               echo "<script>alert('module freichatx says: arg.php file not
found!');</script>";
       }

       return 0;
}
}
?>

Any help would be great.

indra

  • Newbie
  • *
  • Posts: 8
    • View Profile
    • Email
Re: Chat extension
« Reply #51 on: November 27, 2011, 03:00:36 pm »
I think this is an other plugin you're talking about, maybe you should start a new thread.

jjoloka

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Chat extension
« Reply #52 on: February 18, 2012, 09:50:43 am »
I have started trying to get FreiChat to integrate with Feng Office (1.7.5). Everything works fine except that users are displayed as Guest - ### (# being either a digit or a numeral).

I have edited the header section of .../application/layouts/website.php  as follows:

<?php

$ses = null; // Return null if user is not logged in

if(isset($_SESSION['userid'])){
if($_SESSION['userid'] != null) // Here null is guest
{
$ses=$_SESSION['userid']; //LOOK now userid will be parsed to FreiChatX
}
}

if(!function_exists("freichatx_get_hash")){
function freichatx_get_hash($ses){

       if(is_file("C:/KSGServer/www/meetpoint/freichat/arg.php")){

               require "C:/KSGServer/www/meetpoint/freichat/arg.php";

               $temp_id =  $ses . $uid;

               return md5($temp_id);

       }
       else
       {
               echo "<script>alert('module freichatx says: arg.php file not
found!');</script>";
       }

       return 0;
}
}
?>

Any help would be great.


I do not work:

      <div id="userboxWrapper"><?php echo render_user_box(logged_user()) ?></div>
      <div id="searchbox">
         <form name='search_form' class="internalForm" action="<?php echo ROOT_URL . '/index.php' ?>" method="get">
            <table><tr><td>
            </td>
            <td id="searchboxSearch">
               <div id="searchboxButton" style="display:none"></div>
            </td>
            <td style="padding-left:10px">
               <div id="quickAdd" style="display:none"></div>
            </td>
            </tr>
            </table>
         </form>
      </div>
      <?php Hook::fire('render_page_header', null, $ret) ?>
   </div>
</div>

<?php
   $ses = null; // Return null if user is not logged in
   function freichatx_get_hash($ses)
   {
      if(is_file("/library/freichat/arg.php"))
      {
         require "/library/freichat/arg.php";
         $temp_id =  $ses.$uid;
         return md5($temp_id);
      }
      else
      {
         echo "<script>alert('module freichatx says: arg.php file not found!');</script>";
      }
      return 0;
   }
   
   if(isset($_SESSION['userid'])){
      if($_SESSION['userid'] != null) // Here null is guest
      {
         $ses = $_SESSION['userid']; //LOOK now userid will be parsed to FreiChatX
      }
   }
   if(!function_exists("freichatx_get_hash"))
   {
      freichatx_get_hash($ses);
   }
?>
<!-- /header -->

I unzipped evnix.com/drupal2/ in /library/ :

type=dir;sizd=4096;modify=20120216145610;UNIX.mode=0755;UNIX.uid=1479;UNIX.gid=1477;unique=831ga8a1cc; PEAR
type=dir;sizd=4096;modify=20120216145610;UNIX.mode=0755;UNIX.uid=1479;UNIX.gid=1477;unique=831ga8a361; browser
type=dir;sizd=4096;modify=20120216145610;UNIX.mode=0755;UNIX.uid=1479;UNIX.gid=1477;unique=831ga8a31a; cssmin
type=dir;sizd=4096;modify=20120216145610;UNIX.mode=0755;UNIX.uid=1479;UNIX.gid=1477;unique=831ga8a355; feed
type=dir;sizd=4096;modify=20120216145610;UNIX.mode=0755;UNIX.uid=1479;UNIX.gid=1477;unique=831ga8a310; filerepository
type=dir;sizd=4096;modify=20120218122756;UNIX.mode=0755;UNIX.uid=1479;UNIX.gid=1477;unique=831ga8a019; freichat
type=dir;sizd=4096;modify=20120216145610;UNIX.mode=0755;UNIX.uid=1479;UNIX.gid=1477;unique=831ga8a30e; html2text
type=dir;sizd=4096;modify=20120216145610;UNIX.mode=0755;UNIX.uid=1479;UNIX.gid=1477;unique=831ga8a27e; htmlpurifier
type=dir;sizd=4096;modify=20120216145610;UNIX.mode=0755;UNIX.uid=1479;UNIX.gid=1477;unique=831ga8a31c; icalendar
type=dir;sizd=4096;modify=20120216145610;UNIX.mode=0755;UNIX.uid=1479;UNIX.gid=1477;unique=831ga8a34f; jsmin
type=dir;sizd=4096;modify=20120216145610;UNIX.mode=0755;UNIX.uid=1479;UNIX.gid=1477;unique=831ga8a35c; json
type=dir;sizd=4096;modify=20120216145610;UNIX.mode=0755;UNIX.uid=1479;UNIX.gid=1477;unique=831ga8a327; pdf
type=dir;sizd=4096;modify=20120216145610;UNIX.mode=0755;UNIX.uid=1479;UNIX.gid=1477;unique=831ga8a1c5; simplegd
type=dir;sizd=4096;modify=20120216145610;UNIX.mode=0755;UNIX.uid=1479;UNIX.gid=1477;unique=831ga8a11d; swift
type=dir;sizd=4096;modify=20120216145610;UNIX.mode=0755;UNIX.uid=1479;UNIX.gid=1477;unique=831ga8a351; textile
type=dir;sizd=4096;modify=20120216145610;UNIX.mode=0755;UNIX.uid=1479;UNIX.gid=1477;unique=831ga8a261; utf8
type=dir;sizd=4096;modify=20120216145610;UNIX.mode=0755;UNIX.uid=1479;UNIX.gid=1477;unique=831ga8a353; vcard
type=dir;sizd=4096;modify=20120216145610;UNIX.mode=0755;UNIX.uid=1479;UNIX.gid=1477;unique=831ga8a363; zend
type=dir;sizd=4096;modify=20120216145610;UNIX.mode=0755;UNIX.uid=1479;UNIX.gid=1477;unique=831ga8a35f; zip
type=dir;sizd=4096;modify=20120216145610;UNIX.mode=0755;UNIX.uid=1479;UNIX.gid=1477;unique=831ga8a34b; zipimport

alexcatalin

  • Newbie
  • *
  • Posts: 1
    • View Profile
    • Email
Re: Chat extension
« Reply #53 on: July 16, 2012, 12:40:08 am »
Your attachments do not work, is there any other way to get the extension?

indra

  • Newbie
  • *
  • Posts: 8
    • View Profile
    • Email
Re: Chat extension
« Reply #54 on: July 16, 2012, 08:11:20 am »
Chat module files for 1.7.5 repost (old post attachments seem to be gone)

Installation instructions for the Attached module :

Backup your installation (optional but recommended :-D)
Download attached chat_install-175.zip, extract it in your Feng office root folder.
Overwrite existing files!
And do the last 2 steps from Tide's setup.txt :

Create a table by executing the following query in your feng office database:

CREATE TABLE IF NOT EXISTS `og_chats` (
  `id` smallint(5) unsigned NOT NULL auto_increment,
  `created_on` datetime NOT NULL default '0000-00-00 00:00:00',
  `created_by_id` int(10) unsigned default NULL,
  PRIMARY KEY  (`id`),
  KEY `created_on` (`created_on`)
);

CREATE TABLE IF NOT EXISTS `og_chat_entries` (
  `id` smallint(5) unsigned NOT NULL auto_increment,
  `message` text collate utf8_unicode_ci,
  `created_on` datetime NOT NULL default '0000-00-00 00:00:00',
  `created_by_id` int(10) unsigned default NULL,
  PRIMARY KEY  (`id`),
  KEY `created_on` (`created_on`)
) ;

Add config option:

INSERT INTO `og_config_options` VALUES ('', 'modules', 'enable_chat_module', '1', 'BoolConfigHandler', 0, 0, 'Enable or disable chat tab.');

But do mind the prefix ;-) (og_ in this case)

Updated setup.txt attached with manual installation steps.
Thanks Mirko for this fine extension and Tide for the integration.
« Last Edit: July 16, 2012, 10:31:06 am by indra »

indra

  • Newbie
  • *
  • Posts: 8
    • View Profile
    • Email
Re: Chat extension
« Reply #55 on: July 16, 2012, 08:27:14 am »
Manual setup instructions for 1.7.5 (from Setup-updated-175.txt)

1. Copy the files into the application directory:

   application/controllers/ChatController.class.php
   application/models/chat_entries/ChatEntries.class.php
   application/models/chat_entries/ChatEntry.class.php
   application/models/chat_entries/base/BaseChatEntries.class.php
   application/models/chat_entries/base/BaseChatEntry.class.php
   application/models/chat/Chats.class.php
   application/models/chat/Chat.class.php
   application/models/chat/base/BaseChats.class.php
   application/models/chat/base/BaseChat.class.php
   application/views/chat/index.php

2. Add the panel item into public/assets/javascript/og/layout.js:

    -Look for :    

      og.panels.weblinks = new og.ContentPanel({
         title: lang('web pages'),
         id: 'webpages-panel',
         iconCls: 'ico-webpages-layout',
         refreshOnWorkspaceChange: true,
         defaultContent: {
            type: 'url',
            data: og.getUrl('webpage', 'init')
         }
      }),

    -Insert after :
    (or anywhere in the // SETUP PANEL LAYOUT var panels = [..., will determine its place in the tab bar )

      og.panels.chat = new og.ContentPanel({
         title: lang('chat'),
         id: 'chat-panel',
         iconCls: 'ico-chat',
         refreshOnWorkspaceChange: false,
         defaultContent: {
            type: "url",
            data: og.getUrl('chat','index')
         }
      }),

    -In //hide disabled modulesAfter :

   if (!og.config['enable_reporting_module']) if (panel = Ext.get('tabs-panel__reporting-panel')) panel.setDisplayed(false);

    -Insert :

   if (!og.config['enable_chat_module']) if (panel = Ext.get('tabs-panel__chat-panel')) panel.setDisplayed(false);

    -At // ENABLE / DISABLE MODULES add

   og.eventManager.addListener('config enable_chat_module changed', function(val) {
      if (val == 1) {
         Ext.get('tabs-panel__chat-panel').setDisplayed(true);
      } else {
         Ext.get('tabs-panel__chat-panel').setDisplayed(false);
      }
   });

    at the end (just before // BUILD VIEWPORT)

3. Add enable/disable javascript functionality public/assets/javascript/ogmin.js

    -Find :

{'render':function(){if(!og.config['enable_notes_module'])if(panel=Ext.get('tabs-panel__messages-panel'))panel.setDisplayed(false);

    -Replace with :

{'render':function(){if(!og.config['enable_chat_module'])if(panel=Ext.get('tabs-panel__chat-panel'))panel.setDisplayed(false);if(!og.config['enable_notes_module'])if(panel=Ext.get('tabs-panel__messages-panel'))panel.setDisplayed(false);

4. Add the module to administration language/en_us/administration.php

   'config option name enable_chat_module' => 'Enable Chat Module',

5. Add the enable/disable button to the website layout application/layouts/website.php

    After :

   'enable_weblinks_module': <?php echo json_encode(module_enabled('weblinks')) ?>,

    Add :

   'enable_chat_module': <?php echo json_encode(module_enabled("chat")) ?>,

6. Add the panel text into language/en_us/lang.js

   'chat': 'Chat',

7. Set a panel icon in public/assets/themes/default/stylesheets/og/og.css

   I use a icon from feng office's repository (comment icon).

.ico-chat {
   background: transparent url(../../images/16x16/all_16_16_sprite.png) no-repeat scroll 0 -1342px !important;
}

8. Add some translations to language/en_us/general.php

   'chat' => 'Chat',
   'chat message' => 'Message',
   'chat status' => 'Your username is <b>{0}</b> and the chat was started at <b>{1}</b>',
   'chat userlist' => 'Active Users',
   'chat system' => 'System',
   'chat logged in' => 'You are logged in!',
   'chat logged out' => 'You are logged out!',

9. Create a table by executing the following query in your feng office database:

    MIND YOUR PREFIX !!!!!! (og_ or fo_) this ones still for og_
    (my softaculous used fo_ , sounds more logical to me)

CREATE TABLE IF NOT EXISTS `og_chats` (
  `id` smallint(5) unsigned NOT NULL auto_increment,
  `created_on` datetime NOT NULL default '0000-00-00 00:00:00',
  `created_by_id` int(10) unsigned default NULL,
  PRIMARY KEY  (`id`),
  KEY `created_on` (`created_on`)
);

CREATE TABLE IF NOT EXISTS `og_chat_entries` (
  `id` smallint(5) unsigned NOT NULL auto_increment,
  `message` text collate utf8_unicode_ci,
  `created_on` datetime NOT NULL default '0000-00-00 00:00:00',
  `created_by_id` int(10) unsigned default NULL,
  PRIMARY KEY  (`id`),
  KEY `created_on` (`created_on`)
) ;

10. Add config option:

INSERT INTO `og_config_options` VALUES ('', 'modules', 'enable_chat_module', '1', 'BoolConfigHandler', 0, 0, 'Enable or disable chat tab.');

Again mind the prefix!!
All done.

A-nix

  • Newbie
  • *
  • Posts: 2
    • View Profile
    • IT outsourcing, web design & development
Re: Chat extension
« Reply #56 on: October 12, 2012, 03:12:55 am »
Here is a chat for feng 2.x.
Now its designed as a plugin.
To install - unpack it to /feng_root/plugins folder and install+activate in administration section of feng gui.


[+] bbcode
[+] some bugs fixed
« Last Edit: October 12, 2012, 06:11:43 am by A-nix »

xai_tim

  • Newbie
  • *
  • Posts: 1
    • View Profile
    • Email
Re: Chat extension
« Reply #57 on: October 22, 2012, 07:14:40 am »
Hi there,

we´re running feng office 2.2 and installed the chat extension as described in the post.

Actually, we cannot see the extension in the admin section (Tabs)...

How can you help?

madjoe

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: Chat extension
« Reply #58 on: November 15, 2012, 12:38:11 pm »
Here is a chat for feng 2.x.
Now its designed as a plugin.
To install - unpack it to /feng_root/plugins folder and install+activate in administration section of feng gui.


  • bbcode
  • some bugs fixed
After installing and activating your plugin, my FengOffice doesn't show the content below the header bar. How could I resolve this? Thanks!

A-nix

  • Newbie
  • *
  • Posts: 2
    • View Profile
    • IT outsourcing, web design & development
Re: Chat extension
« Reply #59 on: November 23, 2012, 07:24:08 am »
hmm, i can't reproduce this bug on my installation