[APE Project] Re: ShoutBox With Private Chat

2011-11-25 Thread Louis Charette
Hi,

I did something similar to this for the chat I created on my phpBB
forum. Basically, there are two thing you want to achieve: Log history
and transmis to only one client instead of transmitting to everybody
in the channel, am I right?

For the chat history, I suggest that you use MySQL. I don't think Ape
support this out of the box. You could keep all the messages in a
server side variable, but you'll lose everything once you restart Ape
and it's not that usefull that Ape knows everything. When the page is
loaded, you get the data from MySQL and voila. If you have MySQL
support working within Ape, it's a piece of cake to add in a custom
server side command. If you don't have MySQL support like me, you can
send the data to MySQL with a background AJAX request.

For the one-to-one chat, you can send a custom raw to a specific user
from a custom server side command. Have a look at those two pages:
http://www.ape-project.org/docs/server/users/getuserbypubid.html
http://www.ape-project.org/docs/server/users/user.pipe.html


  - Louis

On Nov 25, 9:47 pm, Rossco  wrote:
> Hi there,
>
> I need some help with what I'm trying to achieve for a gaming website
> I run. What I would like is to have an ajax style shoutbox that will
> display usernames from the CMS I use to run the site as well as their
> message of course.  I can pass the user details through to the class
> using class options ({'username' : 'myname', 'userid' : 22}).
>
> I would like to extend this to allow one to one chatting as well. The
> shoutbox will just be on display at the top of the site but the one to
> one chats will be initiated by clicking a member who is on a buddy
> style list.  I would like their to be a history of the shout and one
> to one chats held so either a single chat can be resumed and those
> visiting the shoutbox will see the last 30 messages say.  Does this
> require mysql or is it already a function built in to APE?
>
> I will be using Mootools as it's my choice of library for dom effects
> etc.  Could someone how I best approach this?  I do have some
> experience with writing my own mootools scripts and classes but having
> looked through the documentation, I'm not quite sure how to do this.
>
> I am using centOS 5.3, the latest APE which is running fine according
> to the status script.
>
> Any help would be great.
>
> Thanks

-- 
You received this message because you are subscribed to the Google
Groups "APE Project" group.
To post to this group, send email to ape-project@googlegroups.com
To unsubscribe from this group, send email to
ape-project+unsubscr...@googlegroups.com
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/


[APE Project] Re: ShoutBox With Private Chat

2011-11-26 Thread Rossco
Hi Louis,
thanks for the quick reply.
I don't suppose you have an example of what you used on your phpBB
forum?  My CMS is tied in to SMF somewhat so I dare say that what you
have created would be similar to what I am looking for.
I am still going through some of the docs to see how the sessions work
and see if I can change the examples to use the vars I want set.
Cheers
On Nov 26, 4:41 am, Louis Charette  wrote:
> Hi,
>
> I did something similar to this for the chat I created on my phpBB
> forum. Basically, there are two thing you want to achieve: Log history
> and transmis to only one client instead of transmitting to everybody
> in the channel, am I right?
>
> For the chat history, I suggest that you use MySQL. I don't think Ape
> support this out of the box. You could keep all the messages in a
> server side variable, but you'll lose everything once you restart Ape
> and it's not that usefull that Ape knows everything. When the page is
> loaded, you get the data from MySQL and voila. If you have MySQL
> support working within Ape, it's a piece of cake to add in a custom
> server side command. If you don't have MySQL support like me, you can
> send the data to MySQL with a background AJAX request.
>
> For the one-to-one chat, you can send a custom raw to a specific user
> from a custom server side command. Have a look at those two 
> pages:http://www.ape-project.org/docs/server/users/getuserbypubid.htmlhttp://www.ape-project.org/docs/server/users/user.pipe.html
>
>   - Louis
>
> On Nov 25, 9:47 pm, Rossco  wrote:
>
>
>
>
>
>
>
> > Hi there,
>
> > I need some help with what I'm trying to achieve for a gaming website
> > I run. What I would like is to have an ajax style shoutbox that will
> > display usernames from the CMS I use to run the site as well as their
> > message of course.  I can pass the user details through to the class
> > using class options ({'username' : 'myname', 'userid' : 22}).
>
> > I would like to extend this to allow one to one chatting as well. The
> > shoutbox will just be on display at the top of the site but the one to
> > one chats will be initiated by clicking a member who is on a buddy
> > style list.  I would like their to be a history of the shout and one
> > to one chats held so either a single chat can be resumed and those
> > visiting the shoutbox will see the last 30 messages say.  Does this
> > require mysql or is it already a function built in to APE?
>
> > I will be using Mootools as it's my choice of library for dom effects
> > etc.  Could someone how I best approach this?  I do have some
> > experience with writing my own mootools scripts and classes but having
> > looked through the documentation, I'm not quite sure how to do this.
>
> > I am using centOS 5.3, the latest APE which is running fine according
> > to the status script.
>
> > Any help would be great.
>
> > Thanks

-- 
You received this message because you are subscribed to the Google
Groups "APE Project" group.
To post to this group, send email to ape-project@googlegroups.com
To unsubscribe from this group, send email to
ape-project+unsubscr...@googlegroups.com
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/


[APE Project] Re: ShoutBox With Private Chat

2011-11-26 Thread Rossco
Ok I've tried reading through the docs and it seems half of them
aren't even correct.  Some of the examples don't work.

I can't seem to start a connection with a username already selected.
I have tried...

