Author Topic: Chat extension  (Read 45025 times)

mirko

  • Newbie
  • *
  • Posts: 12
    • View Profile
Chat extension
« on: February 04, 2009, 07:28:39 PM »
Hi,
I have written a chat extension for opengoo. Probably itís not the most important extension, but maybe helpful. ;-) I implement it in version 1.0, but it should also work with later versions. The zip file includes all files and some instructions to install it - it's simple. And before anyone ask: the color choice is just a dummy. I still have a problem with the timezones, you can see it in the ChatEntries class.

If I should install it somewhere, ask me.

I welcome any comment!!!

Mirko


PS: Newer versions in later posts.
« Last Edit: February 11, 2009, 08:17:29 PM by mirko »

Number8

  • Jr. Member
  • **
  • Posts: 88
    • View Profile
Re: Chat extension
« Reply #1 on: February 04, 2009, 09:30:31 PM »
In step 2, "Add the panel item", what file/function does that go in to?

Thanks for the new feature.

mirko

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Chat extension
« Reply #2 on: February 04, 2009, 09:54:01 PM »
Oh, it's public/assets/javascript/og/layout.js. Approximately line 46 (in my version), depending on where you want it in your tab bar.
I update the zip file.

ignacio

  • Hero Member
  • *****
  • Posts: 1703
    • View Profile
Re: Chat extension
« Reply #3 on: February 05, 2009, 08:26:54 AM »
Wonderful, Mirko!

Haven't tried it yet, but it's great that you could write this extension. You should add to your setup.txt instructions on how to create the database for the chat extension.

Coincidientally, I was writing a tutorial on the development wiki about how to write a chat extension, but I didn't get to finish it. Would you like to continue it or to write your own on the wiki? So that it will be easier for other developers to dive into the OpenGoo source code. Here's my work in progress and here I was writing down the source code.

mirko

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Chat extension
« Reply #4 on: February 05, 2009, 09:47:02 AM »
Hi,
I hasn't read your wiki pages. :o Bacause they aren't liked from the developers homepage.

If I had known that, I would have perhaps chosen a different extension. ;) Is your chat working? Then I reluctantly want to change your nice wiki pages, otherwise I will try.

I update the zip file.
« Last Edit: February 05, 2009, 02:42:39 PM by mirko »

mirko

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Chat extension
« Reply #5 on: February 05, 2009, 02:41:33 PM »
Ok, my extension is a little bit simpler. I don't have extra "chatrooms". The most difficult was the javascript - to get not everytime a additional timer. ;)

You can combine some fields, because the have the same content, for example in the BaseChats class start_date and created_on. Or in the BaseChatLines class sender_id and created_by_id.

But it was interesting, what you write about the content objects. I choose the chat, cause I don't have the necessary knowlege of this co's. ;)

Maybe a generator for the model classes will be helpful, because it's much to write and it's every time the same. I often used the symfony framework and this has such a generator.

ignacio

  • Hero Member
  • *****
  • Posts: 1703
    • View Profile
Re: Chat extension
« Reply #6 on: February 06, 2009, 09:49:39 AM »
My chat extension is not working because it's not finished. I just started with the tutorial one day but haven't had any time to go on with it. So if you want to write your own tutorial please go ahead and we will use it. Maybe I then can add something about Content Objects to it. Do it as simple as you want, the simpler the easier it will be to follow by new users.

We don't have a generator for our objects. OpenGoo is based on activeCollab, that used it's own framework, and we don't have access to that framework. We were thinking on changing the framework to CakePHP or some other, but that would be one big change. I think CakePHP is the most popular, but I've read that it is the worst performing. Ignition is supposed to be one of the best performing, but it has much less features. I guess symfony would lie somewhere in the middle between those two.

mirko

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Chat extension
« Reply #7 on: February 06, 2009, 07:38:45 PM »
Ok, if I find some time I'll start writing a tutorial. Currently I don't understand much of the model classes. Like you can see in the code. ;)

And I fixed the timezone problem.

phongca07

  • Newbie
  • *
  • Posts: 9
    • View Profile
    • Email
Re: Chat extension
« Reply #8 on: February 07, 2009, 12:54:06 PM »
To be honest to say I love this Chat extension. However, chat panel does not have chat icon. So can you tell me how to put icon in the panel. Thanks

phongca07

  • Newbie
  • *
  • Posts: 9
    • View Profile
    • Email
Re: Chat extension
« Reply #9 on: February 07, 2009, 03:08:29 PM »
I've found down an error like

Statement on line 682: Syntax error Backtrace: ... Line 682 of linked script http://myweb.com/office/public/assets/javascript/og/og.js window.eval(match[2]); ... Line 10 of linked script http://myweb.com/myoffice/public/assets/javascript/extjs/adapter/ext/ext-base.js function(){if(this.locked){return false}this.locked=true;var R=!F;if(!R){R=(I>0)}var Q=[];for(var M=0,L=H.length;M

It happens when I use IE and Opera. I then can not login to chat. Is there any way to fix it? Thank
« Last Edit: February 07, 2009, 03:10:37 PM by phongca07 »

phongca07

  • Newbie
  • *
  • Posts: 9
    • View Profile
    • Email
Re: Chat extension
« Reply #10 on: February 07, 2009, 03:12:41 PM »
I have a question about chat extension. My question is how do we know the other member available or online or in used? Because if you lick on chat it might not show anything and if you send a message to other member they will not you know that. I think the best way is we should have a popup when you send a message to someone at that time. They will know you and they you answer or chat. That is my suggestion. Thank you.
« Last Edit: February 07, 2009, 03:16:31 PM by phongca07 »

mirko

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Chat extension
« Reply #11 on: February 07, 2009, 04:43:36 PM »
Thanks for the comments. :)
If you have an icon and send it to me, I'll put it into the zip package. That would be nice. Otherwise you can read in the hello world totorial, to know where you can set it. The css class is named ico-chat.

I only use firefox, ;)  what og version do you use?

This is the simplest way realizing a chat. Nowhere is saved, wheaher a user is online or offline. So this will be a new feature.

mirko

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Chat extension
« Reply #12 on: February 07, 2009, 09:07:23 PM »
New version:
Now you get an standard information window at the top, when a message is coming in, if the chat tab isn't open and you are logged in.
And you see all users, they are logged in. When the don't use the logout button of the chat, they will be logged out automatically after an hour of no activity in og.

phongca07

  • Newbie
  • *
  • Posts: 9
    • View Profile
    • Email
Re: Chat extension
« Reply #13 on: February 07, 2009, 10:36:27 PM »
I am using the icon of yahoo. It is a smile icon.

phongca07

  • Newbie
  • *
  • Posts: 9
    • View Profile
    • Email
Re: Chat extension
« Reply #14 on: February 07, 2009, 10:58:33 PM »
I already tested your new version. It is great version. I will let you know if I find some bugs. Thank you!

 

anything