Own site integration
Dear Developers,
First of all, that you for your application. I really like it. I use it as owncloud integrated chat.
I am looking for the possibility of integrating it directly to my site's backoffice (for employees). The following instruction was used: https://github.com/jsxc/jsxc/wiki/Install-jsxc
So I created folders, made initial configuration (used the same parameters as in owncloud):
tree -d ./
./ ├── ajax ├── css ├── js └── jsxc ├── css ├── img │ └── emotions ├── lib │ ├── i18next │ │ └── release │ ├── otr │ │ ├── build │ │ │ └── dep │ │ ├── lib │ │ └── vendor │ └── strophe.jingle └── sound
in jxsc.example.js: $(function() { jsxc.init({ loginForm: { form: '#loginform', jid: '#login', pass: '#password' }, logoutElement: $('#logout'), rosterAppend: 'body', root: '/3rdparty/jsxc', turnCredentialsPath: 'ajax/getturncredentials.json', loadSettings: function(username, password) { return { xmpp: { url: '/http-bind', domain: 'compservice.in.ua', resource: 'CS', onlogin: false } }; } }); });
I am trying to see how integration works, however I do not see any chat blocks. In javascript console only one line appears: "This appears to be Firefox" from jsxc.dep.js
Could you please clarify how can I debug the integration ? You can check what I integrated on my dev site: dev.office.compservice.in.ua
Thank you in advance.
P.S. It seems that on https://github.com/jsxc/jsxc/wiki/Install-jsxc page paths for css are wrong:
folders should be css for all these files
How does your site login works?
Hello. Sorry. I forgot to clarify this. Firstly I am looking for integration without auto log in. I use openfire server and my site has its own mysql db for users.
At first stage I want that every user should login to chat manually. Is it possible ?
Sure, this is possible. You can use the form2 from our example or you can use the following (untested) snippet to open a Login Box:
<a id="chat_login">Chat login</a>
<a id="chat_logout" style="display:none">Chat logout</a>
<script>
$(function(){
jsxc.init({
root: 'jsxc/',
turnCredentialsPath: 'ajax/getturncredentials.json',
loadSettings: function(username, password) {
return xmpp: {
url: '/http-bind/',
domain: 'localhost',
resource: 'example',
overwrite: true,
onlogin: true
};
}
});
$('#chat_login').click(jsxc.gui.showLoginBox);
$(document).on('attached.jsxc', function(){
$('#chat_login').hide();
$('#chat_logout').show();
});
});
</script>
Please check out also our new example.
Thank you, Klaus. I'll try to check within few days - too many tasks for now ))
2015-05-27 16:49 GMT+03:00 Klaus [email protected]:
Please check out also our new example https://github.com/jsxc/jsxc/tree/develop/example.
— Reply to this email directly or view it on GitHub https://github.com/jsxc/jsxc/issues/175#issuecomment-105917786.
Any update?
Dear Klaus,
Sorry for detailed response. I've checked examples. Everything is clear.
Please close this case. Thank you for assistance.