APE.Config.scripts = [APE.Config.baseUrl + '/Build/
uncompressed/apeCoreSession.js'];

var client = new APE.Client();

client.load({'identifier': 'shoutit', 'channel':'mainLobby'});

client.addEvent('load', function() {
client.core.start();
});

client.addEvent('ready', function() {
if (client.core.options.restore) {
client.core.getSession('name', function(name) {
console.log('username value is : ',
name.data.sessions.name);
});
} else {
console.log('saving custom session data, username on
the server');
client.core.setSession({'name':'RossCo'});
}
});

client.addEvent('multiPipeCreate', function(pipe) {
console.log('New pipe ' + pipe.name);
});


-- 
You received this message because you are subscribed to the Google
Groups "APE Project" group.
To post to this group, send email to ape-project@googlegroups.com
To unsubscribe from this group, send email to
ape-project+unsubscr...@googlegroups.com
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/


[APE Project] Re: ShoutBox With Private Chat

2011-11-26 Thread Rossco
Ok I have edited my script which seems to load up a user id and
name...  The [[+smf.username]] is just a placeholder that will pass
the username.  Now I guess I need to figure out how to send messages
to the mainLobby channel then take it further to one to one messages.
Does this appear to be correct so far?


APE.Config.scripts = [APE.Config.baseUrl + '/Build/
uncompressed/apeCoreSession.js'];
var client = new APE.Client();

client.load({'identifier': 'shoutit', 'channel':'mainLobby',
'userid':'1'});
client.addEvent('load', function() {
 //core.options.restore is true if a session is active
if (client.core.options.restore) {
client.core.start();
} else {
client.core.start({'name':'[[+smf.username]]',
'userid':'[[+smf.id]]'});
}
});

client.addEvent('ready', function() {
if (client.core.options.restore) {
client.core.getSession('name', function(name) {
console.log('Receiving sessions data. username
value is : ', name.data.sessions.name);
});
client.core.getSession('id', function(id) {
console.log('Receiving sessions data. id value
is : ', id.data.sessions.id);
});
} else {

console.log('saving custom session data, username on
the server');
client.core.setSession({'name':'[[+smf.username]]',
'id':'[[+smf.id]]'});
}
});

client.addEvent('multiPipeCreate', function(pipe) {
console.log('New pipe ' + pipe.name);
});

-- 
You received this message because you are subscribed to the Google
Groups "APE Project" group.
To post to this group, send email to ape-project@googlegroups.com
To unsubscribe from this group, send email to
ape-project+unsubscr...@googlegroups.com
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/


[APE Project] Re: ShoutBox With Private Chat

2011-11-28 Thread Rossco
Hello,

I'm trying to understand how you've managed to do this.  Being new to
APE it's quite difficult to understand.

Which Javascript files do I need to include in the head of my page?
Just the mootools-core, mootools and config?

I'm having some difficulty with APE but I'm hoping I can achieve what
I need!

Thanks

On Nov 26, 10:55 pm, Louis Charette  wrote:
> I didn't use the session restore thing, but it looks ok.
>
> I may suggests that you use the "user.setProperty" server side command to 
> assign info to a user, even the username. 
> Seehttp://www.ape-project.org/docs/server/users/user.setproperty.htmlfor 
> details. When you specify the username in the "core.start", you're limited 
> regarding certain character or the length of the username.
>
> Here's a example of my code if you need it:
>
>
>
>
>
>
>
>
>
> > chat = new APE.Chat();
>
> > //Load APE
> > chat.load({
> >    identifier: 'SC_Chat',
> >    channel: 'listeSalon'
> > });
>
> > //Once Ape is ready, connect to server
> > chat.addEvent('load', function(core){
> >    chat.core.start({
> >            'name': $time().toString(),
> >    });
> > });
>
> > chat.addEvent('multiPipeCreate', function(pipe, options){
>
> >    //If we just joined the "lobby" channel...
> >    if (pipe.name == "listesalon") {
>
> >            //Get the info from PHP. PHP will send them to the server with 
> > InlinePush
> >            $.ajax({
> >                    type: "POST",
> >                    url: baseUrl+'chat',
> >                    dataType: "html",
> >                    data: 
> > "action=serverAuth&firstinit=1&upid="+this.core.user.pubid,
> >                    success: function(data) {
> >                            //Ready to chat
> >                            // [...]
> >                    }
> >            });
> >    }
> > });
>
> The AJAX request send info to Ape with InlinePush kind of request. Those 
> informations (Username, pics, etc) are store in the user public property like 
> described earlier. With this, I don't need to ask for the username and pic 
> when he send a message in the chat.
>
> When a user post something on the chat, it's actually send with php 
> inlinepush since I don't have MySQL support on the server itself (and I need 
> to parse BBcode with php). Here is the code from PHP and the Ape Server-side 
> command
>
>
>
>
>
>
>
>
>
> > //On prépare la transmission à APE
> >            $cmd = array(array(
> >                    'cmd' => 'chatsendmsg',
> >                    'params' =>  array(
> >                            'password'  => $chat->APE_PASSWORD,
> >                            'raw'       => 'chatSendMsg',
> >                            'channel'   => $_POST['pipename'],  //The 
> > current channel name
> >                            'data'          => array(
> >                                    'chatmsg'               => $msg,
> >                                    'userid'                        => 
> > $user->data['user_id'],
> >                                    'pubid'                 => 
> > $_POST['upid'],
> >                            ),
> >               )
> >            ));
>
> >            //On transmet à APE
> >            $data = file_get_contents($chat->APE_SERVER . 
> > urlencode(json_encode($cmd)));
> > Ape.registerCmd("chatsendmsg", false, function(params, infos) {
> >    if (params.password == Ape.config("inlinepush.conf", "password")) {
>
> >            if ($defined(params.channel) && $defined(params.data) && 
> > $defined(params.raw)) {
> >                    var chan = Ape.getChannelByName(params.channel);
> >                    if (!$defined(chan)) return ["401", "UNKNOWN_CHANNEL"];
>
> >                    //Get Ape user Info from PubID
> >                    var thisUser = Ape.getUserByPubid(params.data.pubid);
>
> >                    //validate the phpBB ID match for security
> >                    if (params.data.userid != 
> > thisUser.getProperty('userid')) {
> >                            return ["092", "BAD_PHP_USERID"];
> >                    }
>
> >                    //Send data to the channel
> >                    chan.pipe.sendRaw("chatSendMsg", {
> >                            "chatmsg": params.data.chatmsg,
> >                            "username": thisUser.getProperty('username'),
> >                            "avatar": thisUser.getProperty('avatar'),
> >                            "userid": thisUser.getProperty('userid'),
> >                            "pipename": chan.getProperty('name'),
> >                    });
>
> >                    //Tout est ok
> >                    return {"name":"pushed","data":{"value":"ok"}};
> >            } else {
> >                    return 0;
> >            }
> >    } else {
> >            return ["400", "BAD_PASSWORD"];
> >    }
>
> > });
>
> As you can see, you need to know the user Public ID. To send to only one 
> person, it's the same thing, but you need to know both user pubid or you can 
> create a temporary channel that bo

[APE Project] Re: ShoutBox With Private Chat

2011-11-28 Thread Rossco
Some information about my setup.

I have a subdomain setup with a wildcard.
*shout.battlefieldnations.com

My config is as follows,

APE.Config.baseUrl = 'http://shout.battlefieldnations.com'; //APE JSF
APE.Config.domain = 'battlefieldnations.com';
APE.Config.server = '0.shout.battlefieldnations.com:6969'; //APE
server URL

On Nov 28, 10:22 am, Rossco  wrote:
> Hello,
>
> I'm trying to understand how you've managed to do this.  Being new to
> APE it's quite difficult to understand.
>
> Which Javascript files do I need to include in the head of my page?
> Just the mootools-core, mootools and config?
>
> I'm having some difficulty with APE but I'm hoping I can achieve what
> I need!
>
> Thanks
>
> On Nov 26, 10:55 pm, Louis Charette  wrote:
>
>
>
>
>
>
>
> > I didn't use the session restore thing, but it looks ok.
>
> > I may suggests that you use the "user.setProperty" server side command to 
> > assign info to a user, even the username. 
> > Seehttp://www.ape-project.org/docs/server/users/user.setproperty.htmlfordetails.
> >  When you specify the username in the "core.start", you're limited 
> > regarding certain character or the length of the username.
>
> > Here's a example of my code if you need it:
>
> > > chat = new APE.Chat();
>
> > > //Load APE
> > > chat.load({
> > >    identifier: 'SC_Chat',
> > >    channel: 'listeSalon'
> > > });
>
> > > //Once Ape is ready, connect to server
> > > chat.addEvent('load', function(core){
> > >    chat.core.start({
> > >            'name': $time().toString(),
> > >    });
> > > });
>
> > > chat.addEvent('multiPipeCreate', function(pipe, options){
>
> > >    //If we just joined the "lobby" channel...
> > >    if (pipe.name == "listesalon") {
>
> > >            //Get the info from PHP. PHP will send them to the server with 
> > > InlinePush
> > >            $.ajax({
> > >                    type: "POST",
> > >                    url: baseUrl+'chat',
> > >                    dataType: "html",
> > >                    data: 
> > > "action=serverAuth&firstinit=1&upid="+this.core.user.pubid,
> > >                    success: function(data) {
> > >                            //Ready to chat
> > >                            // [...]
> > >                    }
> > >            });
> > >    }
> > > });
>
> > The AJAX request send info to Ape with InlinePush kind of request. Those 
> > informations (Username, pics, etc) are store in the user public property 
> > like described earlier. With this, I don't need to ask for the username and 
> > pic when he send a message in the chat.
>
> > When a user post something on the chat, it's actually send with php 
> > inlinepush since I don't have MySQL support on the server itself (and I 
> > need to parse BBcode with php). Here is the code from PHP and the Ape 
> > Server-side command
>
> > > //On prépare la transmission à APE
> > >            $cmd = array(array(
> > >                    'cmd' => 'chatsendmsg',
> > >                    'params' =>  array(
> > >                            'password'  => $chat->APE_PASSWORD,
> > >                            'raw'       => 'chatSendMsg',
> > >                            'channel'   => $_POST['pipename'],  //The 
> > > current channel name
> > >                            'data'          => array(
> > >                                    'chatmsg'               => $msg,
> > >                                    'userid'                        => 
> > > $user->data['user_id'],
> > >                                    'pubid'                 => 
> > > $_POST['upid'],
> > >                            ),
> > >               )
> > >            ));
>
> > >            //On transmet à APE
> > >            $data = file_get_contents($chat->APE_SERVER . 
> > > urlencode(json_encode($cmd)));
> > > Ape.registerCmd("chatsendmsg", false, function(params, infos) {
> > >    if (params.password == Ape.config("inlinepush.conf", "password")) {
>
> > >            if ($defined(params.channel) && $defined(params.data) && 
> > > $defined(params.raw)) {
> > >                    var chan = Ape.getChannelByName(params.channel);
> > >                    if (!$defined(chan)) return ["401", "UNKNOWN_CHANNEL"];
>
> > >                    //Get Ape user Info from PubID
> > >                    var thisUser = Ape.getUserByPubid(params.data.pubid);
>
> > >                    //validate the phpBB ID match for security
> > >                    if (params.data.userid != 
> > > thisUser.getProperty('userid')) {
> > >                            return ["092", "BAD_PHP_USERID"];
> > >                    }
>
> > >                    //Send data to the channel
> > >                    chan.pipe.sendRaw("chatSendMsg", {
> > >                            "chatmsg": params.data.chatmsg,
> > >                            "username": thisUser.getProperty('username'),
> > >                            "avatar": thisUser.getProperty('avatar'),
> > >                            "userid": thisUser.getProperty('userid'),
> > >                 

[APE Project] Re: ShoutBox With Private Chat

2011-11-28 Thread Rossco
Hello,

the reason is I have the APE server on the same server as my site and
it's on a sub domain.  It does work, I tested using the test script
and it works just fine as do the demos.

I am making some headway, however I am facing some issues using APE
with mootools 1.4.  I know you don't use mootools but perhaps someone
else can help.

I have the mootools 1.4 lib and the more lib to match as these are
controlling other effects etc on the site.  I am hitting compatibility
issues including the MooTools.js and mootools-core.js files on the
same page.  Anyone know how to get APE and it's files working in
tandem with 1.4 and the more lib?

Thanks!

On Nov 28, 3:48 pm, Louis Charette  wrote:
> I included "/ape/Clients/mootools-core.js", "/ape/Clients/JavaScript.js" and 
> "/ape/config.js". I use Jquery instead of Mootool, but somehow 
> "mootools-core" is needed for Ape to work. Maybe someone else could give more 
> info about this as I not sure why I need both Mootools and Javascript.js, 
> except the fact that it works.
>
> The config should look like this:
> APE.Config.baseUrl = 'http://battlefieldnations.com';//APE JSF
> APE.Config.domain = 'battlefieldnations.com';
> APE.Config.server = 'battlefieldnations.com:6969'; //APE server URL
>
> OR
>
> APE.Config.baseUrl = 'http://shout.battlefieldnations.com';//APE JSF
> APE.Config.domain = 'battlefieldnations.com';
> APE.Config.server = 'shout.battlefieldnations.com:6969'; //APE server URL
>
> You tested your setup with the "check" tool? The "0" in "Ape.Config.Server" 
> URL seems wrong.
>
> Le 2011-11-28 à 06:24, Rossco a écrit :
>
>
>
>
>
>
>
> > Some information about my setup.
>
> > I have a subdomain setup with a wildcard.
> > *shout.battlefieldnations.com
>
> > My config is as follows,
>
> > APE.Config.baseUrl = 'http://shout.battlefieldnations.com';//APE JSF
> > APE.Config.domain = 'battlefieldnations.com';
> > APE.Config.server = '0.shout.battlefieldnations.com:6969'; //APE
> > server URL
>
> > On Nov 28, 10:22 am, Rossco  wrote:
> >> Hello,
>
> >> I'm trying to understand how you've managed to do this.  Being new to
> >> APE it's quite difficult to understand.
>
> >> Which Javascript files do I need to include in the head of my page?
> >> Just the mootools-core, mootools and config?
>
> >> I'm having some difficulty with APE but I'm hoping I can achieve what
> >> I need!
>
> >> Thanks
>
> >> On Nov 26, 10:55 pm, Louis Charette  wrote:
>
> >>> I didn't use the session restore thing, but it looks ok.
>
> >>> I may suggests that you use the "user.setProperty" server side command to 
> >>> assign info to a user, even the username. 
> >>> Seehttp://www.ape-project.org/docs/server/users/user.setproperty.htmlfor
> >>>  When you specify the username in the "core.start", you're limited 
> >>> regarding certain character or the length of the username.
>
> >>> Here's a example of my code if you need it:
>
>  chat = new APE.Chat();
>
>  //Load APE
>  chat.load({
>     identifier: 'SC_Chat',
>     channel: 'listeSalon'
>  });
>
>  //Once Ape is ready, connect to server
>  chat.addEvent('load', function(core){
>     chat.core.start({
>             'name': $time().toString(),
>     });
>  });
>
>  chat.addEvent('multiPipeCreate', function(pipe, options){
>
>     //If we just joined the "lobby" channel...
>     if (pipe.name == "listesalon") {
>
>             //Get the info from PHP. PHP will send them to the server 
>  with InlinePush
>             $.ajax({
>                     type: "POST",
>                     url: baseUrl+'chat',
>                     dataType: "html",
>                     data: 
>  "action=serverAuth&firstinit=1&upid="+this.core.user.pubid,
>                     success: function(data) {
>                             //Ready to chat
>                             // [...]
>                     }
>             });
>     }
>  });
>
> >>> The AJAX request send info to Ape with InlinePush kind of request. Those 
> >>> informations (Username, pics, etc) are store in the user public property 
> >>> like described earlier. With this, I don't need to ask for the username 
> >>> and pic when he send a message in the chat.
>
> >>> When a user post something on the chat, it's actually send with php 
> >>> inlinepush since I don't have MySQL support on the server itself (and I 
> >>> need to parse BBcode with php). Here is the code from PHP and the Ape 
> >>> Server-side command
>
>  //On prépare la transmission à APE
>             $cmd = array(array(
>                     'cmd' => 'chatsendmsg',
>                     'params' =>  array(
>                             'password'  => $chat->APE_PASSWORD,
>                             'raw'       => 'chatSendMsg',
>                             'channel'   => $_POST['pipename'],  //The 
>  current channel name
>                             'data'      

[APE Project] Re: ShoutBox With Private Chat

2011-11-28 Thread Rossco
I just tried the 1.4.1 lib compressed using compatibility and that's
worked.  :D

On Nov 28, 5:52 pm, Nicolas Guibert 
wrote:
> Using APE with mootools >1.3 does not seem to work indeed. So I have stayed
> with 1.2.4 here.
>
> 2011/11/28 Pablo Tejada 
>
>
>
>
>
>
>
> > Try the plain JavaScript.js file instead
> > Afterall all you need the APE JSF is for reciving and sending messages.
> > Once you get the messages you can manipulated them with whatever JS
> > framework you want.
> > On Nov 28, 2011 12:28 PM, "Rossco"  wrote:
>
> >> Hello,
>
> >> the reason is I have the APE server on the same server as my site and
> >> it's on a sub domain.  It does work, I tested using the test script
> >> and it works just fine as do the demos.
>
> >> I am making some headway, however I am facing some issues using APE
> >> with mootools 1.4.  I know you don't use mootools but perhaps someone
> >> else can help.
>
> >> I have the mootools 1.4 lib and the more lib to match as these are
> >> controlling other effects etc on the site.  I am hitting compatibility
> >> issues including the MooTools.js and mootools-core.js files on the
> >> same page.  Anyone know how to get APE and it's files working in
> >> tandem with 1.4 and the more lib?
>
> >> Thanks!
>
> >> On Nov 28, 3:48 pm, Louis Charette  wrote:
> >> > I included "/ape/Clients/mootools-core.js",
> >> "/ape/Clients/JavaScript.js" and "/ape/config.js". I use Jquery instead of
> >> Mootool, but somehow "mootools-core" is needed for Ape to work. Maybe
> >> someone else could give more info about this as I not sure why I need both
> >> Mootools and Javascript.js, except the fact that it works.
>
> >> > The config should look like this:
> >> > APE.Config.baseUrl = 'http://battlefieldnations.com';//APEJSF
> >> > APE.Config.domain = 'battlefieldnations.com';
> >> > APE.Config.server = 'battlefieldnations.com:6969'; //APE server URL
>
> >> > OR
>
> >> > APE.Config.baseUrl = 'http://shout.battlefieldnations.com';//APEJSF
> >> > APE.Config.domain = 'battlefieldnations.com';
> >> > APE.Config.server = 'shout.battlefieldnations.com:6969'; //APE server
> >> URL
>
> >> > You tested your setup with the "check" tool? The "0" in
> >> "Ape.Config.Server" URL seems wrong.
>
> >> > Le 2011-11-28 à 06:24, Rossco a écrit :
>
> >> > > Some information about my setup.
>
> >> > > I have a subdomain setup with a wildcard.
> >> > > *shout.battlefieldnations.com
>
> >> > > My config is as follows,
>
> >> > > APE.Config.baseUrl = 'http://shout.battlefieldnations.com';//APEJSF
> >> > > APE.Config.domain = 'battlefieldnations.com';
> >> > > APE.Config.server = '0.shout.battlefieldnations.com:6969'; //APE
> >> > > server URL
>
> >> > > On Nov 28, 10:22 am, Rossco  wrote:
> >> > >> Hello,
>
> >> > >> I'm trying to understand how you've managed to do this.  Being new to
> >> > >> APE it's quite difficult to understand.
>
> >> > >> Which Javascript files do I need to include in the head of my page?
> >> > >> Just the mootools-core, mootools and config?
>
> >> > >> I'm having some difficulty with APE but I'm hoping I can achieve what
> >> > >> I need!
>
> >> > >> Thanks
>
> >> > >> On Nov 26, 10:55 pm, Louis Charette 
> >> wrote:
>
> >> > >>> I didn't use the session restore thing, but it looks ok.
>
> >> > >>> I may suggests that you use the "user.setProperty" server side
> >> command to assign info to a user, even the username. Seehttp://
> >>www.ape-project.org/docs/server/users/user.setproperty.htmlfor When
> >> you specify the username in the "core.start", you're limited regarding
> >> certain character or the length of the username.
>
> >> > >>> Here's a example of my code if you need it:
>
> >> >  chat = new APE.Chat();
>
> >> >  //Load APE
> >> >  chat.load({
> >> >     identifier: 'SC_Chat',
> >> >     channel: 'listeSalon'
> >> >  });
>
> >> >  //Once Ape is ready, connect to server
> >> >  chat.addEvent('load', function(core){
> >> >     chat.core.start({
> >> >             'name': $time().toString(),
> >> >     });
> >> >  });
>
> >> >  chat.addEvent('multiPipeCreate', function(pipe, options){
>
> >> >     //If we just joined the "lobby" channel...
> >> >     if (pipe.name == "listesalon") {
>
> >> >             //Get the info from PHP. PHP will send them to the
> >> server with InlinePush
> >> >             $.ajax({
> >> >                     type: "POST",
> >> >                     url: baseUrl+'chat',
> >> >                     dataType: "html",
> >> >                     data:
> >> "action=serverAuth&firstinit=1&upid="+this.core.user.pubid,
> >> >                     success: function(data) {
> >> >                             //Ready to chat
> >> >                             // [...]
> >> >                     }
> >> >             });
> >> >     }
> >> >  });
>
> >> > >>> The AJAX request send info to Ape with InlinePush kind of request.
> >> Those informations (Username, 

[APE Project] Re: ShoutBox With Private Chat

2011-12-01 Thread Rossco
Hey all,

I've tried and failed in my attempts to create a private messaging
idea.

I have a class that has many general functions for my site menu
animation etc and included my attempts to create the private chat idea
in this class.  I have a function that allows me to click one or
multiple buddies on a list, this is the list that will initiate the
private chats, it does work in terms of it creating the element and
form from which to start the chat but that's as far as I'm getting.  I
have each form element linking to a ajax request to send to the server
but my guess is that this is doing something that APE is actually
meant to take care of by default rather than create an ajax request to
send info to a php script that then sends the message to APE.

My script to create the form for each of the buddies you wish to
private message is like so.

var buddyname = this.getElements('.buddy-info').get('id');
this.chatbox = new Element('div',   {'id': 'chat-'+buddyname, 'class':
'privatechatbox', 'html':''+buddyname+''}).inject('chats', 'bottom');
this.chatboxform = new 
Element('form').inject(this.chatbox,
'bottom');
this.chatboxclose = new Element('div',
{'class':'close'}).inject(this.chatbox, 'top');
this.chatboxchat = new Element('div',
{'class':'chat'}).inject(this.chatboxform);
this.chatboxinput = new 
Element('input', {'type': 'text',
'value':'chat here'}).inject(this.chatboxform);
this.chatboxinput.addEvent('focus', 
function(){
if(this.get('value') == 'chat 
here'){
this.set('value', '');
}
});
var sendMsg = new Request({
url: 'processmsg.php',
method: 'post',
onComplete:function(){

this.chatboxinput.set('value', '');
}

});

this.chatboxform.addEvent('submit', 
function(event){
event.stop();

sendMsg.send('msg='+this.getElements('input').get('value'));
});


This is working great, when click each buddy a box appears with a form
from which to send a message but from here I am lost.

Any help would be great.

Thanks!

-- 
You received this message because you are subscribed to the Google
Groups "APE Project" group.
To post to this group, send email to ape-project@googlegroups.com
To unsubscribe from this group, send email to
ape-project+unsubscr...@googlegroups.com
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/


[APE Project] Re: ShoutBox With Private Chat

2011-12-01 Thread Rossco
I've now moved all my code that creates each of the private chats to
another JS file.

http://pastiebin.com/?page=p&id=4ed824ea8791f

At the bottom of the class you can see how I start each chat window.
I'm getting there I guess but still need some help.

-- 
You received this message because you are subscribed to the Google
Groups "APE Project" group.
To post to this group, send email to ape-project@googlegroups.com
To unsubscribe from this group, send email to
ape-project+unsubscr...@googlegroups.com
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/


[APE Project] Re: ShoutBox With Private Chat

2011-12-03 Thread Rossco
I'm not quite getting where I want so I am willing to donate to APE if
someone's able to help out and get me where I need to be.

Basically I need a way to initiate chats between 2 users, you the user
and someone else who is on a buddy list.  Each user has an ID and
username which is controlled by a CMS and I would like to track chat
history.  It would need to send info to a mysql database.

I would also like a general shoutbox that all users can add messages
to but again, related to the username/ID that is related in the CMS.
I do know mootools/PHP but just not quite getting how APE is working.

If anyone's willing to extend the amount of help, I'm happy to either
donate to APE or pay a small fee to you.  It is for a small community
of gamers so I don't have a lot of money but it would be token thanks.

Cheers!

-- 
You received this message because you are subscribed to the Google
Groups "APE Project" group.
To post to this group, send email to ape-project@googlegroups.com
To unsubscribe from this group, send email to
ape-project+unsubscr...@googlegroups.com
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/


[APE Project] Re: ShoutBox With Private Chat

2011-12-03 Thread Rossco
Hello,

thanks for your reply.

I'm actually not even at the stage of being able to send messages.  My
example I pasted 3 messages up is as far as I got.

I have looked over the chat and shoutbox examples but just not getting
how it works correctly.

On Dec 3, 9:49 pm, Pablo Tejada  wrote:
> Hey,
>
> It doesn't directly help you with what you want to do but you might
> find something very 
> usefulhttps://groups.google.com/forum/#!topic/ape-project/5pJwbIdbNGY
>
>
>
>
>
>
>
> On Sat, Dec 3, 2011 at 4:13 PM, Rossco  wrote:
> > I'm not quite getting where I want so I am willing to donate to APE if
> > someone's able to help out and get me where I need to be.
>
> > Basically I need a way to initiate chats between 2 users, you the user
> > and someone else who is on a buddy list.  Each user has an ID and
> > username which is controlled by a CMS and I would like to track chat
> > history.  It would need to send info to a mysql database.
>
> > I would also like a general shoutbox that all users can add messages
> > to but again, related to the username/ID that is related in the CMS.
> > I do know mootools/PHP but just not quite getting how APE is working.
>
> > If anyone's willing to extend the amount of help, I'm happy to either
> > donate to APE or pay a small fee to you.  It is for a small community
> > of gamers so I don't have a lot of money but it would be token thanks.
>
> > Cheers!
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "APE Project" group.
> > To post to this group, send email to ape-project@googlegroups.com
> > To unsubscribe from this group, send email to
> > ape-project+unsubscr...@googlegroups.com
> > 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/

-- 
You received this message because you are subscribed to the Google
Groups "APE Project" group.
To post to this group, send email to ape-project@googlegroups.com
To unsubscribe from this group, send email to
ape-project+unsubscr...@googlegroups.com
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/


[APE Project] Re: ShoutBox With Private Chat

2011-12-05 Thread Rossco
Hi Louis,

that would be great.  I got your message but the chat page was
erroring so I couldn't check it out.

Hopefully catch up with you during the week, I'd love to get this
working... I've spent a week and not got very far lol.

Thanks!

On Dec 5, 3:42 am, Louis Charette  wrote:
> I'll try to send to you a simplified working version of my code during the 
> week.
>
>   - Louis
>
> Le 2011-12-03 à 17:01, Rossco a écrit :
>
>
>
>
>
>
>
> > Hello,
>
> > thanks for your reply.
>
> > I'm actually not even at the stage of being able to send messages.  My
> > example I pasted 3 messages up is as far as I got.
>
> > I have looked over the chat and shoutbox examples but just not getting
> > how it works correctly.
>
> > On Dec 3, 9:49 pm, Pablo Tejada  wrote:
> >> Hey,
>
> >> It doesn't directly help you with what you want to do but you might
> >> find something very 
> >> usefulhttps://groups.google.com/forum/#!topic/ape-project/5pJwbIdbNGY
>
> >> On Sat, Dec 3, 2011 at 4:13 PM, Rossco  wrote:
> >>> I'm not quite getting where I want so I am willing to donate to APE if
> >>> someone's able to help out and get me where I need to be.
>
> >>> Basically I need a way to initiate chats between 2 users, you the user
> >>> and someone else who is on a buddy list.  Each user has an ID and
> >>> username which is controlled by a CMS and I would like to track chat
> >>> history.  It would need to send info to a mysql database.
>
> >>> I would also like a general shoutbox that all users can add messages
> >>> to but again, related to the username/ID that is related in the CMS.
> >>> I do know mootools/PHP but just not quite getting how APE is working.
>
> >>> If anyone's willing to extend the amount of help, I'm happy to either
> >>> donate to APE or pay a small fee to you.  It is for a small community
> >>> of gamers so I don't have a lot of money but it would be token thanks.
>
> >>> Cheers!
>
> >>> --
> >>> You received this message because you are subscribed to the Google
> >>> Groups "APE Project" group.
> >>> To post to this group, send email to ape-project@googlegroups.com
> >>> To unsubscribe from this group, send email to
> >>> ape-project+unsubscr...@googlegroups.com
> >>> 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/
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "APE Project" group.
> > To post to this group, send email to ape-project@googlegroups.com
> > To unsubscribe from this group, send email to
> > ape-project+unsubscr...@googlegroups.com
> > 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/

-- 
You received this message because you are subscribed to the Google
Groups "APE Project" group.
To post to this group, send email to ape-project@googlegroups.com
To unsubscribe from this group, send email to
ape-project+unsubscr...@googlegroups.com
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/


[APE Project] Re: ShoutBox With Private Chat

2011-12-06 Thread Rossco
If anyone is available to help out, please let me know what it would
cost as I would like to get this sorted out as soon as possible.

Cheers :D

-- 
You received this message because you are subscribed to the Google
Groups "APE Project" group.
To post to this group, send email to ape-project@googlegroups.com
To unsubscribe from this group, send email to
ape-project+unsubscr...@googlegroups.com
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/


[APE Project] Re: ShoutBox With Private Chat

2012-02-29 Thread Rossco

>
> I'm back with this one...
>
>  
>
> I have written my script for creating private chat boxes but I still don't 
> quite understand how to send to unipipes.  The documentation is not helpful 
> at all and the demos don't even work with IE so I don't see this being 
> useful for what I'm trying to do.
>
>  
>
> Has anyone created a simple 1 on 1 chat system?  I can send messages to 
> people individually but all users are receiving messages at the same 
> time... if that makes sense.  I need some extra help on how to aim messages 
> directly to a person so to speak.
>
>

-- 
You received this message because you are subscribed to the Google
Groups "APE Project" group.
To post to this group, send email to ape-project@googlegroups.com
To unsubscribe from this group, send email to
ape-project+unsubscr...@googlegroups.com
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/


[APE Project] Re: ShoutBox With Private Chat

2012-02-29 Thread Rossco
GOOGLE your new groups forum sucks so badly.  No idea why it just quoted 
the same post 5 times over.  

On Saturday, 26 November 2011 02:47:27 UTC, Rossco wrote:
>
> Hi there,
>
> I need some help with what I'm trying to achieve for a gaming website
> I run. What I would like is to have an ajax style shoutbox that will
> display usernames from the CMS I use to run the site as well as their
> message of course.  I can pass the user details through to the class
> using class options ({'username' : 'myname', 'userid' : 22}).
>
> I would like to extend this to allow one to one chatting as well. The
> shoutbox will just be on display at the top of the site but the one to
> one chats will be initiated by clicking a member who is on a buddy
> style list.  I would like their to be a history of the shout and one
> to one chats held so either a single chat can be resumed and those
> visiting the shoutbox will see the last 30 messages say.  Does this
> require mysql or is it already a function built in to APE?
>
> I will be using Mootools as it's my choice of library for dom effects
> etc.  Could someone how I best approach this?  I do have some
> experience with writing my own mootools scripts and classes but having
> looked through the documentation, I'm not quite sure how to do this.
>
> I am using centOS 5.3, the latest APE which is running fine according
> to the status script.
>
> Any help would be great.
>
> Thanks
>
>
On Saturday, 26 November 2011 02:47:27 UTC, Rossco wrote:
>
> Hi there,
>
> I need some help with what I'm trying to achieve for a gaming website
> I run. What I would like is to have an ajax style shoutbox that will
> display usernames from the CMS I use to run the site as well as their
> message of course.  I can pass the user details through to the class
> using class options ({'username' : 'myname', 'userid' : 22}).
>
> I would like to extend this to allow one to one chatting as well. The
> shoutbox will just be on display at the top of the site but the one to
> one chats will be initiated by clicking a member who is on a buddy
> style list.  I would like their to be a history of the shout and one
> to one chats held so either a single chat can be resumed and those
> visiting the shoutbox will see the last 30 messages say.  Does this
> require mysql or is it already a function built in to APE?
>
> I will be using Mootools as it's my choice of library for dom effects
> etc.  Could someone how I best approach this?  I do have some
> experience with writing my own mootools scripts and classes but having
> looked through the documentation, I'm not quite sure how to do this.
>
> I am using centOS 5.3, the latest APE which is running fine according
> to the status script.
>
> Any help would be great.
>
> Thanks
>
>

-- 
You received this message because you are subscribed to the Google
Groups "APE Project" group.
To post to this group, send email to ape-project@googlegroups.com
To unsubscribe from this group, send email to
ape-project+unsubscr...@googlegroups.com
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/


[APE Project] Re: ShoutBox With Private Chat

2012-03-01 Thread Rossco
Why does IE9 keep erroring? 

SCRIPT5007: Unable to get value of the property 'detachEvent': object is 
null or undefined 
apeCoreSession.js"]}}], line 1 character 1

If I press f12 to get the IE debug up, it starts to work.  

On Saturday, 26 November 2011 02:47:27 UTC, Rossco wrote:
>
> Hi there,
>
> I need some help with what I'm trying to achieve for a gaming website
> I run. What I would like is to have an ajax style shoutbox that will
> display usernames from the CMS I use to run the site as well as their
> message of course.  I can pass the user details through to the class
> using class options ({'username' : 'myname', 'userid' : 22}).
>
> I would like to extend this to allow one to one chatting as well. The
> shoutbox will just be on display at the top of the site but the one to
> one chats will be initiated by clicking a member who is on a buddy
> style list.  I would like their to be a history of the shout and one
> to one chats held so either a single chat can be resumed and those
> visiting the shoutbox will see the last 30 messages say.  Does this
> require mysql or is it already a function built in to APE?
>
> I will be using Mootools as it's my choice of library for dom effects
> etc.  Could someone how I best approach this?  I do have some
> experience with writing my own mootools scripts and classes but having
> looked through the documentation, I'm not quite sure how to do this.
>
> I am using centOS 5.3, the latest APE which is running fine according
> to the status script.
>
> Any help would be great.
>
> Thanks
>
>
On Saturday, 26 November 2011 02:47:27 UTC, Rossco wrote:
>
> Hi there,
>
> I need some help with what I'm trying to achieve for a gaming website
> I run. What I would like is to have an ajax style shoutbox that will
> display usernames from the CMS I use to run the site as well as their
> message of course.  I can pass the user details through to the class
> using class options ({'username' : 'myname', 'userid' : 22}).
>
> I would like to extend this to allow one to one chatting as well. The
> shoutbox will just be on display at the top of the site but the one to
> one chats will be initiated by clicking a member who is on a buddy
> style list.  I would like their to be a history of the shout and one
> to one chats held so either a single chat can be resumed and those
> visiting the shoutbox will see the last 30 messages say.  Does this
> require mysql or is it already a function built in to APE?
>
> I will be using Mootools as it's my choice of library for dom effects
> etc.  Could someone how I best approach this?  I do have some
> experience with writing my own mootools scripts and classes but having
> looked through the documentation, I'm not quite sure how to do this.
>
> I am using centOS 5.3, the latest APE which is running fine according
> to the status script.
>
> Any help would be great.
>
> Thanks
>
>
On Saturday, 26 November 2011 02:47:27 UTC, Rossco wrote:
>
> Hi there,
>
> I need some help with what I'm trying to achieve for a gaming website
> I run. What I would like is to have an ajax style shoutbox that will
> display usernames from the CMS I use to run the site as well as their
> message of course.  I can pass the user details through to the class
> using class options ({'username' : 'myname', 'userid' : 22}).
>
> I would like to extend this to allow one to one chatting as well. The
> shoutbox will just be on display at the top of the site but the one to
> one chats will be initiated by clicking a member who is on a buddy
> style list.  I would like their to be a history of the shout and one
> to one chats held so either a single chat can be resumed and those
> visiting the shoutbox will see the last 30 messages say.  Does this
> require mysql or is it already a function built in to APE?
>
> I will be using Mootools as it's my choice of library for dom effects
> etc.  Could someone how I best approach this?  I do have some
> experience with writing my own mootools scripts and classes but having
> looked through the documentation, I'm not quite sure how to do this.
>
> I am using centOS 5.3, the latest APE which is running fine according
> to the status script.
>
> Any help would be great.
>
> Thanks
>
>
On Saturday, 26 November 2011 02:47:27 UTC, Rossco wrote:
>
> Hi there,
>
> I need some help with what I'm trying to achieve for a gaming website
> I run. What I would like is to have an ajax style shoutbox that will
> display usernames from the CMS I use to run the site as well as their
> message of course.  I can pass the user details through to the class
> using class options ({'username' : 'myname', 'userid' : 22}).
>
> I would like to extend this to allow one to one chatting as well. The
> shoutbox will just be on display at the top of the site but the one to
> one chats will be initiated by clicking a member who is on a buddy
> style list.  I would like their to be a history of the shout and one
> to one chats held so either a single chat can be resu

[APE Project] Re: ShoutBox With Private Chat

2012-03-01 Thread Rossco

>
> Why does IE9 keep erroring? 
>
> SCRIPT5007: Unable to get value of the property 'detachEvent': object is 
> null or undefined 
> apeCoreSession.js"]}}], line 1 character 1
>
> If I press f12 to get the IE debug up, it starts to work. 
>
>

-- 
You received this message because you are subscribed to the Google
Groups "APE Project" group.
To post to this group, send email to ape-project@googlegroups.com
To unsubscribe from this group, send email to
ape-project+unsubscr...@googlegroups.com
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/


Re: [APE Project] Re: ShoutBox With Private Chat

2011-11-26 Thread Louis Charette
I didn't use the session restore thing, but it looks ok.

I may suggests that you use the "user.setProperty" server side command to 
assign info to a user, even the username. See 
http://www.ape-project.org/docs/server/users/user.setproperty.html for details. 
When you specify the username in the "core.start", you're limited regarding 
certain character or the length of the username.


Here's a example of my code if you need it:


> chat = new APE.Chat();
> 
> //Load APE
> chat.load({
>   identifier: 'SC_Chat',
>   channel: 'listeSalon'
> });
> 
> //Once Ape is ready, connect to server
> chat.addEvent('load', function(core){
>   chat.core.start({
>   'name': $time().toString(),
>   }); 
> });
> 
> chat.addEvent('multiPipeCreate', function(pipe, options){
>   
>   //If we just joined the "lobby" channel...  
>   if (pipe.name == "listesalon") {
>   
>   //Get the info from PHP. PHP will send them to the server with 
> InlinePush
>   $.ajax({
>   type: "POST",
>   url: baseUrl+'chat',
>   dataType: "html",
>   data: 
> "action=serverAuth&firstinit=1&upid="+this.core.user.pubid,
>   success: function(data) {
>   //Ready to chat
>   // [...]
>   }
>   });
>   }
> });

The AJAX request send info to Ape with InlinePush kind of request. Those 
informations (Username, pics, etc) are store in the user public property like 
described earlier. With this, I don't need to ask for the username and pic when 
he send a message in the chat.

When a user post something on the chat, it's actually send with php inlinepush 
since I don't have MySQL support on the server itself (and I need to parse 
BBcode with php). Here is the code from PHP and the Ape Server-side command

> //On prépare la transmission à APE
>   $cmd = array(array( 
>   'cmd' => 'chatsendmsg', 
>   'params' =>  array( 
>   'password'  => $chat->APE_PASSWORD, 
>   'raw'   => 'chatSendMsg', 
>   'channel'   => $_POST['pipename'],  //The 
> current channel name
>   'data'  => array(
>   'chatmsg'   => $msg,
>   'userid'=> 
> $user->data['user_id'],
>   'pubid' => 
> $_POST['upid'],
>   ),
>  ) 
>   ));
>   
>   
>   //On transmet à APE
>   $data = file_get_contents($chat->APE_SERVER . 
> urlencode(json_encode($cmd)));



> Ape.registerCmd("chatsendmsg", false, function(params, infos) {
>   if (params.password == Ape.config("inlinepush.conf", "password")) {
>   
>   if ($defined(params.channel) && $defined(params.data) && 
> $defined(params.raw)) {
>   var chan = Ape.getChannelByName(params.channel);
>   if (!$defined(chan)) return ["401", "UNKNOWN_CHANNEL"];
>   
>   //Get Ape user Info from PubID
>   var thisUser = Ape.getUserByPubid(params.data.pubid);
>   
>   //validate the phpBB ID match for security
>   if (params.data.userid != 
> thisUser.getProperty('userid')) {
>   return ["092", "BAD_PHP_USERID"];   
>   } 
>   
>   //Send data to the channel
>   chan.pipe.sendRaw("chatSendMsg", {
>   "chatmsg": params.data.chatmsg,
>   "username": thisUser.getProperty('username'),
>   "avatar": thisUser.getProperty('avatar'),
>   "userid": thisUser.getProperty('userid'),
>   "pipename": chan.getProperty('name'),
>   });
>   
>   //Tout est ok
>   return {"name":"pushed","data":{"value":"ok"}};
>   } else {
>   return 0;
>   }
>   } else {
>   return ["400", "BAD_PASSWORD"];
>   }
> 
> });

As you can see, you need to know the user Public ID. To send to only one 
person, it's the same thing, but you need to know both user pubid or you can 
create a temporary channel that both user need to join. For the first method, 
you change "chan.pipe.sendRaw" with:

> var toUser

Re: [APE Project] Re: ShoutBox With Private Chat

2011-11-28 Thread Louis Charette
I included "/ape/Clients/mootools-core.js", "/ape/Clients/JavaScript.js" and 
"/ape/config.js". I use Jquery instead of Mootool, but somehow "mootools-core" 
is needed for Ape to work. Maybe someone else could give more info about this 
as I not sure why I need both Mootools and Javascript.js, except the fact that 
it works.

The config should look like this:
APE.Config.baseUrl = 'http://battlefieldnations.com'; //APE JSF 
APE.Config.domain = 'battlefieldnations.com'; 
APE.Config.server = 'battlefieldnations.com:6969'; //APE server URL 

OR 

APE.Config.baseUrl = 'http://shout.battlefieldnations.com'; //APE JSF 
APE.Config.domain = 'battlefieldnations.com'; 
APE.Config.server = 'shout.battlefieldnations.com:6969'; //APE server URL 

You tested your setup with the "check" tool? The "0" in "Ape.Config.Server" URL 
seems wrong.

Le 2011-11-28 à 06:24, Rossco a écrit :

> Some information about my setup.
> 
> I have a subdomain setup with a wildcard.
> *shout.battlefieldnations.com
> 
> My config is as follows,
> 
> APE.Config.baseUrl = 'http://shout.battlefieldnations.com'; //APE JSF
> APE.Config.domain = 'battlefieldnations.com';
> APE.Config.server = '0.shout.battlefieldnations.com:6969'; //APE
> server URL
> 
> On Nov 28, 10:22 am, Rossco  wrote:
>> Hello,
>> 
>> I'm trying to understand how you've managed to do this.  Being new to
>> APE it's quite difficult to understand.
>> 
>> Which Javascript files do I need to include in the head of my page?
>> Just the mootools-core, mootools and config?
>> 
>> I'm having some difficulty with APE but I'm hoping I can achieve what
>> I need!
>> 
>> Thanks
>> 
>> On Nov 26, 10:55 pm, Louis Charette  wrote:
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>>> I didn't use the session restore thing, but it looks ok.
>> 
>>> I may suggests that you use the "user.setProperty" server side command to 
>>> assign info to a user, even the username. 
>>> Seehttp://www.ape-project.org/docs/server/users/user.setproperty.htmlfordetails.
>>>  When you specify the username in the "core.start", you're limited 
>>> regarding certain character or the length of the username.
>> 
>>> Here's a example of my code if you need it:
>> 
 chat = new APE.Chat();
>> 
 //Load APE
 chat.load({
identifier: 'SC_Chat',
channel: 'listeSalon'
 });
>> 
 //Once Ape is ready, connect to server
 chat.addEvent('load', function(core){
chat.core.start({
'name': $time().toString(),
});
 });
>> 
 chat.addEvent('multiPipeCreate', function(pipe, options){
>> 
//If we just joined the "lobby" channel...
if (pipe.name == "listesalon") {
>> 
//Get the info from PHP. PHP will send them to the server with 
 InlinePush
$.ajax({
type: "POST",
url: baseUrl+'chat',
dataType: "html",
data: 
 "action=serverAuth&firstinit=1&upid="+this.core.user.pubid,
success: function(data) {
//Ready to chat
// [...]
}
});
}
 });
>> 
>>> The AJAX request send info to Ape with InlinePush kind of request. Those 
>>> informations (Username, pics, etc) are store in the user public property 
>>> like described earlier. With this, I don't need to ask for the username and 
>>> pic when he send a message in the chat.
>> 
>>> When a user post something on the chat, it's actually send with php 
>>> inlinepush since I don't have MySQL support on the server itself (and I 
>>> need to parse BBcode with php). Here is the code from PHP and the Ape 
>>> Server-side command
>> 
 //On prépare la transmission à APE
$cmd = array(array(
'cmd' => 'chatsendmsg',
'params' =>  array(
'password'  => $chat->APE_PASSWORD,
'raw'   => 'chatSendMsg',
'channel'   => $_POST['pipename'],  //The 
 current channel name
'data'  => array(
'chatmsg'   => $msg,
'userid'=> 
 $user->data['user_id'],
'pubid' => 
 $_POST['upid'],
),
   )
));
>> 
//On transmet à APE
$data = file_get_contents($chat->APE_SERVER . 
 urlencode(json_encode($cmd)));
 Ape.registerCmd("chatsendmsg", false, function(params, infos) {
if (params.password == Ape.config("inlinepush.conf", "password")) {
>> 
if ($defined(params.channel) && $defined(params.data) && 
 $defined(params.raw)) {
var chan = Ape.getChannelByName(params.chann

Re: [APE Project] Re: ShoutBox With Private Chat

2011-11-28 Thread Pablo Tejada
Try the plain JavaScript.js file instead
Afterall all you need the APE JSF is for reciving and sending messages.
Once you get the messages you can manipulated them with whatever JS
framework you want.
On Nov 28, 2011 12:28 PM, "Rossco"  wrote:

> Hello,
>
> the reason is I have the APE server on the same server as my site and
> it's on a sub domain.  It does work, I tested using the test script
> and it works just fine as do the demos.
>
> I am making some headway, however I am facing some issues using APE
> with mootools 1.4.  I know you don't use mootools but perhaps someone
> else can help.
>
> I have the mootools 1.4 lib and the more lib to match as these are
> controlling other effects etc on the site.  I am hitting compatibility
> issues including the MooTools.js and mootools-core.js files on the
> same page.  Anyone know how to get APE and it's files working in
> tandem with 1.4 and the more lib?
>
> Thanks!
>
> On Nov 28, 3:48 pm, Louis Charette  wrote:
> > I included "/ape/Clients/mootools-core.js", "/ape/Clients/JavaScript.js"
> and "/ape/config.js". I use Jquery instead of Mootool, but somehow
> "mootools-core" is needed for Ape to work. Maybe someone else could give
> more info about this as I not sure why I need both Mootools and
> Javascript.js, except the fact that it works.
> >
> > The config should look like this:
> > APE.Config.baseUrl = 'http://battlefieldnations.com';//APE JSF
> > APE.Config.domain = 'battlefieldnations.com';
> > APE.Config.server = 'battlefieldnations.com:6969'; //APE server URL
> >
> > OR
> >
> > APE.Config.baseUrl = 'http://shout.battlefieldnations.com';//APE JSF
> > APE.Config.domain = 'battlefieldnations.com';
> > APE.Config.server = 'shout.battlefieldnations.com:6969'; //APE server
> URL
> >
> > You tested your setup with the "check" tool? The "0" in
> "Ape.Config.Server" URL seems wrong.
> >
> > Le 2011-11-28 à 06:24, Rossco a écrit :
> >
> >
> >
> >
> >
> >
> >
> > > Some information about my setup.
> >
> > > I have a subdomain setup with a wildcard.
> > > *shout.battlefieldnations.com
> >
> > > My config is as follows,
> >
> > > APE.Config.baseUrl = 'http://shout.battlefieldnations.com';//APE JSF
> > > APE.Config.domain = 'battlefieldnations.com';
> > > APE.Config.server = '0.shout.battlefieldnations.com:6969'; //APE
> > > server URL
> >
> > > On Nov 28, 10:22 am, Rossco  wrote:
> > >> Hello,
> >
> > >> I'm trying to understand how you've managed to do this.  Being new to
> > >> APE it's quite difficult to understand.
> >
> > >> Which Javascript files do I need to include in the head of my page?
> > >> Just the mootools-core, mootools and config?
> >
> > >> I'm having some difficulty with APE but I'm hoping I can achieve what
> > >> I need!
> >
> > >> Thanks
> >
> > >> On Nov 26, 10:55 pm, Louis Charette  wrote:
> >
> > >>> I didn't use the session restore thing, but it looks ok.
> >
> > >>> I may suggests that you use the "user.setProperty" server side
> command to assign info to a user, even the username. Seehttp://
> www.ape-project.org/docs/server/users/user.setproperty.htmlfor When
> you specify the username in the "core.start", you're limited regarding
> certain character or the length of the username.
> >
> > >>> Here's a example of my code if you need it:
> >
> >  chat = new APE.Chat();
> >
> >  //Load APE
> >  chat.load({
> > identifier: 'SC_Chat',
> > channel: 'listeSalon'
> >  });
> >
> >  //Once Ape is ready, connect to server
> >  chat.addEvent('load', function(core){
> > chat.core.start({
> > 'name': $time().toString(),
> > });
> >  });
> >
> >  chat.addEvent('multiPipeCreate', function(pipe, options){
> >
> > //If we just joined the "lobby" channel...
> > if (pipe.name == "listesalon") {
> >
> > //Get the info from PHP. PHP will send them to the
> server with InlinePush
> > $.ajax({
> > type: "POST",
> > url: baseUrl+'chat',
> > dataType: "html",
> > data:
> "action=serverAuth&firstinit=1&upid="+this.core.user.pubid,
> > success: function(data) {
> > //Ready to chat
> > // [...]
> > }
> > });
> > }
> >  });
> >
> > >>> The AJAX request send info to Ape with InlinePush kind of request.
> Those informations (Username, pics, etc) are store in the user public
> property like described earlier. With this, I don't need to ask for the
> username and pic when he send a message in the chat.
> >
> > >>> When a user post something on the chat, it's actually send with php
> inlinepush since I don't have MySQL support on the server itself (and I
> need to parse BBcode with php). Here is the code from PHP and the Ape
> Server-side command
> >
> >  //On prépare la transmission à APE
> >  

Re: [APE Project] Re: ShoutBox With Private Chat

2011-11-28 Thread Nicolas Guibert
Using APE with mootools >1.3 does not seem to work indeed. So I have stayed
with 1.2.4 here.



2011/11/28 Pablo Tejada 

> Try the plain JavaScript.js file instead
> Afterall all you need the APE JSF is for reciving and sending messages.
> Once you get the messages you can manipulated them with whatever JS
> framework you want.
> On Nov 28, 2011 12:28 PM, "Rossco"  wrote:
>
>> Hello,
>>
>> the reason is I have the APE server on the same server as my site and
>> it's on a sub domain.  It does work, I tested using the test script
>> and it works just fine as do the demos.
>>
>> I am making some headway, however I am facing some issues using APE
>> with mootools 1.4.  I know you don't use mootools but perhaps someone
>> else can help.
>>
>> I have the mootools 1.4 lib and the more lib to match as these are
>> controlling other effects etc on the site.  I am hitting compatibility
>> issues including the MooTools.js and mootools-core.js files on the
>> same page.  Anyone know how to get APE and it's files working in
>> tandem with 1.4 and the more lib?
>>
>> Thanks!
>>
>> On Nov 28, 3:48 pm, Louis Charette  wrote:
>> > I included "/ape/Clients/mootools-core.js",
>> "/ape/Clients/JavaScript.js" and "/ape/config.js". I use Jquery instead of
>> Mootool, but somehow "mootools-core" is needed for Ape to work. Maybe
>> someone else could give more info about this as I not sure why I need both
>> Mootools and Javascript.js, except the fact that it works.
>> >
>> > The config should look like this:
>> > APE.Config.baseUrl = 'http://battlefieldnations.com';//APE JSF
>> > APE.Config.domain = 'battlefieldnations.com';
>> > APE.Config.server = 'battlefieldnations.com:6969'; //APE server URL
>> >
>> > OR
>> >
>> > APE.Config.baseUrl = 'http://shout.battlefieldnations.com';//APE JSF
>> > APE.Config.domain = 'battlefieldnations.com';
>> > APE.Config.server = 'shout.battlefieldnations.com:6969'; //APE server
>> URL
>> >
>> > You tested your setup with the "check" tool? The "0" in
>> "Ape.Config.Server" URL seems wrong.
>> >
>> > Le 2011-11-28 à 06:24, Rossco a écrit :
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> > > Some information about my setup.
>> >
>> > > I have a subdomain setup with a wildcard.
>> > > *shout.battlefieldnations.com
>> >
>> > > My config is as follows,
>> >
>> > > APE.Config.baseUrl = 'http://shout.battlefieldnations.com';//APE JSF
>> > > APE.Config.domain = 'battlefieldnations.com';
>> > > APE.Config.server = '0.shout.battlefieldnations.com:6969'; //APE
>> > > server URL
>> >
>> > > On Nov 28, 10:22 am, Rossco  wrote:
>> > >> Hello,
>> >
>> > >> I'm trying to understand how you've managed to do this.  Being new to
>> > >> APE it's quite difficult to understand.
>> >
>> > >> Which Javascript files do I need to include in the head of my page?
>> > >> Just the mootools-core, mootools and config?
>> >
>> > >> I'm having some difficulty with APE but I'm hoping I can achieve what
>> > >> I need!
>> >
>> > >> Thanks
>> >
>> > >> On Nov 26, 10:55 pm, Louis Charette 
>> wrote:
>> >
>> > >>> I didn't use the session restore thing, but it looks ok.
>> >
>> > >>> I may suggests that you use the "user.setProperty" server side
>> command to assign info to a user, even the username. Seehttp://
>> www.ape-project.org/docs/server/users/user.setproperty.htmlfor When
>> you specify the username in the "core.start", you're limited regarding
>> certain character or the length of the username.
>> >
>> > >>> Here's a example of my code if you need it:
>> >
>> >  chat = new APE.Chat();
>> >
>> >  //Load APE
>> >  chat.load({
>> > identifier: 'SC_Chat',
>> > channel: 'listeSalon'
>> >  });
>> >
>> >  //Once Ape is ready, connect to server
>> >  chat.addEvent('load', function(core){
>> > chat.core.start({
>> > 'name': $time().toString(),
>> > });
>> >  });
>> >
>> >  chat.addEvent('multiPipeCreate', function(pipe, options){
>> >
>> > //If we just joined the "lobby" channel...
>> > if (pipe.name == "listesalon") {
>> >
>> > //Get the info from PHP. PHP will send them to the
>> server with InlinePush
>> > $.ajax({
>> > type: "POST",
>> > url: baseUrl+'chat',
>> > dataType: "html",
>> > data:
>> "action=serverAuth&firstinit=1&upid="+this.core.user.pubid,
>> > success: function(data) {
>> > //Ready to chat
>> > // [...]
>> > }
>> > });
>> > }
>> >  });
>> >
>> > >>> The AJAX request send info to Ape with InlinePush kind of request.
>> Those informations (Username, pics, etc) are store in the user public
>> property like described earlier. With this, I don't need to ask for the
>> username and pic when he send a message in the chat.
>> >
>> > >>> When a user post something on the

Re: [APE Project] Re: ShoutBox With Private Chat

2011-11-28 Thread Nicolas Guibert
Good :)

2011/11/28 Rossco 

> I just tried the 1.4.1 lib compressed using compatibility and that's
> worked.  :D
>
> On Nov 28, 5:52 pm, Nicolas Guibert 
> wrote:
> > Using APE with mootools >1.3 does not seem to work indeed. So I have
> stayed
> > with 1.2.4 here.
> >
> > 2011/11/28 Pablo Tejada 
> >
> >
> >
> >
> >
> >
> >
> > > Try the plain JavaScript.js file instead
> > > Afterall all you need the APE JSF is for reciving and sending messages.
> > > Once you get the messages you can manipulated them with whatever JS
> > > framework you want.
> > > On Nov 28, 2011 12:28 PM, "Rossco"  wrote:
> >
> > >> Hello,
> >
> > >> the reason is I have the APE server on the same server as my site and
> > >> it's on a sub domain.  It does work, I tested using the test script
> > >> and it works just fine as do the demos.
> >
> > >> I am making some headway, however I am facing some issues using APE
> > >> with mootools 1.4.  I know you don't use mootools but perhaps someone
> > >> else can help.
> >
> > >> I have the mootools 1.4 lib and the more lib to match as these are
> > >> controlling other effects etc on the site.  I am hitting compatibility
> > >> issues including the MooTools.js and mootools-core.js files on the
> > >> same page.  Anyone know how to get APE and it's files working in
> > >> tandem with 1.4 and the more lib?
> >
> > >> Thanks!
> >
> > >> On Nov 28, 3:48 pm, Louis Charette  wrote:
> > >> > I included "/ape/Clients/mootools-core.js",
> > >> "/ape/Clients/JavaScript.js" and "/ape/config.js". I use Jquery
> instead of
> > >> Mootool, but somehow "mootools-core" is needed for Ape to work. Maybe
> > >> someone else could give more info about this as I not sure why I need
> both
> > >> Mootools and Javascript.js, except the fact that it works.
> >
> > >> > The config should look like this:
> > >> > APE.Config.baseUrl = 'http://battlefieldnations.com';//APEJSF
> > >> > APE.Config.domain = 'battlefieldnations.com';
> > >> > APE.Config.server = 'battlefieldnations.com:6969'; //APE server URL
> >
> > >> > OR
> >
> > >> > APE.Config.baseUrl = 'http://shout.battlefieldnations.com';//APEJSF
> > >> > APE.Config.domain = 'battlefieldnations.com';
> > >> > APE.Config.server = 'shout.battlefieldnations.com:6969'; //APE
> server
> > >> URL
> >
> > >> > You tested your setup with the "check" tool? The "0" in
> > >> "Ape.Config.Server" URL seems wrong.
> >
> > >> > Le 2011-11-28 à 06:24, Rossco a écrit :
> >
> > >> > > Some information about my setup.
> >
> > >> > > I have a subdomain setup with a wildcard.
> > >> > > *shout.battlefieldnations.com
> >
> > >> > > My config is as follows,
> >
> > >> > > APE.Config.baseUrl = 'http://shout.battlefieldnations.com
> ';//APEJSF
> > >> > > APE.Config.domain = 'battlefieldnations.com';
> > >> > > APE.Config.server = '0.shout.battlefieldnations.com:6969'; //APE
> > >> > > server URL
> >
> > >> > > On Nov 28, 10:22 am, Rossco  wrote:
> > >> > >> Hello,
> >
> > >> > >> I'm trying to understand how you've managed to do this.  Being
> new to
> > >> > >> APE it's quite difficult to understand.
> >
> > >> > >> Which Javascript files do I need to include in the head of my
> page?
> > >> > >> Just the mootools-core, mootools and config?
> >
> > >> > >> I'm having some difficulty with APE but I'm hoping I can achieve
> what
> > >> > >> I need!
> >
> > >> > >> Thanks
> >
> > >> > >> On Nov 26, 10:55 pm, Louis Charette 
> > >> wrote:
> >
> > >> > >>> I didn't use the session restore thing, but it looks ok.
> >
> > >> > >>> I may suggests that you use the "user.setProperty" server side
> > >> command to assign info to a user, even the username. Seehttp://
> > >>www.ape-project.org/docs/server/users/user.setproperty.htmlfor
> When
> > >> you specify the username in the "core.start", you're limited regarding
> > >> certain character or the length of the username.
> >
> > >> > >>> Here's a example of my code if you need it:
> >
> > >> >  chat = new APE.Chat();
> >
> > >> >  //Load APE
> > >> >  chat.load({
> > >> > identifier: 'SC_Chat',
> > >> > channel: 'listeSalon'
> > >> >  });
> >
> > >> >  //Once Ape is ready, connect to server
> > >> >  chat.addEvent('load', function(core){
> > >> > chat.core.start({
> > >> > 'name': $time().toString(),
> > >> > });
> > >> >  });
> >
> > >> >  chat.addEvent('multiPipeCreate', function(pipe, options){
> >
> > >> > //If we just joined the "lobby" channel...
> > >> > if (pipe.name == "listesalon") {
> >
> > >> > //Get the info from PHP. PHP will send them to the
> > >> server with InlinePush
> > >> > $.ajax({
> > >> > type: "POST",
> > >> > url: baseUrl+'chat',
> > >> > dataType: "html",
> > >> > data:
> > >> "action=serverAuth&firstinit=1&upid="+this.core.user.pubid,
> > >> > success: function(data) {

Re: [APE Project] Re: ShoutBox With Private Chat

2011-12-03 Thread Pablo Tejada
Hey,

It doesn't directly help you with what you want to do but you might
find something very useful
https://groups.google.com/forum/#!topic/ape-project/5pJwbIdbNGY

On Sat, Dec 3, 2011 at 4:13 PM, Rossco  wrote:
> I'm not quite getting where I want so I am willing to donate to APE if
> someone's able to help out and get me where I need to be.
>
> Basically I need a way to initiate chats between 2 users, you the user
> and someone else who is on a buddy list.  Each user has an ID and
> username which is controlled by a CMS and I would like to track chat
> history.  It would need to send info to a mysql database.
>
> I would also like a general shoutbox that all users can add messages
> to but again, related to the username/ID that is related in the CMS.
> I do know mootools/PHP but just not quite getting how APE is working.
>
> If anyone's willing to extend the amount of help, I'm happy to either
> donate to APE or pay a small fee to you.  It is for a small community
> of gamers so I don't have a lot of money but it would be token thanks.
>
> Cheers!
>
> --
> You received this message because you are subscribed to the Google
> Groups "APE Project" group.
> To post to this group, send email to ape-project@googlegroups.com
> To unsubscribe from this group, send email to
> ape-project+unsubscr...@googlegroups.com
> 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/

-- 
You received this message because you are subscribed to the Google
Groups "APE Project" group.
To post to this group, send email to ape-project@googlegroups.com
To unsubscribe from this group, send email to
ape-project+unsubscr...@googlegroups.com
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/


Re: [APE Project] Re: ShoutBox With Private Chat

2012-02-29 Thread Louis Charette
Hi,

First of all, do you know if you're using the APE sessions? I don't, so maybe 
what I'm gonna say won't be the same for you.

The way I created my chat system, the private chat sessions have their own APE 
channel ("prvchat{userID 1}u{userID 2}"). I go thought the list of all 
connected user and if the ID match, I make them join this new channel. After 
that, it's the same as the public chat.


This article can somehow be useful regarding user management if you haven't 
read it: http://www.xosofox.de/2010/10/ape-user-handling/

  - Louis

Le 2012-02-29 à 14:49, Rossco a écrit :

> 
> I'm back with this one...
> 
>  
> 
> I have written my script for creating private chat boxes but I still don't 
> quite understand how to send to unipipes.  The documentation is not helpful 
> at all and the demos don't even work with IE so I don't see this being useful 
> for what I'm trying to do.
> 
> 
>  
> 
> Has anyone created a simple 1 on 1 chat system?  I can send messages to 
> people individually but all users are receiving messages at the same time... 
> if that makes sense.  I need some extra help on how to aim messages directly 
> to a person so to speak.
> 
> 
> 
> 
> 
> 
> 
> 
> -- 
> You received this message because you are subscribed to the Google
> Groups "APE Project" group.
> To post to this group, send email to ape-project@googlegroups.com
> To unsubscribe from this group, send email to
> ape-project+unsubscr...@googlegroups.com
> 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/

-- 
You received this message because you are subscribed to the Google
Groups "APE Project" group.
To post to this group, send email to ape-project@googlegroups.com
To unsubscribe from this group, send email to
ape-project+unsubscr...@googlegroups.com
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/


Re: [APE Project] Re: ShoutBox With Private Chat

2012-02-29 Thread Pablo Tejada
Something is broken for sure and i think  i know exactly what it is. I made
post a while ago about it. A unipipe(user) should be able to comunicate
with another unipipe, is in the documentation or wiki somewhere. After all
a multipipe(channel) is just a collection of unipipes.

Here what i wrote a while ago

https://groups.google.com/forum/?fromgroups&nomobile=true#!searchin/ape-project/Uni-pipe/ape-project/ICwOD2VE6-I/NYHN7xrgbkQJ

Sent from my iPhone

On Feb 29, 2012, at 4:32 PM, Louis Charette 
wrote:

Hi,

First of all, do you know if you're using the APE sessions? I don't, so
maybe what I'm gonna say won't be the same for you.

The way I created my chat system, the private chat sessions have their own
APE channel ("prvchat{userID 1}u{userID 2}"). I go thought the list of all
connected user and if the ID match, I make them join this new channel.
After that, it's the same as the public chat.


This article can somehow be useful regarding user management if you haven't
read it: http://www.xosofox.de/2010/10/ape-user-handling/

  - Louis

Le 2012-02-29 à 14:49, Rossco a écrit :


> I'm back with this one...
>
>
>
> I have written my script for creating private chat boxes but I still don't
> quite understand how to send to unipipes.  The documentation is not helpful
> at all and the demos don't even work with IE so I don't see this being
> useful for what I'm trying to do.
>
>
>
> Has anyone created a simple 1 on 1 chat system?  I can send messages to
> people individually but all users are receiving messages at the same
> time... if that makes sense.  I need some extra help on how to aim messages
> directly to a person so to speak.
>
>
>
>
>
>
>
-- 
You received this message because you are subscribed to the Google
Groups "APE Project" group.
To post to this group, send email to ape-project@googlegroups.com
To unsubscribe from this group, send email to
ape-project+unsubscr...@googlegroups.com
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/


 --
You received this message because you are subscribed to the Google
Groups "APE Project" group.
To post to this group, send email to ape-project@googlegroups.com
To unsubscribe from this group, send email to
ape-project+unsubscr...@googlegroups.com
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/

-- 
You received this message because you are subscribed to the Google
Groups "APE Project" group.
To post to this group, send email to ape-project@googlegroups.com
To unsubscribe from this group, send email to
ape-project+unsubscr...@googlegroups.com
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/


Re: [APE Project] Re: ShoutBox With Private Chat

2012-02-29 Thread Rossco
I am using apeCoreSession as I want people to be able to initiate chats 
from where ever they are but I'm not quite understanding how it works to be 
honest.  Basically I have a list of users and you can click each of them, a 
new chat box appears so it should be a private chat between you and that 
person.  

I'm getting so annoyed with trying to figure out this.  When I try to 
initiate a chat with a user and join a channel using my username and 
there's for the channel name, it says `cannot join channel`.  WTF!

Can someone please put me out my missery and help me out on this last bit. 
 If I can get this to send to individual users I'd be happy!  Perhaps IRC 
or another method of chat?


On Wednesday, 29 February 2012 21:32:18 UTC, Louis Charette wrote:
>
> Hi,
>
> First of all, do you know if you're using the APE sessions? I don't, so 
> maybe what I'm gonna say won't be the same for you.
>
> The way I created my chat system, the private chat sessions have their own 
> APE channel ("prvchat{userID 1}u{userID 2}"). I go thought the list of all 
> connected user and if the ID match, I make them join this new channel. 
> After that, it's the same as the public chat.
>
>
> This article can somehow be useful regarding user management if you 
> haven't read it: http://www.xosofox.de/2010/10/ape-user-handling/
>
>   - Louis
>
> Le 2012-02-29 à 14:49, Rossco a écrit :
>
>
>> I'm back with this one...
>>
>>  
>>
>> I have written my script for creating private chat boxes but I still 
>> don't quite understand how to send to unipipes.  The documentation is not 
>> helpful at all and the demos don't even work with IE so I don't see this 
>> being useful for what I'm trying to do.
>>
>>  
>>
>> Has anyone created a simple 1 on 1 chat system?  I can send messages to 
>> people individually but all users are receiving messages at the same 
>> time... if that makes sense.  I need some extra help on how to aim messages 
>> directly to a person so to speak.
>>
>>
>>
>>
>>
>>
>>
> -- 
> You received this message because you are subscribed to the Google
> Groups "APE Project" group.
> To post to this group, send email to ape-project@googlegroups.com
> To unsubscribe from this group, send email to
> ape-project+unsubscr...@googlegroups.com
> 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/
>
>
>
On Wednesday, 29 February 2012 21:32:18 UTC, Louis Charette wrote:
>
> Hi,
>
> First of all, do you know if you're using the APE sessions? I don't, so 
> maybe what I'm gonna say won't be the same for you.
>
> The way I created my chat system, the private chat sessions have their own 
> APE channel ("prvchat{userID 1}u{userID 2}"). I go thought the list of all 
> connected user and if the ID match, I make them join this new channel. 
> After that, it's the same as the public chat.
>
>
> This article can somehow be useful regarding user management if you 
> haven't read it: http://www.xosofox.de/2010/10/ape-user-handling/
>
>   - Louis
>
> Le 2012-02-29 à 14:49, Rossco a écrit :
>
>
>> I'm back with this one...
>>
>>  
>>
>> I have written my script for creating private chat boxes but I still 
>> don't quite understand how to send to unipipes.  The documentation is not 
>> helpful at all and the demos don't even work with IE so I don't see this 
>> being useful for what I'm trying to do.
>>
>>  
>>
>> Has anyone created a simple 1 on 1 chat system?  I can send messages to 
>> people individually but all users are receiving messages at the same 
>> time... if that makes sense.  I need some extra help on how to aim messages 
>> directly to a person so to speak.
>>
>>
>>
>>
>>
>>
>>
> -- 
> You received this message because you are subscribed to the Google
> Groups "APE Project" group.
> To post to this group, send email to ape-project@googlegroups.com
> To unsubscribe from this group, send email to
> ape-project+unsubscr...@googlegroups.com
> 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/
>
>
>
On Wednesday, 29 February 2012 21:32:18 UTC, Louis Charette wrote:
>
> Hi,
>
> First of all, do you know if you're using the APE sessions? I don't, so 
> maybe what I'm gonna say won't be the same for you.
>
> The way I created my chat system, the private chat sessions have their own 
> APE channel ("prvchat{userID 1}u{userID 2}"). I go thought the list of all 
> connected user and if the ID match, I make them join this new channel. 
> After that, it's the same as the public chat.
>
>
> This article can somehow be useful regarding user management if you 
> haven't read it: http://www.xosofox.de/2010/10/ape-user-handling/
>
>   - Louis
>
> Le 2012-02-29 à 14:49, Rossco a écrit :
>
>
>> I'm back with this o

Re: [APE Project] Re: ShoutBox With Private Chat

2012-02-29 Thread Rossco

>
> I am using apeCoreSession as I want people to be able to initiate chats 
> from where ever they are but I'm not quite understanding how it works to be 
> honest.  Basically I have a list of users and you can click each of them, a 
> new chat box appears so it should be a private chat between you and that 
> person.  
>
> I'm getting so annoyed with trying to figure out this.  When I try to 
> initiate a chat with a user and join a channel using my username and 
> there's for the channel name, it says `cannot join channel`.  WTF!
>
> Can someone please put me out my missery and help me out on this last bit. 
>  If I can get this to send to individual users I'd be happy!  Perhaps IRC 
> or another method of chat?
>
>
Google's new group posting system is so crap.  It keeps quoting posts 10 
times over.  

-- 
You received this message because you are subscribed to the Google
Groups "APE Project" group.
To post to this group, send email to ape-project@googlegroups.com
To unsubscribe from this group, send email to
ape-project+unsubscr...@googlegroups.com
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/


Re: [APE Project] Re: ShoutBox With Private Chat

2012-03-02 Thread Rossco
I am getting an error when trying to use multiPipeCreate in my class.  

Uncaught TypeError: Property '$family' of object [object Object],[object 
Object] is not a function

When is APE 2 getting released cos it seems APE 1.1 is pretty buggy.

-- 
You received this message because you are subscribed to the Google
Groups "APE Project" group.
To post to this group, send email to ape-project@googlegroups.com
To unsubscribe from this group, send email to
ape-project+unsubscr...@googlegroups.com
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/