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/


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/?fromgroupsnomobile=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 charette.lo...@gmail.com
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?


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

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 ros...@rossco-designs.com 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

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 ros...@rossco-designs.com 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 charette.lo...@gmail.com 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=serverAuthfirstinit=1upid=+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')) 

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 ros...@rossco-designs.com 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 charette.lo...@gmail.com 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 ros...@rossco-designs.com 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 charette.lo...@gmail.com 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=serverAuthfirstinit=1upid=+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 

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 ptejad...@gmail.com

 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 ros...@rossco-designs.com 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 charette.lo...@gmail.com 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 ros...@rossco-designs.com 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 charette.lo...@gmail.com
 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=serverAuthfirstinit=1upid=+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,