I just started playing with APE and believe that it's a great real time
push service (maybe the best ever made), however, I'm having difficulty
with saving the shouts made in a chatbox..
To begin with, I have made a complex structure of how the complete shoutbox
would look (both on client side and server side), please be aware that I'm
just summarising functions, e.g mysql functions, more or less, I hope you
all understand what I'm trying to do anyway.
*APE_JSF*
*shoutbox.html*
-post method -> shouts.php
*shouts.php*
- send the data from the form submission to the ape server (insertShout)
- json callback to send the the results back to shoutbox.html from the ape
server after a mysql insertion (listShouts)
*shoutbox.js*
var myJSONP = new Request.JSONP({
url: 'http://www.domain.net/*shouts.php*',
callbackKey: 'jsoncallback',
onRequest: function(data){
console.log('on request');
},
onComplete: function(data){
console.log('on complete');
}}).send();
*APE_Server*
*shouts.js*
<script type="text/javascript" src="./Clients/JavaScript.js"></script>
<script type="text/javascript" src="./Demos/config.js"></script>
<script type="text/javascript">
var client = new APE.Client();
client.load({
'channel':'chat',
'myuser':'Test123'
});
client.addEvent('multiPipeCreate', function(pipe){
pipe.request.send(*'insertShout*', {
'name':'Test123',
'message':'test message'
});
});
</script>
registerCmd('insertShout', true, function(params, cmd){
* (MYSQL) INSERT (chatname, message, date_created) INTO table
ape_shoutbox*
});
registerCmd('listShouts', true, function(params, cmd){
* (MYSQL) SELECT * FROM table ape_shoutbox
*});*
Please could anyone give me advice, I'm gone into an wall and am completely
dazed in the head because of this shoutbox project, lol.
*
--
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/