aboutsummaryrefslogtreecommitdiff
path: root/views/default/beechat/beechat.userjs.php
diff options
context:
space:
mode:
authorroot <root@migration.vz.lan>2012-10-23 09:04:43 +0000
committerroot <root@migration.vz.lan>2012-10-23 09:04:43 +0000
commit074dc8fda6f634cc8c024a913d8033600b336b3a (patch)
tree1a9959d61e9f308b0a3443d9d67c00d26421581c /views/default/beechat/beechat.userjs.php
downloadelgg-074dc8fda6f634cc8c024a913d8033600b336b3a.tar.gz
elgg-074dc8fda6f634cc8c024a913d8033600b336b3a.tar.bz2
initial commit.
Diffstat (limited to 'views/default/beechat/beechat.userjs.php')
-rw-r--r--views/default/beechat/beechat.userjs.php54
1 files changed, 54 insertions, 0 deletions
diff --git a/views/default/beechat/beechat.userjs.php b/views/default/beechat/beechat.userjs.php
new file mode 100644
index 000000000..f147d8b8e
--- /dev/null
+++ b/views/default/beechat/beechat.userjs.php
@@ -0,0 +1,54 @@
+<script type="text/javascript">
+BeeChat.Events.Messages = {
+ ConnectionStates: {
+ CONNECTING: "<?php echo elgg_echo('beechat:connection:state:connecting'); ?>",
+ AUTHENTICATING: "<?php echo elgg_echo('beechat:connection:state:authenticating'); ?>",
+ FAILED: "<?php echo elgg_echo('beechat:connection:state:failed'); ?>",
+ DISCONNECTING: "<?php echo elgg_echo('beechat:connection:state:disconnecting'); ?>",
+ OFFLINE: "<?php echo elgg_echo('beechat:connection:state:offline'); ?>",
+ ONLINE: "<?php echo elgg_echo('beechat:connection:state:online'); ?>"
+ }
+ }
+
+BeeChat.UI.Resources.Strings = {
+ Availability: {
+ AVAILABLE: "<?php echo elgg_echo('beechat:availability:available'); ?>",
+ CHAT: "<?php echo elgg_echo('beechat:availability:available'); ?>",
+ ONLINE: "<?php echo elgg_echo('beechat:availability:available'); ?>",
+ DND: "<?php echo elgg_echo('beechat:availability:dnd'); ?>",
+ AWAY: "<?php echo elgg_echo('beechat:availability:away'); ?>",
+ XA:"<?php echo elgg_echo('beechat:availability:xa'); ?>",
+ OFFLINE: "<?php echo elgg_echo('beechat:availability:offline'); ?>"
+ },
+
+ Contacts: {
+ BUTTON: "<?php echo elgg_echo('beechat:contacts:button'); ?>"
+ },
+
+ ChatMessages: {
+ SELF: "<?php echo $_SESSION['user']->name; ?>",
+ COMPOSING: "<?php echo elgg_echo('beechat:chat:composing'); ?>"
+ },
+
+ Box: {
+ MINIMIZE: "<?php echo elgg_echo('beechat:box:minimize'); ?>",
+ CLOSE: "<?php echo elgg_echo('beechat:box:close'); ?>",
+ SHOWHIDE: "<?php echo elgg_echo('beechat:box:showhide'); ?>"
+ }
+ }
+g_user_rooms = new Array();
+<?php
+if (isloggedin()) {
+ $user = get_loggedin_user();
+ $chatrooms = elgg_get_entities_from_relationship(array('relationship' => 'groupchat',
+ 'relationship_guid' => $user->guid,
+ 'inverse_relationship' => false,
+ 'limit' => 0));
+ if (!empty($chatrooms)) {
+ foreach($chatrooms as $chatroom) {
+ echo "g_user_rooms.push(['".beechat_friendly_title($chatroom->name)."@".get_plugin_setting("groupdomain", "beechat")."', '".$chatroom->guid."']);";
+ }
+ }
+}
+?>
+</script>