Hi APE!
First of all let me express my gratulation for this amazing software.
The basics work for me, but.....
I try to use inlinepush + user controlling, but without success.
Pls tell, where is the problem:
Client:
<script type="text/javaScript" src="../Build/uncompressed/
apeClientJS.js"></script>
var client = new APE.Client();
client.load({ });
client.addEvent('load', function() {
client.core.start({"name": "Blaci"});
});
client.addEvent('ready', function() {
client.core.request.send('JOIN', {'channel': 'testchannel', 'user':
'Blaci', 'ky': '1234'});
client.onRaw('postmsg', function(raw, pipe) {
document.getElementById("apeControllerDemo").innerHTML =
decodeURIComponent(raw.data.message);
});
});
Server:
Ape.registerHookCmd('JOIN', function(params, cmd) {
Ape.log('kezdet ' + params.channel);
var request = new Http('http://local.lacekvaio.hu/cgi-bin/elwo/
azonosit.fcgi');
request.set('method', 'POST');
request.writeObject(params);
request.getContent(function(result) {
if (result == 1) {
var chan = Ape.getChannelByName(params.channel);
if (!$defined(chan)) {
Ape.mkChan(params.channel);
}
cmd.user.join(params.channel);
Ape.log('joining ' + params.channel);
} else {
cmd.sendResponse('ERR', {'code': 101, 'msg':
'CANT_JOIN_CHANNEL'});
}
});
return -1;
});
This is include into main.ape.js like inlinepush.js also.
Reloaded the ape server,without error message.
And when a try to send raw with test.php, i got error message:
UNKNOWN_CHANNEL.
So seems, that the redefinition of JOIN is without success,because
there is no message in ape log.
Thnx in advance.
--
You received this message because you are subscribed to the Google
Groups "APE Project" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/ape-project?hl=en
---
APE Project (Ajax Push Engine)
Official website : http://www.ape-project.org/
Git Hub : http://github.com/APE-Project/