librelist archives

« back to archive

Reg: how to extend converseJS

Reg: how to extend converseJS

From:
Gowthaman m
Date:
2015-02-17 @ 14:44
Hi all

   I going to develop chat app with some different "UI". So i plan to
extend conversjs and try to write new js file.
   Because if i change anything in conversjs  i con't apply latest
 converse js.

   please any one guide me how can i start ?



-- 




Thanks

Gowthaman M <http://erated.me/p/gowthaman-murugan/>

Re: [conversejs] Reg: how to extend converseJS

From:
Jc Brand
Date:
2015-02-18 @ 17:33
On Tue, Feb 17, 2015 at 08:14:09PM +0530, Gowthaman m wrote:
>    Hi all
>       I going to develop chat app with some different "UI". So i plan to
>    extend conversjs and try to write new js file.
>       Because if i change anything in conversjs  i con't apply latest
>     converse js.
>       please any one guide me how can i start ? 

To add a different UI you need the theme converse.js

I recently wrote some documentation for that, but it's only on Github, not yet
on the website:

https://github.com/jcbrand/converse.js/blob/master/docs/source/theming.rst

If you want to add functionality without changing converse.js you can write
plugins.

I haven't yet written documentation on how to write a plugin but will do so
soon.

Here's an example of a plugin by @gbonvehi

https://gist.github.com/gbonvehi/376078bd6b702255a7e7

Re: [conversejs] Reg: how to extend converseJS

From:
Gowthaman m
Date:
2015-02-19 @ 05:51
Ya thanks JC



On Wed, Feb 18, 2015 at 11:03 PM, JC Brand <lists@opkode.com> wrote:

> On Tue, Feb 17, 2015 at 08:14:09PM +0530, Gowthaman m wrote:
> >    Hi all
> >       I going to develop chat app with some different "UI". So i plan to
> >    extend conversjs and try to write new js file.
> >       Because if i change anything in conversjs  i con't apply latest
> >     converse js.
> >       please any one guide me how can i start ?
>
> To add a different UI you need the theme converse.js
>
> I recently wrote some documentation for that, but it's only on Github, not
> yet
> on the website:
>
> https://github.com/jcbrand/converse.js/blob/master/docs/source/theming.rst
>
> If you want to add functionality without changing converse.js you can write
> plugins.
>
> I haven't yet written documentation on how to write a plugin but will do so
> soon.
>
> Here's an example of a plugin by @gbonvehi
>
> https://gist.github.com/gbonvehi/376078bd6b702255a7e7
>



-- 




Thanks

Gowthaman M <http://erated.me/p/gowthaman-murugan/>

Re: [conversejs] Reg: how to extend converseJS

From:
Gowthaman m
Date:
2015-02-19 @ 06:59
Actually i tried the get roster list  So i follow the
https://gist.github.com/gbonvehi/376078bd6b702255a7e7"  and add plugin but
that "chatbox" always undefined



function converseGetRosterItems(converse) {
var jids = ['54db56b709581fdb47802642@192.168.1.141'];
converse.on('ready', function() {
var _transform = function(jid) {
var chatbox = converse.chatboxes.get(jid);
console.log(chatbox);  *=>undefined*
if (!chatbox) {
var roster_item = converse.roster.get(jid);
console.log(".......roster_item.........",roster_item);
}
};

if ( typeof jids === "string") {
_transform(jids);
}
_.map(jids, _transform);
});
}
 converse.plugins.add('converseGetRosterItems', converseGetRosterItems);

On Thu, Feb 19, 2015 at 11:21 AM, Gowthaman m <gowthaman@ideas2it.com>
wrote:

> Ya thanks JC
>
>
>
> On Wed, Feb 18, 2015 at 11:03 PM, JC Brand <lists@opkode.com> wrote:
>
>> On Tue, Feb 17, 2015 at 08:14:09PM +0530, Gowthaman m wrote:
>> >    Hi all
>> >       I going to develop chat app with some different "UI". So i plan to
>> >    extend conversjs and try to write new js file.
>> >       Because if i change anything in conversjs  i con't apply latest
>> >     converse js.
>> >       please any one guide me how can i start ?
>>
>> To add a different UI you need the theme converse.js
>>
>> I recently wrote some documentation for that, but it's only on Github,
>> not yet
>> on the website:
>>
>> https://github.com/jcbrand/converse.js/blob/master/docs/source/theming.rst
>>
>> If you want to add functionality without changing converse.js you can
>> write
>> plugins.
>>
>> I haven't yet written documentation on how to write a plugin but will do
>> so
>> soon.
>>
>> Here's an example of a plugin by @gbonvehi
>>
>> https://gist.github.com/gbonvehi/376078bd6b702255a7e7
>>
>
>
>
> --
>
>
>
>
> Thanks
>
> Gowthaman M <http://erated.me/p/gowthaman-murugan/>
>
>
>


-- 




Thanks

Gowthaman M <http://erated.me/p/gowthaman-murugan/>