Initial commit
@@ -0,0 +1,17 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<projectDescription>
|
||||||
|
<name>Ajax IM 3.41</name>
|
||||||
|
<comment></comment>
|
||||||
|
<projects>
|
||||||
|
</projects>
|
||||||
|
<buildSpec>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
</buildSpec>
|
||||||
|
<natures>
|
||||||
|
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
|
||||||
|
</natures>
|
||||||
|
</projectDescription>
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
///////////////////////////////////
|
||||||
|
// ajax im 3.41 //
|
||||||
|
// AJAX Instant Messenger //
|
||||||
|
// Copyright (c) 2006-2008 //
|
||||||
|
// http://www.ajaxim.com/ //
|
||||||
|
// Do not remove this notice //
|
||||||
|
///////////////////////////////////
|
||||||
|
|
||||||
|
+---------------------------------------------------------------------+
|
||||||
|
| Contributions |
|
||||||
|
+---------------------------------------------------------------------+
|
||||||
|
|== Source Code ======================================================|
|
||||||
|
| |
|
||||||
|
| * Joshua Gross |
|
||||||
|
| Started the AjaxIM project. Created all releases up to 3.3 alone! |
|
||||||
|
| - Framework |
|
||||||
|
| - Everything not listed |
|
||||||
|
| |
|
||||||
|
| * Benjamin Hutchins |
|
||||||
|
| Joined the AjaxIM project at version 3.3 and helped give the |
|
||||||
|
| entire project a push. |
|
||||||
|
| - Auto away |
|
||||||
|
| - Buddy profiles |
|
||||||
|
| - Buddy icons |
|
||||||
|
| - Lingo replacement |
|
||||||
|
| - Context/RightClick menus |
|
||||||
|
| - Status changes in chats |
|
||||||
|
| - Update.php |
|
||||||
|
| - Various other contributions |
|
||||||
|
| |
|
||||||
|
| |
|
||||||
|
|== Language Packs ===================================================|
|
||||||
|
| |
|
||||||
|
| Contributor Language |
|
||||||
|
| ------------------------------------------------------------------- |
|
||||||
|
| * Hilton Perantunes Brazilian Portuguese |
|
||||||
|
| * JulesJ (http://www.julesj.nl/blog/) Dutch |
|
||||||
|
| * Léonard Beaud French |
|
||||||
|
| * YNStudios.com German |
|
||||||
|
| * Matteo Cisilino (http://www.sitonerd.com) Italian |
|
||||||
|
| * Mayu Shimizu (http://www.myudesign.com) Japanese |
|
||||||
|
| * Taekyuni (http://www.gaerae.com) Korean |
|
||||||
|
| * Behrouz Pooladrag (http://www.iflashlord.com) Persian (Farsi) |
|
||||||
|
| * Grigoriy Korolev Russian |
|
||||||
|
| * ??? Simplified Chinese |
|
||||||
|
| * Victor Ortega Spanish |
|
||||||
|
| * Meo Meo? Vietnamese |
|
||||||
|
| * Feyzullah Ceylan (http://www.gencsinsen.com) Turkish |
|
||||||
|
| * ??? Arabic |
|
||||||
|
| * ??? Bulgarian |
|
||||||
|
| * Pedro Morgado Portugal Portuguese |
|
||||||
|
| * Steven Yeh Traditional Chinese |
|
||||||
|
| |
|
||||||
|
| |
|
||||||
|
|== Libraries ========================================================|
|
||||||
|
| |
|
||||||
|
| Contributor Library |
|
||||||
|
| ------------------------------------------------------------------- |
|
||||||
|
| * Sam Stephenson Prototype |
|
||||||
|
| * Sébastien Gruhier Prototype Window Class |
|
||||||
|
| * Scott Schiller SoundManager2 |
|
||||||
|
| * Dan Webb Prototype DomReady |
|
||||||
|
| * Paul Johnston MD5 Algorithms |
|
||||||
|
| |
|
||||||
|
+---------------------------------------------------------------------+
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
///////////////////////////////////
|
||||||
|
// ajax im 3.41 //
|
||||||
|
// AJAX Instant Messenger //
|
||||||
|
// Copyright (c) 2006-2008 //
|
||||||
|
// http://www.ajaxim.com/ //
|
||||||
|
// Do not remove this notice //
|
||||||
|
///////////////////////////////////
|
||||||
|
|
||||||
|
Installation
|
||||||
|
-----------------------------------
|
||||||
|
1. Configure SQL information in config-sample.php
|
||||||
|
|
||||||
|
2. Rename config-sample.php to config.php
|
||||||
|
|
||||||
|
3. Configure options in config.js (in the 'js' folder)
|
||||||
|
|
||||||
|
4. Upload all files to your server.
|
||||||
|
|
||||||
|
5. CHMOD buddyicons/ to 0777.
|
||||||
|
|
||||||
|
6. Run install.php in your browser of choice and follow the instructions.
|
||||||
|
|
||||||
|
7. Delete install.php and update.php!
|
||||||
|
|
||||||
|
8. Done!
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
Copyright (c) 2009, Joshua Gross
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||||
|
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||||
|
* Neither the name of the Ajax IM nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
///////////////////////////////////
|
||||||
|
// ajax im 3.41 //
|
||||||
|
// AJAX Instant Messenger //
|
||||||
|
// Copyright (c) 2006-2008 //
|
||||||
|
// http://www.ajaxim.com/ //
|
||||||
|
// Do not remove this notice //
|
||||||
|
///////////////////////////////////
|
||||||
|
|
||||||
|
About
|
||||||
|
-----------------------------------
|
||||||
|
ajax im ("asynchronous javascript and xml instant messenger") is a browser-based instant messaging client. It uses the XMLHTTPRequest object in JavaScript to send and receive commands to and from the server. No refreshing of the page is ever needed for this "web application" to work, as everything is updated in real-time via JavaScript.
|
||||||
|
|
||||||
|
In versions 2 and up, no XML is actually used (instead, it has been replaced with "JSON"), but for brand purposes, the name has been kept. It still uses the XMLHTTPRequest object, so the name does hold some validity.
|
||||||
|
|
||||||
|
Credits
|
||||||
|
-----------------------------------
|
||||||
|
ajax im makes use of a number of Javascript libraries and functions to build its functionality. All such code is labeled and copyrighted to their creators.
|
||||||
|
|
||||||
|
All other code is copyright (c) unwieldy studios / Joshua Gross
|
||||||
@@ -1,4 +1,60 @@
|
|||||||
AjaxIM341
|
# Ajax IM 3.41
|
||||||
=========
|
|
||||||
|
|
||||||
instant messaging framework v3.41 (PHP)
|
## What is Ajax IM 3.41?
|
||||||
|
|
||||||
|
Ajax IM ("Asynchronous Javascript And Xml Instant Messenger") is a browser-based
|
||||||
|
instant messaging client. It uses the XMLHTTPRequest object in JavaScript to send
|
||||||
|
and receive commands to and from the server. No refreshing of the page is ever
|
||||||
|
needed for this "web application" to work, as everything is updated in real-time
|
||||||
|
via JavaScript.
|
||||||
|
|
||||||
|
Ajax IM 3.41 is based on client-side JavaScript and PHP. Ajax IM 4.0 is a "from
|
||||||
|
the ground up" rewrite that uses client-side JavaScript and Node.js (server-side
|
||||||
|
JavaScript). Ajax IM 4.0 does not use PHP now.
|
||||||
|
|
||||||
|
Ajax IM 3.41 is made available here because there is still interest in this older
|
||||||
|
code and it is the basis for some code forks (e.g. ajaximrpg). It is useful for
|
||||||
|
reference.
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
1. Create a MySQL database
|
||||||
|
|
||||||
|
2. Configure SQL information in config-sample.php
|
||||||
|
|
||||||
|
3. Rename config-sample.php to config.php
|
||||||
|
|
||||||
|
4. Configure options in config.js (in the 'js' folder)
|
||||||
|
|
||||||
|
5. Upload all files to your server.
|
||||||
|
|
||||||
|
6. CHMOD buddyicons/ to 0777.
|
||||||
|
|
||||||
|
7. Run install.php in your browser of choice and follow the instructions.
|
||||||
|
|
||||||
|
8. Delete install.php and update.php!
|
||||||
|
|
||||||
|
9. Done!
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
Copyright (c) 2009, Joshua Gross
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without modification,
|
||||||
|
are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||||
|
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||||
|
* Neither the name of the Ajax IM nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||||
|
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||||
|
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||||
|
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||||
|
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||||
|
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||||
|
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
POSSIBILITY OF SUCH DAMAGE.
|
||||||
@@ -0,0 +1,250 @@
|
|||||||
|
version 3.41
|
||||||
|
-------------------------
|
||||||
|
- Buddy List
|
||||||
|
> Fixed buddy removal
|
||||||
|
|
||||||
|
- General
|
||||||
|
> Other minor fixes
|
||||||
|
|
||||||
|
version 3.4
|
||||||
|
-------------------------
|
||||||
|
- General
|
||||||
|
> Fixed popup.php Include Path, Bold, Italic, and Underline errors (Issue #116, Issue #111, Issue #91).
|
||||||
|
> Added option to disable the register ability.
|
||||||
|
> Multiple releases (YUI Compression, Full Source).
|
||||||
|
|
||||||
|
- Buddy List
|
||||||
|
> Blocked buddies are now blocked when they should be (Issue #112).
|
||||||
|
> Added buddy icons (Issue #92).
|
||||||
|
> Added context/right-click menus (Issue #12).
|
||||||
|
> Added buddy profiles (Issue #13).
|
||||||
|
|
||||||
|
- Instant Messaging
|
||||||
|
> Added Lingo-Replacement feature, can be used with multiple languages (Issue #127).
|
||||||
|
|
||||||
|
- Chat
|
||||||
|
> Buddy status changes are shown in chat window.
|
||||||
|
> Custom timestamps now used in chat as well.
|
||||||
|
|
||||||
|
- Admin
|
||||||
|
> User search now lists users' emails.
|
||||||
|
> Created update.php to update your AjaxIM installation from version 3.3 to 3.4.
|
||||||
|
> Created test-uploads.php to allow you to test your server for the ability to upload files.
|
||||||
|
> Created php.ini.sample. If you need a php.ini, just rename this to php.ini.
|
||||||
|
|
||||||
|
- Miscellaneous
|
||||||
|
> Added auto-away/auto-idle feature (Issue #124).
|
||||||
|
> Fixed use of &, <, and > symbols (Issue #101).
|
||||||
|
> Fixed use of new lines (Issue #118).
|
||||||
|
> Added Shift+Enter shortcut to add a newline.
|
||||||
|
> Various minor issues.
|
||||||
|
|
||||||
|
|
||||||
|
version 3.3
|
||||||
|
-------------------------
|
||||||
|
- General
|
||||||
|
> No more PHP file for languages, all language information is stored in Javascript (Issues #40 & 61)
|
||||||
|
> Language files are loaded dynamically and can be switched by user before login (Issues #40 & 61)
|
||||||
|
> index.php is now index.html, as there is now no PHP in the index file
|
||||||
|
|
||||||
|
- Buddy List
|
||||||
|
> Fixed issue regarding buddies and letter casing (Issue #38)
|
||||||
|
|
||||||
|
- Instant Messaging
|
||||||
|
> Sounds fixed (Issue #42)
|
||||||
|
> Timestamp format is now fully configurable (Issue #16)
|
||||||
|
|
||||||
|
- Chat
|
||||||
|
> Selecting/hovering over users in the chatlist fixed (Issue #81)
|
||||||
|
> Rooms can now be predefined for the "Join Room" chatlist (Issue #78)
|
||||||
|
|
||||||
|
- Admin
|
||||||
|
> Added previously nonexistent "Make Admin" PHP function (Issue #24)
|
||||||
|
|
||||||
|
- Miscellaneous
|
||||||
|
> Fixed error when "Sign On" button clicked a second time (Issue #3)
|
||||||
|
> Various minor issues (Issue #60)
|
||||||
|
> Page title is now modifiable via config.js (Issue #21)
|
||||||
|
|
||||||
|
|
||||||
|
version 3.22
|
||||||
|
-------------------------
|
||||||
|
- Buddy List
|
||||||
|
> "Remove buddy" fixed
|
||||||
|
|
||||||
|
- Chat
|
||||||
|
> Room list style issue fixed
|
||||||
|
|
||||||
|
- Miscellaneous
|
||||||
|
> "Register" dialog title now changes to proper language
|
||||||
|
> Users can register and login with characters of any case (upper/lower) and it will automatically be fixed
|
||||||
|
|
||||||
|
- Admin
|
||||||
|
> Fixed error involving alternate languages and the "Search Type" field
|
||||||
|
|
||||||
|
version 3.21
|
||||||
|
-------------------------
|
||||||
|
- Miscellaneous
|
||||||
|
> Missed a couple of strings for localization
|
||||||
|
> Fixed issue with installer on some hosts (e.g., GoDaddy)
|
||||||
|
> Login/Register/Forgot Pass no longer produce error in IE7
|
||||||
|
|
||||||
|
version 3.2
|
||||||
|
-------------------------
|
||||||
|
- General
|
||||||
|
> MAJOR overhaul of the code -- everything (PHP and JS) is now object-oriented instead of procedural
|
||||||
|
> Many functions modified to make better use of the Prototype library
|
||||||
|
> Multiple language support (need translators!)
|
||||||
|
> PHP-based sessions implemented, so the username and password isn't sent on every request
|
||||||
|
> Many minor GUI changes
|
||||||
|
> Buttons no longer separate images; buttons are now boilerplate images + text
|
||||||
|
> Code commented more thoroughly
|
||||||
|
> Proper theming system -- themes are bundled into folders instead of all over the place
|
||||||
|
> New dark theme!
|
||||||
|
|
||||||
|
- Instant Messaging
|
||||||
|
> Popout window now more stable
|
||||||
|
|
||||||
|
- Buddy List
|
||||||
|
> Fixed issue with selecting another buddy after deleting one
|
||||||
|
> Buddylist database structure converted to be in a separate table
|
||||||
|
> Ability to block/unblock users
|
||||||
|
|
||||||
|
- Chat
|
||||||
|
> Userlist added, now displays all users in a chatroom
|
||||||
|
> Room list added to the "join room" dialog
|
||||||
|
> System modified to fix potential bug of grabbing multiples of the same message from the database
|
||||||
|
|
||||||
|
- Admin Panel
|
||||||
|
> Basic (beta) admin panel added. Supports searching for users, banning, kicking, and making/removing admin
|
||||||
|
|
||||||
|
- Miscellaneous
|
||||||
|
> Fixed numerous small bugs
|
||||||
|
|
||||||
|
version 3.1
|
||||||
|
-------------------------
|
||||||
|
- General
|
||||||
|
> More user-friendly install script
|
||||||
|
> Database table names should no longer conflict with existing tables in a database
|
||||||
|
|
||||||
|
- Instant Messaging
|
||||||
|
> Full unicode support!
|
||||||
|
|
||||||
|
- Miscellaneous
|
||||||
|
> Fixed numerous small bugs
|
||||||
|
> Optimized script
|
||||||
|
> New JSON PHP class
|
||||||
|
> Minor memory leak fixed
|
||||||
|
|
||||||
|
version 3.0
|
||||||
|
-------------------------
|
||||||
|
- General
|
||||||
|
> Event-based system replaces sending buddylist to client each ping
|
||||||
|
> Windows can be focused and defocused
|
||||||
|
> Away message choices now have icons (for usability)
|
||||||
|
> Completely replaced login/registration/forgot password screen
|
||||||
|
> Toolbars have mouseover & mousedown images (for usability)
|
||||||
|
> No more modal windows (preventing you from doing anything else while they were open -- Add Buddy, etc)
|
||||||
|
|
||||||
|
- User status
|
||||||
|
> "Friends only" mode so only users on the user's buddylist can contact the user
|
||||||
|
> "Invisible" mode lets the user look as if he/she is offline, but can still chat
|
||||||
|
|
||||||
|
- Chatrooms
|
||||||
|
> Finally! Multi-user chatrooms.
|
||||||
|
> Joined chatrooms appear as groups on the buddylist, with the chatroom users in that group
|
||||||
|
|
||||||
|
- Instant Messaging
|
||||||
|
> Font sizes!
|
||||||
|
> Font colors!
|
||||||
|
> Emoticon list
|
||||||
|
> Textbox is now multiline for better readability
|
||||||
|
|
||||||
|
- Detachable windows
|
||||||
|
> Click the "detach" button (next to the "minimize" button) to popout the IM/chatroom to a separate window
|
||||||
|
|
||||||
|
- Bug fixes
|
||||||
|
> Fixed auto-url linking
|
||||||
|
> IM length limit of 1500 characters set (prevents enormous MySQL inserts)
|
||||||
|
> No more login screen scrollbars issue in Safari
|
||||||
|
> Minimize button on buddylist moved to less awkard location
|
||||||
|
|
||||||
|
version 2.53
|
||||||
|
-------------------------
|
||||||
|
- Bug fixes
|
||||||
|
> Non-stop away message sending issue when IMing yourself
|
||||||
|
|
||||||
|
version 2.52
|
||||||
|
-------------------------
|
||||||
|
- Client/Server Communication
|
||||||
|
> Modified XMLHTTPRequest object creation, should improve speed in the browser
|
||||||
|
|
||||||
|
version 2.51
|
||||||
|
-------------------------
|
||||||
|
- Bug fixes
|
||||||
|
> Fixed minor scrolling and focus issues in IM windows
|
||||||
|
|
||||||
|
version 2.5
|
||||||
|
-------------------------
|
||||||
|
- Bug fixes
|
||||||
|
> Won't send blank IM messages
|
||||||
|
> Away message list no longer falls behind the buddylist
|
||||||
|
> Fixed the "Remove User/Group window not appearing" issue
|
||||||
|
> Links in IM sessions now open in a new window, instead of the same window
|
||||||
|
> Various other small bugs and code cleanup
|
||||||
|
|
||||||
|
- Instant Messaging
|
||||||
|
> IM sounds: sounds when a message is received or sent
|
||||||
|
> Emoticons!
|
||||||
|
> Ability to change the text font
|
||||||
|
|
||||||
|
version 2.02
|
||||||
|
-------------------------
|
||||||
|
- Safari support!
|
||||||
|
- IM window focus issue fixed
|
||||||
|
- Dialog alert style bug fixed
|
||||||
|
|
||||||
|
version 2.01
|
||||||
|
-------------------------
|
||||||
|
- Opera support!
|
||||||
|
- Enter key works on login form now
|
||||||
|
|
||||||
|
version 2.0
|
||||||
|
-------------------------
|
||||||
|
- Better windowing system
|
||||||
|
> Less clunky
|
||||||
|
> Resizable windows
|
||||||
|
> Smoother movement
|
||||||
|
|
||||||
|
- Updated buddy list
|
||||||
|
> Removed drag/drop (didn't work well)
|
||||||
|
> Groups!
|
||||||
|
> Mouse over instead of selection
|
||||||
|
> Window auto-resizes and moves when browser is resized
|
||||||
|
|
||||||
|
- Chat
|
||||||
|
> History - shows past conversations with a person throughout the same session
|
||||||
|
> Timestamp simplified
|
||||||
|
|
||||||
|
- General
|
||||||
|
> Removed "menu"
|
||||||
|
> Menu functions added to buddy list window
|
||||||
|
|
||||||
|
- Javascript
|
||||||
|
> Replaced XML with JSON (bandwidth-saving/faster processing)
|
||||||
|
> Many, many bugfixes
|
||||||
|
> Configurable options added
|
||||||
|
> Fixed major issue of lagginess when IMing with many buddies
|
||||||
|
|
||||||
|
- PHP
|
||||||
|
> Cleaned up source
|
||||||
|
> XML replaced with JSON (see Javascript section)
|
||||||
|
> Bugfixes
|
||||||
|
|
||||||
|
- MySQL
|
||||||
|
> Buddylists stored using JSON (for groups)
|
||||||
|
|
||||||
|
|
||||||
|
version 1.0
|
||||||
|
-------------------------
|
||||||
|
- Initial Release
|
||||||
@@ -0,0 +1,177 @@
|
|||||||
|
<?php
|
||||||
|
///////////////////////////////////
|
||||||
|
// ajax im 3.41 //
|
||||||
|
// AJAX Instant Messenger //
|
||||||
|
// Copyright (c) 2006-2008 //
|
||||||
|
// http://www.ajaxim.com/ //
|
||||||
|
// Do not remove this notice //
|
||||||
|
///////////////////////////////////
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ajax im - admin panel script
|
||||||
|
*
|
||||||
|
* @author Joshua Gross, unwieldy studios
|
||||||
|
* @version 3.4
|
||||||
|
* @copyright 2006 - 2008
|
||||||
|
* @package ajax_im
|
||||||
|
**/
|
||||||
|
|
||||||
|
require('config.php');
|
||||||
|
|
||||||
|
// begin code //
|
||||||
|
// note: do not edit below unless //
|
||||||
|
// you know what you're doing! //
|
||||||
|
|
||||||
|
// JSON Class //
|
||||||
|
include('json.php');
|
||||||
|
|
||||||
|
// connect to database //
|
||||||
|
$link = mysql_connect($sql_host, $sql_user, $sql_pass);
|
||||||
|
mysql_select_db($sql_db);
|
||||||
|
mysql_query('SET NAMES \'utf8\'');
|
||||||
|
|
||||||
|
session_start();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ajax im, admin class.
|
||||||
|
*
|
||||||
|
* @package ajax_im
|
||||||
|
* @author Joshua Gross / unwieldy studios
|
||||||
|
**/
|
||||||
|
class Ajax_IM_Admin {
|
||||||
|
/**
|
||||||
|
* Constructor.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
* @author Joshua Gross
|
||||||
|
*/
|
||||||
|
function Ajax_IM_Admin($call) {
|
||||||
|
if($_SESSION['admin'] == 0) print 'access_denied';
|
||||||
|
|
||||||
|
$this->json = new JSON_obj();
|
||||||
|
|
||||||
|
$this->username = $_SESSION['username'];
|
||||||
|
$this->password = $_SESSION['password'];
|
||||||
|
|
||||||
|
if($this->checkInfo($this->username, $this->password)) {
|
||||||
|
switch($call) {
|
||||||
|
case 'search':
|
||||||
|
print $this->search(strtolower($_POST['by']), $_POST['for']);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'kick':
|
||||||
|
print $this->kickUser($_POST['user']);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'ban':
|
||||||
|
print $this->banUser($_POST['user']);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'admin':
|
||||||
|
print $this->adminUser($_POST['user']);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Searches the user database by the method specified, for the keyword specified
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
function search($by, $for) {
|
||||||
|
if($by != 'email' && $by != 'username') return '[]';
|
||||||
|
|
||||||
|
$search_query = mysql_query('SELECT username, email, last_ip, last_ping, is_online, admin, banned FROM ' . SQL_PREFIX . 'users WHERE ' . $by . ' LIKE \'' . mysql_real_escape_string(str_replace('*', '%', $for)) . '\'');
|
||||||
|
|
||||||
|
$found = array();
|
||||||
|
while($row = mysql_fetch_assoc($search_query)) {
|
||||||
|
$found[] = array('username'=>$row['username'], 'email'=>$row['email'], 'lastKnownIP'=>$row['last_ip'], 'lastActive'=>$row['last_ping'],
|
||||||
|
'currentStatus'=>$row['is_online'], 'banned'=>($row['banned']==1?'true':'false'), 'admin'=>($row['admin']==1?'true':'false'));
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->json->encode($found);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Kick the user from the server (log him off)
|
||||||
|
*
|
||||||
|
* @return "kicked"
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
function kickUser($user) {
|
||||||
|
mysql_query('INSERT INTO ' . SQL_PREFIX . "messages (message, type, sender, recipient, stamp) VALUES ('kick', 'server', '{$this->username}', '" . mysql_real_escape_string($user) . "', '" . time() . "')");
|
||||||
|
return 'kicked';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Ban & kick the user from the server
|
||||||
|
*
|
||||||
|
* @return "true" if banned, "false" if unbanned, "no_such_user" if the user doesn't exist
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
function banUser($user) {
|
||||||
|
$ban_status = mysql_query('SELECT banned FROM ' . SQL_PREFIX . 'users WHERE username=\'' . mysql_real_escape_string($user) . '\'');
|
||||||
|
if(mysql_num_rows($ban_status) == 0)
|
||||||
|
return 'no_such_user';
|
||||||
|
|
||||||
|
$is = mysql_fetch_assoc($ban_status);
|
||||||
|
if($is['banned'] == 1) {
|
||||||
|
mysql_query('UPDATE ' . SQL_PREFIX . 'users SET banned=0 WHERE username=\'' . mysql_real_escape_string($user) . '\'');
|
||||||
|
return 'false';
|
||||||
|
} else {
|
||||||
|
$this->kickUser(mysql_real_escape_string($user));
|
||||||
|
mysql_query('UPDATE ' . SQL_PREFIX . 'users SET banned=1 WHERE username=\'' . mysql_real_escape_string($user) . '\'');
|
||||||
|
return 'true';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Toggle on/off the admin status of a user.
|
||||||
|
*
|
||||||
|
* @return "on" if now an admin, "off" if not, "no_such_user" if the user doesn't exist
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
function adminUser($user) {
|
||||||
|
$admin_status = mysql_query('SELECT admin FROM ' . SQL_PREFIX . 'users WHERE username=\'' . mysql_real_escape_string($user) . '\'');
|
||||||
|
if(mysql_num_rows($admin_status) == 0)
|
||||||
|
return 'no_such_user';
|
||||||
|
|
||||||
|
$is = mysql_fetch_assoc($admin_status);
|
||||||
|
if($is['admin'] == 1) {
|
||||||
|
mysql_query('UPDATE ' . SQL_PREFIX . 'users SET admin=0 WHERE username=\'' . mysql_real_escape_string($user) . '\'');
|
||||||
|
return 'false';
|
||||||
|
} else {
|
||||||
|
mysql_query('UPDATE ' . SQL_PREFIX . 'users SET admin=1 WHERE username=\'' . mysql_real_escape_string($user) . '\'');
|
||||||
|
return 'true';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check to see if the supplied user information is valid, and if so return specific information.
|
||||||
|
*
|
||||||
|
* @return false if information is invalid, array of data otherwise
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
function checkInfo($username, $password, $return=array()) {
|
||||||
|
if(count($return) > 0)
|
||||||
|
$columns = implode(',', $return);
|
||||||
|
else
|
||||||
|
$columns = 'id';
|
||||||
|
|
||||||
|
$username = mysql_real_escape_string($username);
|
||||||
|
$password = mysql_real_escape_string($password);
|
||||||
|
|
||||||
|
$query = mysql_query('SELECT ' . $columns . ' FROM ' . SQL_PREFIX . 'users WHERE username=\'' . $username . '\' AND password=\'' . $password . '\' LIMIT 1');
|
||||||
|
|
||||||
|
if(mysql_num_rows($query) > 0)
|
||||||
|
return mysql_fetch_assoc($query);
|
||||||
|
else
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$admin = new Ajax_IM_Admin($_POST['call']);
|
||||||
|
?>
|
||||||
|
You don't want to be here...(this is not the admin panel!)
|
||||||
@@ -0,0 +1,893 @@
|
|||||||
|
<?php
|
||||||
|
///////////////////////////////////
|
||||||
|
// ajax im 3.41 //
|
||||||
|
// AJAX Instant Messenger //
|
||||||
|
// Copyright (c) 2006-2008 //
|
||||||
|
// http://www.ajaxim.com/ //
|
||||||
|
// Do not remove this notice //
|
||||||
|
///////////////////////////////////
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ajax im
|
||||||
|
*
|
||||||
|
* @author Joshua Gross, unwieldy studios
|
||||||
|
* @version 3.4
|
||||||
|
* @copyright 2006 - 2008
|
||||||
|
* @package ajax_im
|
||||||
|
**/
|
||||||
|
|
||||||
|
require('config.php');
|
||||||
|
|
||||||
|
// begin code //
|
||||||
|
// note: do not edit below unless //
|
||||||
|
// you know what you're doing! //
|
||||||
|
|
||||||
|
// JSON Class //
|
||||||
|
include('json.php');
|
||||||
|
|
||||||
|
// connect to database //
|
||||||
|
$link = mysql_connect($sql_host, $sql_user, $sql_pass);
|
||||||
|
mysql_select_db($sql_db);
|
||||||
|
mysql_query('SET NAMES \'utf8\'');
|
||||||
|
|
||||||
|
// Turn off magic_quotes_runtime //
|
||||||
|
set_magic_quotes_runtime(0);
|
||||||
|
|
||||||
|
// Strip slashes from GET/POST/COOKIE (if magic_quotes_gpc is enabled) //
|
||||||
|
if ( get_magic_quotes_gpc() ) {
|
||||||
|
function stripslashes_array($array) {
|
||||||
|
return is_array($array) ? array_map('stripslashes_array', $array) : stripslashes($array);
|
||||||
|
}
|
||||||
|
|
||||||
|
$_GET = stripslashes_array($_GET);
|
||||||
|
$_POST = stripslashes_array($_POST);
|
||||||
|
$_COOKIE = stripslashes_array($_COOKIE);
|
||||||
|
}
|
||||||
|
|
||||||
|
session_start();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ajax im, main execution class.
|
||||||
|
*
|
||||||
|
* @package ajax_im
|
||||||
|
* @author Joshua Gross / unwieldy studios
|
||||||
|
**/
|
||||||
|
class Ajax_IM {
|
||||||
|
/**
|
||||||
|
* Constructor.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
function Ajax_IM($call) {
|
||||||
|
$this->json = new JSON_obj();
|
||||||
|
|
||||||
|
$this->username = $_SESSION['username'];
|
||||||
|
$this->password = $_SESSION['password'];
|
||||||
|
|
||||||
|
// run the garbage collector (chance run)
|
||||||
|
$this->gc();
|
||||||
|
|
||||||
|
// figure out which action we need to execute,
|
||||||
|
// then execute it and print the output
|
||||||
|
switch($call) {
|
||||||
|
case 'login':
|
||||||
|
print $this->login(strtolower($_POST['username']), $_POST['password']);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'logout':
|
||||||
|
print $this->logout();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'ping':
|
||||||
|
print $this->ping($_POST['away']);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'send':
|
||||||
|
print $this->send($_POST['recipient'], $_POST['message'], $_POST['font'], $_POST['fontsize'], $_POST['fontcolor'], $_POST['bold'], $_POST['italic'], $_POST['underline'], $_POST['chatroom']);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'addbuddy':
|
||||||
|
print $this->addBuddy(strtolower($_POST['username']), $_POST['group']);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'removebuddy':
|
||||||
|
print $this->removeBuddy($_POST['username']);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'blockbuddy':
|
||||||
|
print $this->blockBuddy($_POST['username'], ($_POST['status']?$_POST['status']:0));
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'removegroup':
|
||||||
|
print $this->removeGroup($_POST['group']);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'register':
|
||||||
|
print $this->register($_POST['username'], $_POST['password'], $_POST['email']);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'isuser':
|
||||||
|
print $this->isUser(strtolower($_POST['username']));
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'reset':
|
||||||
|
print $this->reset($_POST['email']);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'pwdchange':
|
||||||
|
print $this->passwordChange($_POST['password'], $_POST['newpwd']);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'joinroom':
|
||||||
|
print $this->joinRoom($_POST['room']);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'leaveroom':
|
||||||
|
print $this->leaveRoom($_POST['room']);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'roomlist':
|
||||||
|
print $this->roomList();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'changeicon':
|
||||||
|
print $this->changeIcon();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'changeprofile':
|
||||||
|
print $this->changeProfile($_POST['profile']);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'getprofile':
|
||||||
|
print $this->getProfile($_POST['user']);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Logs the user in and sets the session for the user.
|
||||||
|
*
|
||||||
|
* @return JSON object of buddies/blocked users if it usr was successfully logged in, error string otherwise
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
function login($username, $password) {
|
||||||
|
$user = $this->checkInfo($username, $password, array('admin', 'banned'));
|
||||||
|
if(!$user) return 'invalid';
|
||||||
|
if($user['banned'] == 1) return 'banned';
|
||||||
|
|
||||||
|
$_SESSION['username'] = $username;
|
||||||
|
$_SESSION['password'] = $password;
|
||||||
|
$_SESSION['admin'] = $user['admin'];
|
||||||
|
|
||||||
|
$set_status = mysql_query('UPDATE ' . SQL_PREFIX . 'users SET is_online=1, last_ip=\'' . $_SERVER['REMOTE_ADDR'] . '\' WHERE username=\'' . $username . '\'');
|
||||||
|
|
||||||
|
$buddylist = $this->getBuddylist($username, false);
|
||||||
|
$blocklist = $this->getBlocklist($username);
|
||||||
|
|
||||||
|
$this->userEvent($username, $buddylist, 'status', array('status'=>1));
|
||||||
|
|
||||||
|
$buddylist = $this->getBuddylistOnline($username);
|
||||||
|
if(count($buddylist) > 0)
|
||||||
|
$output['buddy'] = $this->json->encode($buddylist);
|
||||||
|
else
|
||||||
|
$output['buddy'] = array();
|
||||||
|
|
||||||
|
$output['blocked'] = $this->json->encode($blocklist);
|
||||||
|
|
||||||
|
$output['admin'] = $user['admin'];
|
||||||
|
|
||||||
|
return $this->json->encode($output);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Logs the user out and destroys the session.
|
||||||
|
*
|
||||||
|
* @return String 'logged_out'
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
function logout() {
|
||||||
|
if(!$this->checkInfo($this->username, $this->password)) return 'invalid';
|
||||||
|
|
||||||
|
$buddylist = $this->getBuddylist($this->username, false);
|
||||||
|
|
||||||
|
$set_status = mysql_query('UPDATE ' . SQL_PREFIX . 'users SET is_online=0, last_ping=\'' . time() . '\' WHERE username=\'' . mysql_real_escape_string($this->username) . '\'');
|
||||||
|
|
||||||
|
$in_chatrooms = mysql_query('SELECT room FROM ' . SQL_PREFIX . 'chats WHERE user=\'' . mysql_real_escape_string($this->username) . '\'');
|
||||||
|
while($row = mysql_fetch_assoc($in_chatrooms)) {
|
||||||
|
$buddylist['users'] = $this->getChatlist($row['room']);
|
||||||
|
$this->userEvent($this->username, $buddylist, 'chat', array('action'=>'left', 'room'=>$row['room']));
|
||||||
|
}
|
||||||
|
|
||||||
|
$exit_rooms = mysql_query('DELETE FROM ' . SQL_PREFIX . 'chats WHERE user=\'' . mysql_real_escape_string($this->username) . '\'');
|
||||||
|
|
||||||
|
$notify_buddies = $this->userEvent($this->username, $buddylist, 'status', array('status'=>0));
|
||||||
|
|
||||||
|
$_SESSION = array();
|
||||||
|
if (isset($_COOKIE[session_name()])) setcookie(session_name(), '', time()-42000, '/');
|
||||||
|
session_destroy();
|
||||||
|
|
||||||
|
return 'logged_out';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks the database for new messages and events.
|
||||||
|
*
|
||||||
|
* @return JSON object of new messages/events if any, otherwise nothing
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
function ping($away) {
|
||||||
|
$user = $this->checkInfo($this->username, $this->password, array('is_online', 'last_ping'));
|
||||||
|
if(!$user) {
|
||||||
|
$set_status = mysql_query('UPDATE ' . SQL_PREFIX . 'users SET is_online=0, last_ping=\'' . time() . '\' WHERE username=\'' . mysql_real_escape_string($this->username) . '\'');
|
||||||
|
return 'not_logged_in';
|
||||||
|
}
|
||||||
|
|
||||||
|
$buddylist = $this->getBuddylist($this->username, false);
|
||||||
|
|
||||||
|
$set_status = mysql_query('UPDATE ' . SQL_PREFIX . 'users SET is_online=\'' . mysql_real_escape_string($away + 1) . '\', last_ping=\'' . time() . '\' WHERE username=\'' . mysql_real_escape_string($this->username) . '\'');
|
||||||
|
if($user['is_online'] != ($away + 1)) $this->userEvent($this->username, $buddylist, 'status', array('status'=>($away + 1)));
|
||||||
|
|
||||||
|
foreach($buddylist as $group => $users) {
|
||||||
|
$user_count = count($users);
|
||||||
|
|
||||||
|
$reverse_list = array();
|
||||||
|
for($i = 0; $i < $user_count; $i++)
|
||||||
|
$reverse_list[$users[$i]] = $group;
|
||||||
|
}
|
||||||
|
|
||||||
|
$query = mysql_query('SELECT id, message, type, sender, recipient FROM ' . SQL_PREFIX . 'messages WHERE (recipient=\'' . mysql_real_escape_string($this->username) . '\') GROUP BY sender, message, recipient ORDER BY id ASC');
|
||||||
|
|
||||||
|
$i=0; $j=0;
|
||||||
|
$to_delete = array();
|
||||||
|
$output = array();
|
||||||
|
while ($row = mysql_fetch_assoc($query)) {
|
||||||
|
if(strpos($row['type'], 'msg') !== false) {
|
||||||
|
if($row['sender'] != $this->username || $row['sender'] == $row['recipient']) {
|
||||||
|
$output['messages'][$i++] = array('message' => $row['message'],
|
||||||
|
'sender' => $row['sender'],
|
||||||
|
'recipient' => $row['recipient'],
|
||||||
|
'chatroom' => ($row['type'] == 'chatmsg' ? 1 : 0));
|
||||||
|
|
||||||
|
$to_delete[] = $row['id'];
|
||||||
|
}
|
||||||
|
} else if($row['type'] == 'event') {
|
||||||
|
$output['events'][$j++] = array('event' => $row['message'],
|
||||||
|
'sender' => $row['sender'],
|
||||||
|
'recipient' => $row['recipient']);
|
||||||
|
|
||||||
|
$event = explode(',', $row['message']);
|
||||||
|
if($event[0] == 'status') $output['events'][$j-1]['group'] = $reverse_list[$row['sender']];
|
||||||
|
|
||||||
|
$to_delete[] = $row['id'];
|
||||||
|
} else if($row['type'] == 'server') {
|
||||||
|
switch($row['message']) {
|
||||||
|
case 'kick':
|
||||||
|
$this->logout();
|
||||||
|
print 'not_logged_in';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
$to_delete[] = $row['id'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(count($to_delete) > 0)
|
||||||
|
$delete_new = mysql_query('DELETE FROM ' . SQL_PREFIX . 'messages WHERE id IN(' . implode(',', $to_delete) . ')');
|
||||||
|
|
||||||
|
return $this->json->encode($output);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sends a message to another user.
|
||||||
|
*
|
||||||
|
* @return String 'sent' if successful, error string otherwise
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
function send($to, $message, $font, $font_size, $font_color, $bold, $italic, $underline, $is_chat) {
|
||||||
|
$to = mysql_real_escape_string($to);
|
||||||
|
|
||||||
|
if(!$this->checkInfo($this->username, $this->password)) {
|
||||||
|
$set_status = mysql_query('UPDATE ' . SQL_PREFIX . 'users SET is_online=0, last_ping=\'' . time() . '\' WHERE username=\'' . mysql_real_escape_string($this->username) . '\'');
|
||||||
|
return 'not_logged_in';
|
||||||
|
}
|
||||||
|
|
||||||
|
$is_online = $this->isOnline($to);
|
||||||
|
if($is_online > 0 || $is_chat == 'true') {
|
||||||
|
if($is_online == 100) {
|
||||||
|
$check_friendship = mysql_query('SELECT is_online FROM ' . SQL_PREFIX . 'users WHERE username IN(SELECT user FROM ' . SQL_PREFIX . 'buddylists WHERE user=\'' . strtolower($to) . '\' AND buddy=\'' . mysql_real_escape_string($this->username) . '\')');
|
||||||
|
if(mysql_num_rows($check_friendship) == 0)
|
||||||
|
return 'not_online';
|
||||||
|
}
|
||||||
|
|
||||||
|
$check_blocked = mysql_query('SELECT id FROM ' . SQL_PREFIX . 'blocklists WHERE user=\'' . strtolower($to) . '\' AND buddy=\'' . mysql_real_escape_string($this->username) . '\'');
|
||||||
|
if(mysql_num_rows($check_blocked) > 0)
|
||||||
|
return 'not_online';
|
||||||
|
|
||||||
|
$check_blocked = mysql_query('SELECT id FROM ' . SQL_PREFIX . 'blocklists WHERE buddy=\'' . strtolower($to) . '\' AND user=\'' . mysql_real_escape_string($this->username) . '\'');
|
||||||
|
if(mysql_num_rows($check_blocked) > 0)
|
||||||
|
return 'not_online';
|
||||||
|
|
||||||
|
if(strlen(trim($message)) > 0 && strlen($message) <= 1500) {
|
||||||
|
$message = ('<span style="font-family:' . mysql_real_escape_string($font) . ',sans-serif;font-size:' . mysql_real_escape_string($font_size > 24 ? 24 : $font_size) . 'px;color:' . mysql_real_escape_string($font_color) . ';">') .
|
||||||
|
($bold == 'true' ? '<b>' : '') . ($italic == 'true' ? '<i>' : '') . ($underline == 'true' ? '<u>' : '') .
|
||||||
|
$message .
|
||||||
|
($bold == 'true' ? '</b>' : '') . ($italic == 'true' ? '</i>' : '') . ($underline == 'true' ? '</u>' : '') .
|
||||||
|
('</span>');
|
||||||
|
|
||||||
|
if($is_chat == 'true') {
|
||||||
|
$where_to_send = $this->getChatlist($to);
|
||||||
|
|
||||||
|
$to_insert = '';
|
||||||
|
foreach($where_to_send as $username)
|
||||||
|
if($username != $this->username) $to_insert .= "('" . mysql_real_escape_string($message) . "', 'chatmsg', '" . $to . '.' . mysql_real_escape_string($this->username) . "', '" . strtolower($username) . "', " . time() . "),";
|
||||||
|
|
||||||
|
$to_insert = substr($to_insert, 0, strlen($to_insert) - 1);
|
||||||
|
} else {
|
||||||
|
$to_insert = "('" . mysql_real_escape_string($message) . "', 'msg', '" . mysql_real_escape_string($this->username) . "', '" . strtolower($to) . "', " . time() . ")";
|
||||||
|
}
|
||||||
|
|
||||||
|
$query = mysql_query('INSERT INTO ' . SQL_PREFIX . 'messages (message, type, sender, recipient, stamp) VALUES ' . $to_insert);
|
||||||
|
} else {
|
||||||
|
if(strlen($message) > 1500)
|
||||||
|
return 'too_long';
|
||||||
|
}
|
||||||
|
|
||||||
|
return 'sent';
|
||||||
|
} else {
|
||||||
|
return 'not_online';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds the buddy to the user's buddylist, if possible.
|
||||||
|
*
|
||||||
|
* @return String 'added' if successful, error string otherwise
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
function addBuddy($username, $group) {
|
||||||
|
if(!$this->checkInfo($this->username, $this->password)) return 'not_added';
|
||||||
|
|
||||||
|
$query = mysql_query('SELECT id FROM ' . SQL_PREFIX . 'buddylists WHERE user=\'' . mysql_real_escape_string($this->username) . '\' AND buddy=\'' . mysql_real_escape_string($username) . '\' LIMIT 1');
|
||||||
|
|
||||||
|
if(mysql_num_rows($query) == 0) {
|
||||||
|
$add_buddy = mysql_query('INSERT INTO ' . SQL_PREFIX . 'buddylists (user, buddy, `group`) VALUES(\'' . mysql_real_escape_string($this->username) . '\', \'' . mysql_real_escape_string($username) . '\', \'' . mysql_real_escape_string($group) . '\')');
|
||||||
|
return 'added';
|
||||||
|
} else {
|
||||||
|
return 'already_on_buddylist';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Removes the buddy from the user's buddylist, if possible.
|
||||||
|
*
|
||||||
|
* @return String 'removed' if successful, error string otherwise
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
function removeBuddy($username) {
|
||||||
|
if(!$this->checkInfo($this->username, $this->password)) return 'not_removed';
|
||||||
|
|
||||||
|
$query = mysql_query('SELECT id FROM ' . SQL_PREFIX . 'buddylists WHERE user=\'' . mysql_real_escape_string($this->username) . '\' AND buddy=\'' . mysql_real_escape_string($username) . '\' LIMIT 1');
|
||||||
|
|
||||||
|
if(mysql_num_rows($query) > 0) {
|
||||||
|
$remove_buddy = mysql_query('DELETE FROM ' . SQL_PREFIX . 'buddylists WHERE user=\'' . mysql_real_escape_string($this->username) . '\' AND buddy=\'' . mysql_real_escape_string($username) . '\'');
|
||||||
|
return 'removed';
|
||||||
|
} else {
|
||||||
|
return 'no_user_on_buddylist';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Blocks the user from being able to contact the user if blocked. Unblocks the user if blocked.
|
||||||
|
*
|
||||||
|
* @return String 'blocked' if not blocked, 'unblocked' if blocked, 'not_blocked' on error
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
function blockBuddy($username, $status) {
|
||||||
|
if(!$this->checkInfo($this->username, $this->password)) return 'not_blocked';
|
||||||
|
|
||||||
|
$query = mysql_query('SELECT id FROM ' . SQL_PREFIX . 'blocklists WHERE user=\'' . mysql_real_escape_string($this->username) . '\' AND buddy=\'' . mysql_real_escape_string($username) . '\' LIMIT 1');
|
||||||
|
|
||||||
|
if(mysql_num_rows($query) == 0) {
|
||||||
|
$block_buddy = mysql_query('INSERT INTO ' . SQL_PREFIX . 'blocklists (user, buddy) VALUES(\'' . mysql_real_escape_string($this->username) . '\', \'' . mysql_real_escape_string($username) . '\')');
|
||||||
|
|
||||||
|
$this->userEvent($this->username, array('block'=>array(mysql_real_escape_string($username))), 'status', array('status'=>0));
|
||||||
|
return 'blocked';
|
||||||
|
} else {
|
||||||
|
$unblock_buddy = mysql_query('DELETE FROM ' . SQL_PREFIX . 'blocklists WHERE user=\'' . mysql_real_escape_string($this->username) . '\' AND buddy=\'' . mysql_real_escape_string($username) . '\' LIMIT 1');
|
||||||
|
|
||||||
|
$this->userEvent($this->username, array('block'=>array(mysql_real_escape_string($username))), 'status', array('status'=>mysql_real_escape_string($status)));
|
||||||
|
return 'unblocked';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Removes the group (and all buddies of group) from a user's buddylist.
|
||||||
|
*
|
||||||
|
* @return String 'removed' if successful, error string otherwise
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
function removeGroup($group) {
|
||||||
|
if(!$this->checkInfo($this->username, $this->password)) return 'not_removed';
|
||||||
|
|
||||||
|
$query = mysql_query('SELECT id FROM ' . SQL_PREFIX . 'buddylists WHERE user=\'' . mysql_real_escape_string($this->username) . '\' AND `group`=\'' . mysql_real_escape_string($group) . '\' LIMIT 1');
|
||||||
|
if(mysql_num_rows($query) > 0) {
|
||||||
|
$remove_buddy = mysql_query('DELETE FROM ' . SQL_PREFIX . 'buddylists WHERE user=\'' . mysql_real_escape_string($this->username) . '\' AND `group`=\'' . mysql_real_escape_string($group) . '\'');
|
||||||
|
return 'removed';
|
||||||
|
} else {
|
||||||
|
return 'no_group_on_buddylist';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Registers a user.
|
||||||
|
*
|
||||||
|
* @return String 'registered' if successful, error string otherwise
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
function register($username, $password, $email) {
|
||||||
|
$username = strtolower($username);
|
||||||
|
|
||||||
|
if(preg_match('/^[a-z0-9_\\d]+$/', $username) !== false && strlen($username) >= 3 && strlen($username) <= 16) {
|
||||||
|
if(preg_match('/^([a-zA-Z0-9_\\.\\-])+\\@(([a-zA-Z0-9\\-])+\\.)+([a-zA-Z0-9]{2,4})+$/', $email) !== false) {
|
||||||
|
if(strlen($password) >= 6 && strlen($password) <= 20) {
|
||||||
|
if(mysql_num_rows(mysql_query('SELECT email FROM ' . SQL_PREFIX . 'users WHERE email=\'' . mysql_real_escape_string($email) . '\'')) == 0) {
|
||||||
|
$query = mysql_query('SELECT username FROM ' . SQL_PREFIX . 'users WHERE username=\'' . mysql_real_escape_string($username) . '\'');
|
||||||
|
if(mysql_num_rows($query) == 0) {
|
||||||
|
$query = mysql_query('INSERT INTO ' . SQL_PREFIX . 'users (username, password, email) VALUES (\'' . mysql_real_escape_string($username) . '\', \'' . md5($password) . '\', \'' . mysql_real_escape_string($email) . '\')');
|
||||||
|
print 'user_registered';
|
||||||
|
} else {
|
||||||
|
print 'username_taken';
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
print 'email_already_used';
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
print 'password_bad_length';
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
print 'invalid_email';
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
print 'username_bad';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a certain user exists (only works when authenticated).
|
||||||
|
*
|
||||||
|
* @return String 'exists' if successful, error string otherwise
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
function isUser($username) {
|
||||||
|
if(!$this->checkInfo($this->username, $this->password)) return 'not_logged_in';
|
||||||
|
|
||||||
|
$query = mysql_query('SELECT is_online FROM ' . SQL_PREFIX . 'users WHERE username=\'' . mysql_real_escape_string($username) . '\'');
|
||||||
|
|
||||||
|
if(mysql_num_rows($query) > 0) {
|
||||||
|
$userinfo = mysql_fetch_assoc($query);
|
||||||
|
|
||||||
|
if($userinfo['is_online'] == 100) {
|
||||||
|
$check_friendship = mysql_query('SELECT is_online FROM ' . SQL_PREFIX . 'users WHERE username IN(SELECT user FROM ' . SQL_PREFIX . 'buddylists WHERE user=\'' . mysql_real_escape_string($username) . '\' AND buddy=\'' . mysql_real_escape_string($this->username) . '\')');
|
||||||
|
|
||||||
|
if(mysql_num_rows($check_friendship) == 0) return '0';
|
||||||
|
else return $userinfo['is_online'];
|
||||||
|
} else {
|
||||||
|
return $userinfo['is_online'];
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return 'not_exists';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Resets a user's password based on their email address.
|
||||||
|
*
|
||||||
|
* @return String 'reset' if successful, 'no_email_on_record' otherwise
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
function reset($email) {
|
||||||
|
$email = urldecode($email);
|
||||||
|
|
||||||
|
$query = mysql_query('SELECT email FROM ' . SQL_PREFIX . 'users WHERE email=\'' . mysql_real_escape_string($email) . '\'');
|
||||||
|
if(mysql_num_rows($query) > 0) {
|
||||||
|
$new_pass = $this->generatePassword();
|
||||||
|
$query = mysql_query('UPDATE ' . SQL_PREFIX . 'users SET password=\'' . md5($new_pass) . '\' WHERE email=\'' . mysql_real_escape_string($email) . '\'');
|
||||||
|
mail($email, 'Your Reset Password', "You requested that your password be reset, your new password is below.\n\nNew Password: $new_pass", 'From: Reset Password <reset_password@'.$_SERVER['HTTP_HOST'].'>');
|
||||||
|
return 'pw_reset';
|
||||||
|
} else {
|
||||||
|
return 'no_email_on_record';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Changes the user's password.
|
||||||
|
*
|
||||||
|
* @return String 'changed' if successful, error string otherwise
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
function passwordChange($password, $new_password) {
|
||||||
|
if(!$this->checkInfo($this->username, $password)) return 'invalid_pw';
|
||||||
|
|
||||||
|
if(strlen($new_password) >= 6 && strlen($new_password) <= 20) {
|
||||||
|
$query = mysql_query('UPDATE ' . SQL_PREFIX . 'users SET password=\'' . md5($new_password) . '\' WHERE username=\'' . mysql_real_escape_string($this->username) . '\'');
|
||||||
|
return 'pw_changed';
|
||||||
|
} else {
|
||||||
|
return 'password_bad_length';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds a user to a chatroom.
|
||||||
|
*
|
||||||
|
* @return String 'joined' if successful, error string otherwise
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
function joinRoom($room) {
|
||||||
|
$room = mysql_real_escape_string(strtolower($room));
|
||||||
|
|
||||||
|
$query = mysql_query('SELECT id FROM ' . SQL_PREFIX . 'chats WHERE user=\'' . mysql_real_escape_string($this->username) . '\' AND room=\'' . $room . '\'');
|
||||||
|
|
||||||
|
if(mysql_num_rows($query) > 0) {
|
||||||
|
return 'already_joined';
|
||||||
|
} else {
|
||||||
|
if(preg_match('/^[^a-z0-9_\d]+$/', $room) == false) {
|
||||||
|
$query = mysql_query('INSERT INTO ' . SQL_PREFIX . 'chats (room, user) VALUES (\'' . $room . '\', \'' . mysql_real_escape_string($this->username) . '\')');
|
||||||
|
|
||||||
|
$output['users'] = $this->getChatlist($room);
|
||||||
|
$notify_buddies = $this->userEvent($this->username, $output, 'chat', array('action'=>'join', 'room'=>$room));
|
||||||
|
|
||||||
|
return $this->json->encode($output);
|
||||||
|
} else {
|
||||||
|
return 'invalid_chars';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Removes a user from a chatroom.
|
||||||
|
*
|
||||||
|
* @return String 'left' if successful, 'not_left' otherwise
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
function leaveRoom($room) {
|
||||||
|
$room = mysql_real_escape_string(strtolower($room));
|
||||||
|
|
||||||
|
$query = mysql_query('SELECT id FROM ' . SQL_PREFIX . 'chats WHERE user=\'' . mysql_real_escape_string($this->username) . '\' AND room=\'' . $room . '\'') ;
|
||||||
|
|
||||||
|
if(mysql_num_rows($query) > 0) {
|
||||||
|
$row = mysql_fetch_assoc($query);
|
||||||
|
$query = mysql_query('DELETE FROM ' . SQL_PREFIX . 'chats WHERE id=\'' . $row['id'] . '\'');
|
||||||
|
|
||||||
|
$output['users'] = $this->getChatlist($room);
|
||||||
|
$notify_buddies = $this->userEvent($this->username, $output, 'chat', array('action'=>'left', 'room'=>$room));
|
||||||
|
|
||||||
|
return 'left';
|
||||||
|
} else {
|
||||||
|
return 'not_left';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves a list of room names and returns them to the user as a JSON object.
|
||||||
|
*
|
||||||
|
* @return JSON object
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
function roomList() {
|
||||||
|
$rooms_query = mysql_query('SELECT room FROM ' . SQL_PREFIX . 'chats GROUP BY room ORDER BY room ASC');
|
||||||
|
|
||||||
|
$rooms = array();
|
||||||
|
while($row = mysql_fetch_assoc($rooms_query))
|
||||||
|
$rooms[] = $row['room'];
|
||||||
|
|
||||||
|
return $this->json->encode($rooms);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Proccesses the upload of the new Buddy Icon for the user.
|
||||||
|
*
|
||||||
|
* @return JSON object
|
||||||
|
* @author Benjamin Hutchins
|
||||||
|
**/
|
||||||
|
function changeIcon() {
|
||||||
|
global $maxBuddyIconSize;
|
||||||
|
|
||||||
|
if (!isset($maxBuddyIconSize) || $maxBuddyIconSize == 0) {
|
||||||
|
return "unkown";
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
@ini_set('file_uploads', 'On');
|
||||||
|
@ini_set('upload_max_filesize', $maxBuddyIconSize.'M');
|
||||||
|
@ini_set('post_max_size', $maxBuddyIconSize.'M');
|
||||||
|
*/
|
||||||
|
|
||||||
|
$allowed_types = array("image/x-ms-bmp", "image/x-icon", "image/jpeg", "image/x-png", "image/gif", "image/png", "image/tiff");
|
||||||
|
$allowed_files = array('jpeg', 'jpg', 'jpe', 'bmp', 'png', 'gif', 'ico', "tif", "tiff");
|
||||||
|
|
||||||
|
if (empty($_FILES['icon']['tmp_name'])) {
|
||||||
|
return "nofile";
|
||||||
|
}
|
||||||
|
if ($_FILES['icon']['size'] > $maxBuddyIconSize*1024) {
|
||||||
|
return "size";
|
||||||
|
}
|
||||||
|
if (!in_array($_FILES['icon']['type'], $allowed_types)) {
|
||||||
|
return "bad_type";
|
||||||
|
}
|
||||||
|
$filename = $_FILES['icon']['name'];
|
||||||
|
$extension = strtolower(end(explode(".", $filename)));
|
||||||
|
if (!in_array($extension, $allowed_files)) {
|
||||||
|
return "bad_extension";
|
||||||
|
}
|
||||||
|
if (move_uploaded_file($_FILES['icon']['tmp_name'], "./buddyicons/".$this->username.".".$extension)) {
|
||||||
|
if (mysql_query('UPDATE ' . SQL_PREFIX . 'users SET buddyicon=\'' . mysql_real_escape_string($extension) . '\' WHERE username=\'' . mysql_real_escape_string($this->username) . '\'')) {
|
||||||
|
return "success";
|
||||||
|
} else {
|
||||||
|
return "unkown";
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return "unkown";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Updates a user's profile.
|
||||||
|
*
|
||||||
|
* @return success value
|
||||||
|
* @author Benjamin Hutchins
|
||||||
|
**/
|
||||||
|
function changeProfile($profile) {
|
||||||
|
if (mysql_query('UPDATE ' . SQL_PREFIX . 'users SET profile=\'' . mysql_real_escape_string(strip_tags($profile)) . '\' WHERE username=\'' . mysql_real_escape_string($this->username) . '\'')) {
|
||||||
|
return 'success';
|
||||||
|
} else {
|
||||||
|
return 'failed';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a user's profile.
|
||||||
|
*
|
||||||
|
* @return HTML content
|
||||||
|
* @author Benjamin Hutchins
|
||||||
|
**/
|
||||||
|
function getProfile($username) {
|
||||||
|
$query = mysql_query('SELECT profile FROM ' . SQL_PREFIX . 'users WHERE username=\'' . mysql_real_escape_string($username) . '\'');
|
||||||
|
|
||||||
|
$result = mysql_fetch_assoc($query);
|
||||||
|
return $result['profile'];
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Begin private functions */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return a user's status.
|
||||||
|
*
|
||||||
|
* @return Integer representing user's status
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
function isOnline($username) {
|
||||||
|
$query = mysql_query('SELECT is_online FROM ' . SQL_PREFIX . 'users WHERE username=\'' . mysql_real_escape_string($username) . '\'');
|
||||||
|
|
||||||
|
$result = mysql_fetch_assoc($query);
|
||||||
|
return $result['is_online'];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check to see if the supplied user information is valid, and if so return specific information.
|
||||||
|
*
|
||||||
|
* @return false if information is invalid, array of data otherwise
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
function checkInfo($username, $password, $return=array()) {
|
||||||
|
if(count($return) > 0)
|
||||||
|
$columns = implode(',', $return);
|
||||||
|
else
|
||||||
|
$columns = 'id';
|
||||||
|
|
||||||
|
$username = mysql_real_escape_string($username);
|
||||||
|
$password = mysql_real_escape_string($password);
|
||||||
|
|
||||||
|
$query = mysql_query('SELECT ' . $columns . ' FROM ' . SQL_PREFIX . 'users WHERE username=\'' . $username . '\' AND password=\'' . $password . '\' LIMIT 1');
|
||||||
|
|
||||||
|
if(mysql_num_rows($query) > 0)
|
||||||
|
return mysql_fetch_assoc($query);
|
||||||
|
else
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves a list of users in a specific chatroom.
|
||||||
|
*
|
||||||
|
* @return Array of users
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
function getChatlist($room) {
|
||||||
|
$query = mysql_query('SELECT DISTINCT user FROM ' . SQL_PREFIX . 'chats WHERE room=\'' . mysql_real_escape_string(strtolower($room)) . '\'');
|
||||||
|
|
||||||
|
while ($row = mysql_fetch_assoc($query))
|
||||||
|
$userlist[]=$row['user'];
|
||||||
|
return $userlist;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves a list of all of the user's buddies.
|
||||||
|
*
|
||||||
|
* @return Array of buddies by group
|
||||||
|
* @author Joshua Gross
|
||||||
|
* @update Benjamin Hutchins - returns none-blocked buddies if $inc_blocked = false
|
||||||
|
**/
|
||||||
|
function getBuddylist($username, $inc_blocked=true) {
|
||||||
|
$username = mysql_real_escape_string($username);
|
||||||
|
|
||||||
|
$query = mysql_query('SELECT ' . SQL_PREFIX . 'buddylists.buddy AS buddy, `group` FROM ' . SQL_PREFIX . 'buddylists WHERE user=\'' . $username . '\' AND ' . SQL_PREFIX . 'buddylists.buddy NOT IN(SELECT user FROM ' . SQL_PREFIX . 'blocklists WHERE buddy=\'' . $username . '\')' . ($inc_blocked ? "" : ' AND ' . SQL_PREFIX . 'buddylists.buddy NOT IN(SELECT buddy FROM ' . SQL_PREFIX . 'blocklists WHERE user=\'' . $username . '\')'));
|
||||||
|
|
||||||
|
$buddylist = array();
|
||||||
|
while($row = mysql_fetch_assoc($query))
|
||||||
|
$buddylist[$row['group']][] = $row['buddy'];
|
||||||
|
|
||||||
|
return $buddylist;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves a list of the user's buddies that are online (with any status).
|
||||||
|
*
|
||||||
|
* @return Array of buddies by group with status information
|
||||||
|
* @author Joshua Gross
|
||||||
|
* @update Benjamin Hutchins - only returns buddies that did not block user.
|
||||||
|
**/
|
||||||
|
function getBuddylistOnline($username) {
|
||||||
|
$username = mysql_real_escape_string($username);
|
||||||
|
|
||||||
|
//$query = mysql_query('SELECT ' . SQL_PREFIX . 'buddylists.buddy, `group`, buddyicon, is_online FROM ' . SQL_PREFIX . 'buddylists LEFT JOIN ' . SQL_PREFIX . 'users ON ' . SQL_PREFIX . 'buddylists.buddy = ' . SQL_PREFIX . 'users.username WHERE ' . SQL_PREFIX . 'buddylists.user=\'' . $username . '\' AND ' . SQL_PREFIX . 'buddylists.buddy NOT IN(SELECT user FROM ' . SQL_PREFIX . 'blocklists WHERE buddy=\'' . $username . '\')');
|
||||||
|
$query = mysql_query('SELECT ' . SQL_PREFIX . 'buddylists.buddy, `group`, buddyicon, is_online, ' . SQL_PREFIX . 'buddylists.buddy IN(SELECT user FROM ' . SQL_PREFIX . 'blocklists WHERE buddy=\'' . $username . '\') AS blocked FROM ' . SQL_PREFIX . 'buddylists LEFT JOIN ' . SQL_PREFIX . 'users ON ' . SQL_PREFIX . 'buddylists.buddy = ' . SQL_PREFIX . 'users.username WHERE ' . SQL_PREFIX . 'buddylists.user=\'' . $username . '\'');
|
||||||
|
|
||||||
|
$buddylist = array();
|
||||||
|
while($row = mysql_fetch_assoc($query)) {
|
||||||
|
$buddylist[$row['group']][] = array('username'=>$row['buddy'], 'icon'=>$row['buddyicon'], 'is_online'=>($row['blocked'] ? 0 : $row['is_online']));
|
||||||
|
}
|
||||||
|
return $buddylist;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves the list of blocked buddies from the database.
|
||||||
|
*
|
||||||
|
* @return Array of buddies
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
function getBlocklist($username) {
|
||||||
|
$username = mysql_real_escape_string($username);
|
||||||
|
|
||||||
|
$query = mysql_query('SELECT buddy FROM ' . SQL_PREFIX . 'blocklists WHERE user=\'' . $username . '\'');
|
||||||
|
|
||||||
|
$blocklist = array();
|
||||||
|
while($row = mysql_fetch_assoc($query))
|
||||||
|
$blocklist[] = $row['buddy'];
|
||||||
|
|
||||||
|
return $blocklist;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Event handler for status or chat status updates.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
function userEvent($username, $buddylist, $event, $args) {
|
||||||
|
$username = mysql_real_escape_string($username);
|
||||||
|
|
||||||
|
switch($event) {
|
||||||
|
case 'chat':
|
||||||
|
$users = $buddylist['users'];
|
||||||
|
$users_str = @implode("','", $users);
|
||||||
|
|
||||||
|
$query = mysql_query('SELECT username, is_online FROM ' . SQL_PREFIX . 'users WHERE username IN(\'' . $users_str . '\') AND is_online > 0 ORDER BY username ASC');
|
||||||
|
|
||||||
|
while ($row = mysql_fetch_assoc($query))
|
||||||
|
if(strlen($to_insert[$row['username']]) == 0) $to_insert[$row['username']] = mysql_real_escape_string($event . ',' . $args['action'] . ',' . $args['room']);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'status':
|
||||||
|
if($args['status'] == 100) {
|
||||||
|
$args['status'] = 0; // we're going to do this backwards
|
||||||
|
// instead of broadcasting a positive message to our buddies
|
||||||
|
// we will send a negative (offline) message to all our non-buddies
|
||||||
|
// who have us on their buddylist
|
||||||
|
$query_string = 'username IN(SELECT user FROM ' . SQL_PREFIX . 'buddylists WHERE buddy=\'' . $username . '\') AND ' .
|
||||||
|
'username NOT IN(\'';
|
||||||
|
} else {
|
||||||
|
$query_string = '(username IN(SELECT user FROM ' . SQL_PREFIX . 'buddylists WHERE buddy=\'' . $username . '\') AND username NOT IN(SELECT buddy FROM ' . SQL_PREFIX . 'blocklists WHERE user=\'' . $username . '\')) OR ' .
|
||||||
|
'username IN(\'';
|
||||||
|
}
|
||||||
|
|
||||||
|
if(count($buddylist) == 0) $buddylist[''] = array('');
|
||||||
|
|
||||||
|
foreach($buddylist as $group => $users) {
|
||||||
|
$users_str = implode("','", $users);
|
||||||
|
|
||||||
|
$query = mysql_query('SELECT username, is_online FROM ' . SQL_PREFIX . 'users WHERE (' . $query_string . $users_str . '\')) GROUP BY username');
|
||||||
|
|
||||||
|
while($row = mysql_fetch_assoc($query)) {
|
||||||
|
if(in_array($row['username'], $users) !== false) {
|
||||||
|
if($row['is_online'] == 100) {
|
||||||
|
$friend_query = mysql_query('SELECT id FROM ' . SQL_PREFIX . 'buddylists WHERE user=\'' . $row['username'] . '\' AND buddy=\'' . $username . '\' LIMIT 1');
|
||||||
|
if(mysql_num_rows($friend_query) == 0) $row['is_online'] = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if($row['is_online'] != 0 && strlen($to_insert[$row['username']]) == 0) $to_insert[$row['username']] = mysql_real_escape_string($event . ',' . $args['status']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(count($to_insert) > 0) {
|
||||||
|
$time_cur = time();
|
||||||
|
foreach($to_insert as $user => $evt)
|
||||||
|
$insert_str .= "('" . $evt . "', 'event', '" . $username . "', '" . mysql_real_escape_string($user) . "', " . $time_cur . "),";
|
||||||
|
|
||||||
|
$insert_str = substr($insert_str, 0, strlen($insert_str) - 1);
|
||||||
|
$query = @mysql_query('INSERT INTO ' . SQL_PREFIX . 'messages (message, type, sender, recipient, stamp) VALUES ' . $insert_str);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generates a random string of the specified length (default = 10).
|
||||||
|
*
|
||||||
|
* @return String
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
function generatePassword($length=10) {
|
||||||
|
$randstr='';
|
||||||
|
srand((double)microtime()*1000000);
|
||||||
|
|
||||||
|
$chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
|
||||||
|
while(strlen($randstr)<$length) {
|
||||||
|
$randstr.=substr($chars,(rand()%(strlen($chars))),1);
|
||||||
|
}
|
||||||
|
return $randstr;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Garbage collector. Resets users who have been inactive for more than 5 minutes.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
function gc() {
|
||||||
|
// cleanup logged-in users in database? [30% chance]
|
||||||
|
if(rand(1, 100) <= 30) {
|
||||||
|
// yes, cleanup! //
|
||||||
|
$expire_time = time() - 30; // idle for more than 30 seconds?
|
||||||
|
|
||||||
|
$cleanup_event = mysql_query('SELECT username FROM ' . SQL_PREFIX . 'users WHERE last_ping < ' . $expire_time . ' AND is_online > 0');
|
||||||
|
if(mysql_num_rows($cleanup_event) > 0) {
|
||||||
|
while($row = mysql_fetch_assoc($cleanup_event))
|
||||||
|
$notify_buddies = $this->userEvent($row['username'], $this->getBuddylist($row['username']), 'status', array('status'=>0));
|
||||||
|
}
|
||||||
|
|
||||||
|
$cleanup_event2 = mysql_query('SELECT user, room FROM ' . SQL_PREFIX . 'chats WHERE user IN(SELECT username FROM ' . SQL_PREFIX . 'users WHERE last_ping < ' . $expire_time . ' AND is_online > 0)');
|
||||||
|
if(mysql_num_rows($cleanup_event2) > 0) {
|
||||||
|
while($row = mysql_fetch_assoc($cleanup_event2)) {
|
||||||
|
$room = mysql_query('SELECT user FROM ' . SQL_PREFIX . 'chats WHERE room=\'' . $row['room'] . '\'');
|
||||||
|
|
||||||
|
if(mysql_num_rows($room) > 0) {
|
||||||
|
while($row2 = mysql_fetch_assoc($room))
|
||||||
|
$chatusers['users'][] = $row2['user'];
|
||||||
|
}
|
||||||
|
|
||||||
|
$notify_chatusers = $this->userEvent($row['user'], $chatusers, 'chat', array('action'=>'left', 'room'=>$row['room']));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$cleanup_chats = mysql_query('DELETE FROM ' . SQL_PREFIX . 'chats WHERE user IN(SELECT username FROM ' . SQL_PREFIX . 'users WHERE last_ping < ' . $expire_time . ' AND is_online > 0)');
|
||||||
|
$cleanup_msgs = mysql_query('DELETE FROM ' . SQL_PREFIX . 'messages WHERE stamp < ' . (time() - 300));
|
||||||
|
$cleanup = mysql_query('UPDATE ' . SQL_PREFIX . 'users SET is_online=0 WHERE last_ping < ' . $expire_time . ' AND is_online > 0');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$ajax_im = new Ajax_IM($_POST['call']);
|
||||||
|
|
||||||
|
mysql_close();
|
||||||
|
?>
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
<?
|
||||||
|
///////////////////////////////////
|
||||||
|
// ajax im 3.41 //
|
||||||
|
// AJAX Instant Messenger //
|
||||||
|
// Copyright (c) 2006-2008 //
|
||||||
|
// http://www.ajaxim.com/ //
|
||||||
|
// Do not remove this notice //
|
||||||
|
///////////////////////////////////
|
||||||
|
|
||||||
|
// MySQL Database Configuration
|
||||||
|
$sql_user = 'root';
|
||||||
|
$sql_pass = '';
|
||||||
|
$sql_host = 'localhost';
|
||||||
|
$sql_db = 'ajaxim';
|
||||||
|
|
||||||
|
// This is the prefix for the ajax im MySQL tables -- this can usually be left alone.
|
||||||
|
// (If upgrading from a version < 3.1, set the prefix to '')
|
||||||
|
define('SQL_PREFIX', 'ajaxim_');
|
||||||
|
|
||||||
|
$maxBuddyIconSize = 100; // in KBs, set to 0 to disable uploads
|
||||||
|
?>
|
||||||
@@ -0,0 +1,153 @@
|
|||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||||
|
<title></title>
|
||||||
|
<script src="js/prototype.js" type="text/javascript"></script>
|
||||||
|
<script src="js/effects.js" type="text/javascript"></script>
|
||||||
|
<script src="js/window.js" type="text/javascript"></script>
|
||||||
|
<script src="js/sm2.js" type="text/javascript"></script>
|
||||||
|
<script src="js/utils.js" type="text/javascript"></script>
|
||||||
|
<script src="js/config.js" type="text/javascript"></script>
|
||||||
|
|
||||||
|
<script src="js/system.js" type="text/javascript"></script>
|
||||||
|
<script src="js/dialogs.js" type="text/javascript"></script>
|
||||||
|
<script src="js/buddylist.js" type="text/javascript"></script>
|
||||||
|
<script src="js/status.js" type="text/javascript"></script>
|
||||||
|
<script src="js/profile.js" type="text/javascript"></script>
|
||||||
|
<script src="js/im.basic.js" type="text/javascript"></script>
|
||||||
|
<script src="js/im.js" type="text/javascript"></script>
|
||||||
|
<script src="js/chat.js" type="text/javascript"></script>
|
||||||
|
<script src="js/languages.js" type="text/javascript"></script>
|
||||||
|
<script src="js/context.js" type="text/javascript"></script>
|
||||||
|
<script src="js/buttonctl.js" type="text/javascript"></script>
|
||||||
|
<script src="js/browser.js" type="text/javascript"></script>
|
||||||
|
|
||||||
|
<script src="js/ajax_im.js" type="text/javascript"></script>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div id="modal" class="modalFrame" style="display:none;">
|
||||||
|
<div id="loginDialog">
|
||||||
|
<p><span class="dialog_modal_title lang-signOn"></span></p>
|
||||||
|
|
||||||
|
<p><span id="login_error_msg" class="dialog_error" style="display:none"> </span></p>
|
||||||
|
|
||||||
|
<p><span class="dialog_label lang-username langinsert-pre">:</span> <span class="dialog_input"><input type="text" id="username" onkeypress="System.keyHandler(event, System.login);" /></span></p>
|
||||||
|
<div style="clear:both"></div>
|
||||||
|
<p><span class="dialog_label lang-password langinsert-pre">:</span> <span class="dialog_input"><input type="password" id="password" onfoucs="this.select();" onkeypress="System.keyHandler(event, System.login);" /></span></p>
|
||||||
|
<div style="clear:both"></div>
|
||||||
|
<p>
|
||||||
|
<span id="login_dialog_links" class="dialog_links" style="width:285px;" onselectstart="return false;" onmousedown="return false;">
|
||||||
|
<a href="#" class="stdButton lang-signOn" id="signon_button" onclick="System.login();return false;" onmouseover="ButtonCtl.hover(this);" onmousedown="ButtonCtl.down(this);" onmouseup="ButtonCtl.normal(this);" onmouseout="ButtonCtl.normal(this);"></a>
|
||||||
|
<a href="#" class="stdButton lang-register registerObject" onclick="Dialogs.register();return false;" onmouseover="ButtonCtl.hover(this);" onmousedown="ButtonCtl.down(this);" onmouseup="ButtonCtl.normal(this);" onmouseout="ButtonCtl.normal(this);"></a>
|
||||||
|
<a href="#" class="stdButton lang-forgotPassword langinsert-pre" onclick="Dialogs.forgotPass();return false;" onmouseover="ButtonCtl.hover(this);" onmousedown="ButtonCtl.down(this);" onmouseup="ButtonCtl.normal(this);" onmouseout="ButtonCtl.normal(this);"> </a>
|
||||||
|
</span>
|
||||||
|
</p>
|
||||||
|
<div style="clear:both"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="registerDialog" class="registerObject" style="display:none;">
|
||||||
|
<p><span class="dialog_modal_title lang-register"></span></p>
|
||||||
|
<div style="clear:both"></div>
|
||||||
|
<p><span id="register_error_msg" class="dialog_error" style="display:none"> </span></p>
|
||||||
|
<div style="clear:both"></div>
|
||||||
|
<p><span class="dialog_label lang-username langinsert-pre">:</span> <span class="dialog_input"><input type="text" id="newusername" onkeypress="System.keyHandler(event, System.register);" /></span></p>
|
||||||
|
<div style="clear:both"></div>
|
||||||
|
<p><span class="dialog_label lang-password langinsert-pre">:</span> <span class="dialog_input"><input type="password" id="newpassword" onkeypress="System.keyHandler(event, System.register);" /></span></p>
|
||||||
|
<div style="clear:both"></div>
|
||||||
|
<p><span class="dialog_label lang-confirm langinsert-pre">:</span> <span class="dialog_input"><input type="password" id="newpassword2" onkeypress="System.keyHandler(event, System.register);" /></span></p>
|
||||||
|
<div style="clear:both"></div>
|
||||||
|
<p><span class="dialog_label lang-email langinsert-pre">:</span> <span class="dialog_input"><input type="text" id="newemail" onkeypress="System.keyHandler(event, System.register);" /></span></p>
|
||||||
|
<div style="clear:both"></div>
|
||||||
|
<p>
|
||||||
|
<span class="dialog_links" style="width:190px;" onselectstart="return false;" onmousedown="return false;">
|
||||||
|
<a href="#" class="stdButton lang-register" id="register_button" onclick="System.register();return false;" onmouseover="ButtonCtl.hover(this);" onmousedown="ButtonCtl.down(this);" onmouseup="ButtonCtl.normal(this);" onmouseout="ButtonCtl.normal(this);"></a>
|
||||||
|
<a href="#" class="stdButton lang-cancel" onclick="Dialogs.login();return false;" onmouseover="ButtonCtl.hover(this);" onmousedown="ButtonCtl.down(this);" onmouseup="ButtonCtl.normal(this);" onmouseout="ButtonCtl.normal(this);"></a>
|
||||||
|
</span>
|
||||||
|
</p>
|
||||||
|
<div style="clear:both"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="forgotPassDialog" style="display:none;">
|
||||||
|
<p><span class="dialog_modal_title lang-passwordReset"></span></p>
|
||||||
|
<div style="clear:both"></div>
|
||||||
|
<p><span id="forgotpass_error_msg" class="dialog_error" style="display:none"> </span></p>
|
||||||
|
<div style="clear:both"></div>
|
||||||
|
<p><span class="dialog_label lang-emailAddress langinsert-pre">: </span> <span class="dialog_input"><input type="text" id="resetto" onkeypress="System.keyHandler(event, System.resetPass);" /></span></p>
|
||||||
|
<div style="clear:both"></div>
|
||||||
|
<p>
|
||||||
|
<span class="dialog_links" style="width:190px;" onselectstart="return false;" onmousedown="return false;">
|
||||||
|
<a href="#" class="stdButton lang-reset" id="forgotpass_button" onclick="System.resetPass();return false;" onmouseover="ButtonCtl.hover(this);" onmousedown="ButtonCtl.down(this);" onmouseup="ButtonCtl.normal(this);" onmouseout="ButtonCtl.normal(this);"></a>
|
||||||
|
<a href="#" class="stdButton lang-cancel" onclick="Dialogs.login();return false;" onmouseover="ButtonCtl.hover(this);" onmousedown="ButtonCtl.down(this);" onmouseup="ButtonCtl.normal(this);" onmouseout="ButtonCtl.normal(this);"></a>
|
||||||
|
</span>
|
||||||
|
</p>
|
||||||
|
<div style="clear:both"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="itemList" id="statusList">
|
||||||
|
<a href="#" class="lang-available langinsert-post" onclick="Status.set(0, Languages.get('available'));return false;"><img src="images/online.png" style="border:0;" alt="" title="" /> </a>
|
||||||
|
<a href="#" class="lang-friendsOnly langinsert-post" style="border-bottom: 1px solid #bfbcb8;" onclick="Status.set(99, Languages.get('friendsOnly'));return false;"><img src="images/online.png" style="border:0;" alt="" title="" /> </a>
|
||||||
|
<a href="#" class="lang-busy langinsert-post" onclick="Status.set(1, Languages.get('busy'));return false;"><img src="images/away.png" style="border:0;" alt="" title="" /> </a>
|
||||||
|
<a href="#" class="lang-beBackLater langinsert-post" onclick="Status.set(1, Languages.get('beBackLater'));return false;"><img src="images/away.png" style="border:0;" alt="" title="" /> </a>
|
||||||
|
<a href="#" class="lang-away langinsert-post" onclick="Status.set(1, Languages.get('away'));return false;"><img src="images/away.png" style="border:0;" alt="" title="" /> </a>
|
||||||
|
<a href="#" class="lang-custom langinsert-post" id="customMessage" style="border-top: 1px solid #bfbcb8;" onclick="Status.customAway();$('statusList').style.display='none';return false;"><img src="images/away.png" style="border:0;" alt="" title="" /> </a>
|
||||||
|
<a href="#" class="lang-invisible langinsert-post" style="border-top: 1px solid #bfbcb8;" onclick="Status.set(49, Languages.get('invisible'));return false;"><img src="images/offline.png" style="border:0;" alt="" title="" /> </a>
|
||||||
|
</div>
|
||||||
|
<div class="itemList" id="fontsList">
|
||||||
|
<a href="#" onclick="IM.active.setFont('Arial');return false;">Arial</a>
|
||||||
|
<a href="#" onclick="IM.active.setFont('Comic Sans MS');return false;">Comic Sans MS</a>
|
||||||
|
<a href="#" onclick="IM.active.setFont('Courier New');return false;">Courier New</a>
|
||||||
|
<a href="#" onclick="IM.active.setFont('Garamond');return false;">Garamond</a>
|
||||||
|
<a href="#" onclick="IM.active.setFont('Georgia');return false;">Georgia</a>
|
||||||
|
<a href="#" onclick="IM.active.setFont('Impact');return false;">Impact</a>
|
||||||
|
<a href="#" onclick="IM.active.setFont('Tahoma');return false;">Tahoma</a>
|
||||||
|
<a href="#" onclick="IM.active.setFont('Times New Roman');return false;">Times New Roman</a>
|
||||||
|
<a href="#" onclick="IM.active.setFont('Verdana');return false;">Verdana</a>
|
||||||
|
</div>
|
||||||
|
<div class="itemList" id="fontSizeList" oncontextmenu="return false;">
|
||||||
|
<a href="#" onclick="IM.active.setFontSize(8);return false;">8</a>
|
||||||
|
<a href="#" onclick="IM.active.setFontSize(10);return false;">10</a>
|
||||||
|
<a href="#" onclick="IM.active.setFontSize(12);return false;">12</a>
|
||||||
|
<a href="#" onclick="IM.active.setFontSize(14);return false;">14</a>
|
||||||
|
<a href="#" onclick="IM.active.setFontSize(16);return false;">16</a>
|
||||||
|
<a href="#" onclick="IM.active.setFontSize(18);return false;">18</a>
|
||||||
|
<a href="#" onclick="IM.active.setFontSize(20);return false;">20</a>
|
||||||
|
<a href="#" onclick="IM.active.setFontSize(22);return false;">22</a>
|
||||||
|
<a href="#" onclick="IM.active.setFontSize(24);return false;">24</a>
|
||||||
|
</div>
|
||||||
|
<div class="itemList" id="fontColorList" style="cursor: pointer;">
|
||||||
|
<table class="tTable">
|
||||||
|
<tr>
|
||||||
|
<td class="colorItem" style="width:13px;height:13px;border:1px solid #000;background-color:#000000;" onclick="IM.active.setFontColor('#000000');"></td>
|
||||||
|
<td class="colorItem" style="width:13px;height:13px;border:1px solid #000;background-color:#b8b8b8;" onclick="IM.active.setFontColor('#b8b8b8');"></td>
|
||||||
|
<td class="colorItem" style="width:13px;height:13px;border:1px solid #000;background-color:#b4ad3b;" onclick="IM.active.setFontColor('#b4ad3b');"></td>
|
||||||
|
<td class="colorItem" style="width:13px;height:13px;border:1px solid #000;background-color:#bb5c54;" onclick="IM.active.setFontColor('#bb5c54');"></td>
|
||||||
|
<td class="colorItem" style="width:13px;height:13px;border:1px solid #000;background-color:#755a5c;" onclick="IM.active.setFontColor('#755a5c');"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="colorItem" style="width:13px;height:13px;border:1px solid #000;background-color:#a9b5ef;" onclick="IM.active.setFontColor('#a9b5ef');"></td>
|
||||||
|
<td class="colorItem" style="width:13px;height:13px;border:1px solid #000;background-color:#d65a20;" onclick="IM.active.setFontColor('#d65a20');"></td>
|
||||||
|
<td class="colorItem" style="width:13px;height:13px;border:1px solid #000;background-color:#e39230;" onclick="IM.active.setFontColor('#e39230');"></td>
|
||||||
|
<td class="colorItem" style="width:13px;height:13px;border:1px solid #000;background-color:#a71334;" onclick="IM.active.setFontColor('#a71334');"></td>
|
||||||
|
<td class="colorItem" style="width:13px;height:13px;border:1px solid #000;background-color:#590099;" onclick="IM.active.setFontColor('#590099');"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="colorItem" style="width:13px;height:13px;border:1px solid #000;background-color:#d40088;" onclick="IM.active.setFontColor('#d40088');"></td>
|
||||||
|
<td class="colorItem" style="width:13px;height:13px;border:1px solid #000;background-color:#0030ac;" onclick="IM.active.setFontColor('#0030ac');"></td>
|
||||||
|
<td class="colorItem" style="width:13px;height:13px;border:1px solid #000;background-color:#676f11;" onclick="IM.active.setFontColor('#676f11');"></td>
|
||||||
|
<td class="colorItem" style="width:13px;height:13px;border:1px solid #000;background-color:#769321;" onclick="IM.active.setFontColor('#769321');"></td>
|
||||||
|
<td class="colorItem" style="width:13px;height:13px;border:1px solid #000;background-color:#3966fe;" onclick="IM.active.setFontColor('#3966fe');"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="itemList" id="divContext" oncontextmenu="return false;">
|
||||||
|
<a href="#" class="lang-contextGetInfo" onclick="Context.profile();return false;"></a>
|
||||||
|
<a href="#" class="lang-contextIM" onclick="Context.createIM();return false;"></a>
|
||||||
|
<a href="#" id="contextBlock" class="lang-contextBlock" onclick="Context.blockBuddy();return false;"></a>
|
||||||
|
<a href="#" class="lang-contextRemove" onclick="Context.removeBuddy();return false;"></a>
|
||||||
|
</div>
|
||||||
|
<div id="languageList">
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,237 @@
|
|||||||
|
<?php
|
||||||
|
///////////////////////////////////
|
||||||
|
// ajax im 3.41 //
|
||||||
|
// AJAX Instant Messenger //
|
||||||
|
// Copyright (c) 2006-2008 //
|
||||||
|
// http://www.ajaxim.com/ //
|
||||||
|
// Do not remove this notice //
|
||||||
|
///////////////////////////////////
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||||
|
<title>ajax im - installation</title>
|
||||||
|
<style type="text/css" media="screen">
|
||||||
|
body {
|
||||||
|
background: #101010;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
font: 160px Arial, Verdana, Tahoma, sans-serif;
|
||||||
|
color: #fff;
|
||||||
|
margin: 0 auto 40px;
|
||||||
|
padding: 0;
|
||||||
|
text-align: center;
|
||||||
|
width: 80%;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
font: 28px tahoma, verdana, arial, sans-serif;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #84e03a;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0 0 10px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
div {
|
||||||
|
border: 2px solid #1d1d1d;
|
||||||
|
padding: 10px;
|
||||||
|
font: 12px Verdana, Tahoma, Arial, sans-serif;
|
||||||
|
width: 400px;
|
||||||
|
margin: 10px auto;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
label, input {
|
||||||
|
font: 14px Verdana, Tahoma, Arial, sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
label {
|
||||||
|
display: block;
|
||||||
|
width: 100px;
|
||||||
|
float: left;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
input {
|
||||||
|
border: 0;
|
||||||
|
padding: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
input#install {
|
||||||
|
display: block;
|
||||||
|
background-color: #101010;
|
||||||
|
color: #84e03a;
|
||||||
|
font: 32px Verdana, Tahoma, Arial, sans-serif;
|
||||||
|
margin: 0 auto;
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
input#username, input#password, input#email, label {
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
input#username {
|
||||||
|
clear: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.error {
|
||||||
|
color: #ff0000;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.success {
|
||||||
|
color: #84e03a;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<h1>ajax im</h1>
|
||||||
|
<?php
|
||||||
|
if(!$_GET['go']) {
|
||||||
|
?>
|
||||||
|
<div>
|
||||||
|
<h2>before you begin...</h2>
|
||||||
|
Did you remember to:
|
||||||
|
<ul>
|
||||||
|
<li>setup a database for ajax im?</li>
|
||||||
|
<li>edit <strong>config.php</strong> to match your MySQL configuration?</li>
|
||||||
|
<?php if ($maxBuddyIconSize > 0 && trim(substr(sprintf('%o', fileperms('./buddyicons/')), -4)) != 777) { echo '<li>CHMOD <strong>buddyicons/</strong> to 0777, it is at: '. substr(sprintf('%o', fileperms('./buddyicons/')), -4) .'?</li>'; } ?>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<form method="post" action="install.php?go=true">
|
||||||
|
<div>
|
||||||
|
<h2>first admin account</h2>
|
||||||
|
|
||||||
|
This will be the first account registered on ajax im. It will automatically be set to be an admin account.
|
||||||
|
|
||||||
|
<label id="username-label" for="username">username:</label> <input type="text" name="username" id="username" />
|
||||||
|
<label id="password-label" for="password">password:</label> <input type="password" name="password" id="password" />
|
||||||
|
<label id="email-label" for="password">email:</label> <input type="text" name="email" id="email" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<h2>ready?</h2>
|
||||||
|
|
||||||
|
<input type="submit" id="install" value="install!" />
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
<?php
|
||||||
|
} else {
|
||||||
|
?>
|
||||||
|
<div>
|
||||||
|
<h2>installing...</h2>
|
||||||
|
<?php
|
||||||
|
require 'config.php';
|
||||||
|
|
||||||
|
$link = mysql_connect($sql_host, $sql_user, $sql_pass);
|
||||||
|
mysql_select_db($sql_db);
|
||||||
|
|
||||||
|
$table_messages = 'CREATE TABLE `'.SQL_PREFIX.'messages` ( `recipient` text, `sender` text, `message` text, `type` text, `stamp` text, `id` bigint(20) unsigned NOT NULL auto_increment, UNIQUE KEY `id` (`id`) ) ;';
|
||||||
|
if(!mysql_query($table_messages)) {
|
||||||
|
if(mysql_errno() == 1050) {
|
||||||
|
print "Table '".SQL_PREFIX."messages' already exists! If you had a version of ajax im less than 3.2 installed on this database, please delete the table and then run this script again, otherwise ignore this error.<br /><br />\n";
|
||||||
|
$problem = true;
|
||||||
|
} else {
|
||||||
|
print("<b>A MySQL error occured:</b> (" . mysql_errno() . ") " . mysql_error() . "<br /><br />\n");
|
||||||
|
$error = true;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
mysql_query('ALTER TABLE `'.SQL_PREFIX.'messages` CHANGE `message` `message` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL');
|
||||||
|
print "Table '".SQL_PREFIX."messages' added successfully!<br /><br />\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
$table_users = 'CREATE TABLE `'.SQL_PREFIX.'users` ( `username` varchar(32), `password` varchar(32), `email` text, `is_online` int(11) default \'0\', `last_ping` text, `last_ip` varchar(15), `banned` tinyint(1) default \'0\', `admin` tinyint(1) default \'0\', `buddyicon` varchar(4) NOT NULL default \'none\', `profile` text, `id` bigint(20) unsigned NOT NULL auto_increment, UNIQUE KEY `id` (`id`), UNIQUE `username` (`username`) ) ;';
|
||||||
|
if(!mysql_query($table_users)) {
|
||||||
|
if(mysql_errno() == 1050) {
|
||||||
|
print "Table '".SQL_PREFIX."users' already exists! If you had a version of ajax im less than 3.2 installed on this database, please delete the table and then run this script again, otherwise ignore this error.<br /><br />\n";
|
||||||
|
} else {
|
||||||
|
print("<b>A MySQL error occured:</b> (" . mysql_errno() . ") " . mysql_error() . "<br /><br />\n");
|
||||||
|
$error = true;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
print "Table '".SQL_PREFIX."users' added successfully!<br /><br />\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
$table_chats = 'CREATE TABLE `'.SQL_PREFIX.'chats` ( `room` text, `user` text, `id` bigint(20) unsigned NOT NULL auto_increment, UNIQUE KEY `id` (`id`) ) ;';
|
||||||
|
if(!mysql_query($table_chats)) {
|
||||||
|
if(mysql_errno() == 1050) {
|
||||||
|
print "Table '".SQL_PREFIX."chats' already exists! If you had a version of ajax im less than 3.0 installed on this database, please delete the table and then run this script again, otherwise ignore this error.<br /><br />\n";
|
||||||
|
$problem = true;
|
||||||
|
} else {
|
||||||
|
print("<b>A MySQL error occured:</b> (" . mysql_errno() . ") " . mysql_error() . "<br /><br />\n");
|
||||||
|
$error = true;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
mysql_query('ALTER TABLE `'.SQL_PREFIX.'chats` CHANGE `room` `room` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL');
|
||||||
|
print "Table '".SQL_PREFIX."chats' added successfully!<br /><br />\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
$table_buddylists = 'CREATE TABLE `'.SQL_PREFIX.'buddylists` (`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY, `user` VARCHAR( 100 ) NOT NULL, `buddy` VARCHAR( 100 ) NOT NULL, `group` VARCHAR( 100 ) NOT NULL, INDEX ( `user` , `group` )) ENGINE = MYISAM ;';
|
||||||
|
if(!mysql_query($table_buddylists)) {
|
||||||
|
if(mysql_errno() == 1050) {
|
||||||
|
print "Table '".SQL_PREFIX."buddylists' already exists! If you had a version of ajax im less than 3.2 installed on this database, please delete the table and then run this script again, otherwise ignore this error.<br /><br />\n";
|
||||||
|
$problem = true;
|
||||||
|
} else {
|
||||||
|
print("<b>A MySQL error occured:</b> (" . mysql_errno() . ") " . mysql_error() . "<br /><br />\n");
|
||||||
|
$error = true;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
print "Table '".SQL_PREFIX."buddylists' added successfully!<br /><br />\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
$table_blocklists = 'CREATE TABLE `'.SQL_PREFIX.'blocklists` (`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY, `user` VARCHAR( 100 ) NOT NULL, `buddy` VARCHAR( 100 ) NOT NULL, INDEX ( `user` , `buddy` )) ENGINE = MYISAM ;';
|
||||||
|
if(!mysql_query($table_blocklists)) {
|
||||||
|
if(mysql_errno() == 1050) {
|
||||||
|
print "Table '".SQL_PREFIX."blocklists' already exists! If you had a version of ajax im less than 3.2 installed on this database, please delete the table and then run this script again, otherwise ignore this error.<br /><br />\n";
|
||||||
|
$problem = true;
|
||||||
|
} else {
|
||||||
|
print("<b>A MySQL error occured:</b> (" . mysql_errno() . ") " . mysql_error() . "<br /><br />\n");
|
||||||
|
$error = true;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
print "Table '".SQL_PREFIX."blocklists' added successfully!<br /><br />\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
$add_user = 'INSERT INTO `'.SQL_PREFIX.'users` (username, password, email, admin) VALUES (\'' . mysql_real_escape_string($_POST['username']) . '\', \'' . mysql_real_escape_string(md5($_POST['password'])) . '\', \'' . mysql_real_escape_string($_POST['email']) . '\', 1)';
|
||||||
|
if(!mysql_query($add_user)) {
|
||||||
|
print("<b>A MySQL error occured:</b> (" . mysql_errno() . ") " . mysql_error() . "<br /><br />\n");
|
||||||
|
print "Unable to add the first user! This likely means there was some other issue during installation.<br /><br />\n";
|
||||||
|
$error = true;
|
||||||
|
} else {
|
||||||
|
print "First/admin user registered!<br /><br />\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($maxBuddyIconSize > 0) {
|
||||||
|
if (trim(substr(sprintf('%o', fileperms('./buddyicons/')), -4)) != 777) {
|
||||||
|
$error = true;
|
||||||
|
print "<b>File permissions:</b>: <br/><br/>CHMOD buddyicons/ to 0777</b><br/><br/>";
|
||||||
|
} else {
|
||||||
|
print "You have change permissions of buddyicons/<br/><br/>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
mysql_close();
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="<?php if($error) print 'error'; else print 'success'; ?>">
|
||||||
|
<h2>status</h2>
|
||||||
|
<?php
|
||||||
|
if($error)
|
||||||
|
print 'There was an error while installing the script! Please refer to the messages above to solve your issue.';
|
||||||
|
else
|
||||||
|
print 'Congratulations! ajax im installed successfully! You can now login with your new admin account <a href="./">here</a>. Please be sure to delete install.php and update.php!';
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
///////////////////////////////////
|
||||||
|
// ajax im 3.4 //
|
||||||
|
// AJAX Instant Messenger //
|
||||||
|
// Copyright (c) 2006-2008 //
|
||||||
|
// http://www.ajaxim.com/ //
|
||||||
|
// Do not remove this notice //
|
||||||
|
///////////////////////////////////
|
||||||
|
|
||||||
|
The is_online.php script allows you to display a users status as an image. It is very simple to use.
|
||||||
|
|
||||||
|
To use:
|
||||||
|
1. Upload the is_online.php script and accompanying images folder to your server.
|
||||||
|
2. To display a user's status, insert this line anywhere:
|
||||||
|
<img src="[pathtoscript]/is_online.php?user=[username]" />
|
||||||
|
|
||||||
|
Replace [pathtoscript] with the path to the script and [username] with the username you want to display the status of.
|
||||||
|
Depois Largura: | Altura: | Tamanho: 829 B |
|
Depois Largura: | Altura: | Tamanho: 149 B |
|
Depois Largura: | Altura: | Tamanho: 149 B |
@@ -0,0 +1,41 @@
|
|||||||
|
<?php
|
||||||
|
///////////////////////////////////
|
||||||
|
// ajax im 3.4 //
|
||||||
|
// AJAX Instant Messenger //
|
||||||
|
// Copyright (c) 2006-2008 //
|
||||||
|
// http://www.ajaxim.com/ //
|
||||||
|
// Do not remove this notice //
|
||||||
|
///////////////////////////////////
|
||||||
|
|
||||||
|
require('../config.php');
|
||||||
|
|
||||||
|
// checks if a user is online or not //
|
||||||
|
function is_online($username) {
|
||||||
|
$query = @mysql_query("SELECT is_online FROM ".SQL_PREFIX."users WHERE username='".mysql_real_escape_string($username)."'");
|
||||||
|
$result = @mysql_fetch_assoc($query);
|
||||||
|
return $result['is_online'];
|
||||||
|
}
|
||||||
|
|
||||||
|
// connect to database //
|
||||||
|
$link = mysql_connect($sql_host, $sql_user, $sql_pass);
|
||||||
|
mysql_select_db($sql_db);
|
||||||
|
|
||||||
|
header("Content-type: image/gif");
|
||||||
|
|
||||||
|
$isonline = is_online($_GET['user']);
|
||||||
|
switch($isonline) {
|
||||||
|
case 1:
|
||||||
|
readfile('images/online.gif');
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
readfile('images/away.gif');
|
||||||
|
break;
|
||||||
|
case 0:
|
||||||
|
case 50:
|
||||||
|
case 100:
|
||||||
|
readfile('images/offline.gif');
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
mysql_close($link);
|
||||||
|
?>
|
||||||
@@ -0,0 +1,457 @@
|
|||||||
|
///////////////////////////////////
|
||||||
|
// ajax im 3.41 //
|
||||||
|
// AJAX Instant Messenger //
|
||||||
|
// Copyright (c) 2006-2008 //
|
||||||
|
// http://www.ajaxim.com/ //
|
||||||
|
// Do not remove this notice //
|
||||||
|
///////////////////////////////////
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Object to hold all Admin Windows as variables
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
var AdminWindows = {
|
||||||
|
/**
|
||||||
|
* Display window to allow admin to search for users
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
userSearch: function() {
|
||||||
|
var userSearchWin;
|
||||||
|
if($('admin-userSearch')) {
|
||||||
|
Windows.getWindow('admin-userSearch').toFront();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
userSearchWin = new Window({id: 'admin-userSearch', className: "dialog", width: 250, height: 110, resizable: true,
|
||||||
|
title: Languages.get('admin-admin') + ' - ' + Languages.get('admin-userSearch'), draggable: true, closable: true, maximizable: false, minimizable: true, detachable: false,
|
||||||
|
minWidth: 250, minHeight: 110, showEffectOptions: {duration: 0}, hideEffectOptions: {duration: 0}});
|
||||||
|
|
||||||
|
userSearchWin.setConstraint(true, {left: 0, right: 0, top: 0, bottom: 0});
|
||||||
|
|
||||||
|
userSearchWin.getContent().innerHTML = '<div class="dialog_info" style="padding:3px;">' + Languages.get('admin-chooseByAndSearch') + '</div> \
|
||||||
|
<div id="admin-userSearchBox"> \
|
||||||
|
<div style="display:block;float:left;margin-right:24px;padding:4px 0 0 5px;">' + Languages.get('admin-searchType') + ':</div> \
|
||||||
|
<select id="admin-searchType" name="adminSearchType" style="font-family:Tahoma,Verdana,Arial,sans-serif;"> \
|
||||||
|
<option selected="selected" value="username">' + Languages.get('username') + '</option> \
|
||||||
|
<option value="email">' + Languages.get('email') + '</option> \
|
||||||
|
</select><br /> \
|
||||||
|
<div style="display:block;float:left;margin-right:46px;padding:4px 0 0 5px;">' + Languages.get('search') + ':</div> \
|
||||||
|
<input type="text" id="admin-search" name="adminSearch" style="width:110px;" onkeypress="handleInput(event, function() { Admin.findUser($(\'admin-searchType\').value, $(\'admin-search\').value); })" /> \
|
||||||
|
<div id="admin-searchButtons">' +
|
||||||
|
ButtonCtl.create(Languages.get('search'), 'Admin.findUser($(\'admin-searchType\').value, $(\'admin-search\').value);') +
|
||||||
|
ButtonCtl.create(Languages.get('cancel'), 'Windows.close(\'admin-userSearch\');') +
|
||||||
|
'</div>';
|
||||||
|
|
||||||
|
$('admin-searchButtons').setStyle({position: 'absolute',
|
||||||
|
top: '105px',
|
||||||
|
left: '32px'});
|
||||||
|
|
||||||
|
userSearchWin.setDestroyOnClose();
|
||||||
|
userSearchWin.showCenter();
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* On admin window resize, fix elements within window
|
||||||
|
*
|
||||||
|
* @arguments
|
||||||
|
* win - window to be resized
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
handleResize: function(win) {
|
||||||
|
switch(win.getId().replace(/admin-/, '')) {
|
||||||
|
case 'userSearch':
|
||||||
|
if($('admin-userSearchResults')) {
|
||||||
|
$('admin-userSearchResults').setStyle({'width': win.getSize()['width'] + 'px'});
|
||||||
|
$('admin-userSearchResults').parentNode.setStyle({'width': win.getSize()['width'] + 'px'});
|
||||||
|
$('admin-userExecFunctions').setStyle({'left': ((win.getSize()['width'] - $('admin-userExecFunctions').getWidth()) / 2) + 'px'});
|
||||||
|
}
|
||||||
|
|
||||||
|
$('admin-searchButtons').setStyle({'left': ((win.getSize()['width'] - $('admin-searchButtons').getWidth()) / 2) + 'px'});
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handle all Admin requests
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
var Admin = {
|
||||||
|
// current selected user from the user-search-results list
|
||||||
|
selectedUser: null,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Finds and displays users searched for by the admin
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
* @update Benjamin Hutchins
|
||||||
|
* - User's email be displayed.
|
||||||
|
**/
|
||||||
|
findUser: function(searchType, search) {
|
||||||
|
var xhConn = new XHConn();
|
||||||
|
|
||||||
|
xhConn.connect(adminPingTo, "POST", "call=search&by="+searchType+"&for="+search, function(xh) {
|
||||||
|
if(xh.responseText == 'access_denied') return Admin.noAccess();
|
||||||
|
|
||||||
|
if($('admin-userSearchResults'))
|
||||||
|
$('admin-userSearchResults').parentNode.parentNode.removeChild($('admin-userSearchResults').parentNode);
|
||||||
|
|
||||||
|
var results = xh.responseText.parseJSON();
|
||||||
|
var resultsTable = '<table id="admin-userSearchResults" style="text-align:center;" class="listNotSelected">';
|
||||||
|
resultsTable += '<thead><tr style="cursor:pointer;"><th>' + Languages.get('username') + '</th><th>' + Languages.get('email') + '</th><th>' + Languages.get('admin-lastKnownIP') + '</th><th>' + Languages.get('admin-lastActive') + '</th><th>' + Languages.get('admin-status') + '</th><th>' + Languages.get('admin-banned') + '</th><th>' + Languages.get('admin-admin') + '</th></tr></thead><tbody>';
|
||||||
|
|
||||||
|
for(var i=0; i<results.length; i++) {
|
||||||
|
var lastActiveObj = new Date(results[i].lastActive*1000);
|
||||||
|
var lastActive = lastActiveObj.getMonth() + '/' + lastActiveObj.getDate() + '/' + lastActiveObj.getFullYear() + ' @ ' + lastActiveObj.getHours() + ':' + lastActiveObj.getMinutes();
|
||||||
|
|
||||||
|
resultsTable += '<tr style="cursor:pointer;" onmouseover="Admin.findUserListHover(this);" onmouseout="Admin.findUserListDefault(this);" onclick="Admin.findUserListSelect(this);">' +
|
||||||
|
'<td>' + results[i].username + '</td><td>' + results[i].email + '</td><td>' + results[i].lastKnownIP + '</td>' +
|
||||||
|
'<td>' + lastActive + '</td>' + '<td>' + results[i].currentStatus + '</td><td>' + results[i].banned + '</td>' +
|
||||||
|
'<td>' + results[i].admin + '</td></tr>';
|
||||||
|
}
|
||||||
|
resultsTable += '</tbody></table>';
|
||||||
|
|
||||||
|
var userSearch = Windows.getWindow('admin-userSearch')
|
||||||
|
userSearch.setSize(500, 232);
|
||||||
|
userSearch.options.minWidth = 500;
|
||||||
|
userSearch.options.minHeight = 232;
|
||||||
|
userSearch.showCenter(false);
|
||||||
|
userSearch.getContent().innerHTML += resultsTable;
|
||||||
|
|
||||||
|
if(!$('admin-userExecFunctions')) {
|
||||||
|
userSearch.getContent().innerHTML += '<div id="admin-userExecFunctions">' +
|
||||||
|
ButtonCtl.create(Languages.get('admin-kick'), 'Admin.kickUser(Admin.selectedUser.getElementsByTagName(\'td\')[0].innerHTML);') +
|
||||||
|
ButtonCtl.create(Languages.get('admin-ban'), 'Admin.banUser(Admin.selectedUser.getElementsByTagName(\'td\')[0].innerHTML);', 'admin-banButton') +
|
||||||
|
ButtonCtl.create(Languages.get('admin-makeAdmin'), 'Admin.toggleAdmin(Admin.selectedUser.getElementsByTagName(\'td\')[0].innerHTML);', 'admin-makeAdminButton') +
|
||||||
|
'</div>';
|
||||||
|
|
||||||
|
$('admin-userExecFunctions').setStyle({position: 'absolute',
|
||||||
|
top: '195px',
|
||||||
|
left: '83px'});
|
||||||
|
}
|
||||||
|
|
||||||
|
$('admin-searchButtons').innerHTML = ButtonCtl.create(Languages.get('searchAgain'), 'Admin.findUser($(\'admin-searchType\').value, $(\'admin-search\').value);') +
|
||||||
|
ButtonCtl.create(Languages.get('cancel'), 'Windows.close(\'admin-userSearch\');');
|
||||||
|
|
||||||
|
|
||||||
|
$('admin-searchButtons').setStyle({position: 'absolute',
|
||||||
|
top: '225px',
|
||||||
|
left: '130px'});
|
||||||
|
|
||||||
|
var t = new ScrollableTable($('admin-userSearchResults'), 100, 500);
|
||||||
|
t = new SortableTable($('admin-userSearchResults'));
|
||||||
|
|
||||||
|
$('admin-searchType').value = searchType;
|
||||||
|
$('admin-search').value = search;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sends request to server to ban user
|
||||||
|
*
|
||||||
|
* @arguments
|
||||||
|
* user - user to be banned
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
banUser: function(user) {
|
||||||
|
var xhConn = new XHConn();
|
||||||
|
|
||||||
|
xhConn.connect(adminPingTo, "POST", "call=ban&user="+user, function(xh) {
|
||||||
|
if(xh.responseText == 'access_denied') return Admin.noAccess();
|
||||||
|
|
||||||
|
Admin.selectedUser.getElementsByTagName('td')[4].innerHTML = xh.responseText;
|
||||||
|
$('admin-banButton').innerHTML = (xh.responseText=='true'?Languages.get('admin-unban'):Languages.get('admin-ban'));
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sends request to server to kick a user offline
|
||||||
|
*
|
||||||
|
* @arguments
|
||||||
|
* user - user to be kicked
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
kickUser: function(user) {
|
||||||
|
var xhConn = new XHConn();
|
||||||
|
|
||||||
|
xhConn.connect(adminPingTo, "POST", "call=kick&user="+user, function(xh) {
|
||||||
|
if(xh.responseText == 'access_denied') return Admin.noAccess();
|
||||||
|
|
||||||
|
Admin.selectedUser.getElementsByTagName('td')[3].innerHTML = '0';
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Toggles a user's admin rights
|
||||||
|
*
|
||||||
|
* @arguments
|
||||||
|
* user - user to be toggled
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
toggleAdmin: function(user) {
|
||||||
|
var xhConn = new XHConn();
|
||||||
|
|
||||||
|
xhConn.connect(adminPingTo, "POST", "call=admin&user="+user, function(xh) {
|
||||||
|
if(xh.responseText == 'access_denied') return Admin.noAccess();
|
||||||
|
|
||||||
|
Admin.selectedUser.getElementsByTagName('td')[5].innerHTML = xh.responseText;
|
||||||
|
$('admin-makeAdminButton').innerHTML = (xh.responseText=='true'?Languages.get('admin-removeAdmin'):Languages.get('admin-makeAdmin'));
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add hover effect to an element
|
||||||
|
*
|
||||||
|
* @arguments
|
||||||
|
* el - element to have effect added
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
findUserListHover: function(el) {
|
||||||
|
Element.addClassName(el, 'listHover').removeClassName('listSelected').removeClassName('listNotSelected');
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove hover effect added by Admin.findUserListHover
|
||||||
|
*
|
||||||
|
* @arguments
|
||||||
|
* el - element to have effect removed
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
findUserListDefault: function(el) {
|
||||||
|
if(el != Admin.selectedUser) Element.addClassName(el, 'listNotSelected').removeClassName('listSelected').removeClassName('listHover');
|
||||||
|
else Element.addClassName(el, 'listSelected').removeClassName('listNotSelected').removeClassName('listHover');
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Change Admin.selectedUser to the user clicked by the admin
|
||||||
|
*
|
||||||
|
* @arguments
|
||||||
|
* el - list element to turn into selected
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
findUserListSelect: function(el) {
|
||||||
|
if(Admin.selectedUser) Element.addClassName(Admin.selectedUser, 'listNotSelected').removeClassName('listSelected').removeClassName('listHover');
|
||||||
|
Element.addClassName(el, 'listSelected').removeClassName('listNotSelected').removeClassName('listHover');
|
||||||
|
Admin.selectedUser = el;
|
||||||
|
|
||||||
|
if(el.getElementsByTagName('td')[4].innerHTML == 'true')
|
||||||
|
$('admin-banButton').innerHTML = Languages.get('admin-unban');
|
||||||
|
else
|
||||||
|
$('admin-banButton').innerHTML = Languages.get('admin-ban');
|
||||||
|
|
||||||
|
if(el.getElementsByTagName('td')[5].innerHTML == 'true')
|
||||||
|
$('admin-makeAdminButton').innerHTML = Languages.get('admin-removeAdmin');
|
||||||
|
else
|
||||||
|
$('admin-makeAdminButton').innerHTML = Languages.get('admin-makeAdmin');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Scrollable HTML table
|
||||||
|
* http://www.webtoolkit.info/
|
||||||
|
*
|
||||||
|
**/
|
||||||
|
function ScrollableTable (tableEl, tableHeight, tableWidth) {
|
||||||
|
|
||||||
|
this.initIEengine = function () {
|
||||||
|
|
||||||
|
this.containerEl.style.overflowY = 'auto';
|
||||||
|
if (this.tableEl.parentElement.clientHeight - this.tableEl.offsetHeight < 0) {
|
||||||
|
this.tableEl.style.width = this.newWidth - this.scrollWidth +'px';
|
||||||
|
} else {
|
||||||
|
this.containerEl.style.overflowY = 'hidden';
|
||||||
|
this.tableEl.style.width = this.newWidth +'px';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.thead) {
|
||||||
|
var trs = this.thead.getElementsByTagName('tr');
|
||||||
|
for (x=0; x<trs.length; x++) {
|
||||||
|
trs[x].style.position ='relative';
|
||||||
|
trs[x].style.setExpression("top", "this.parentElement.parentElement.parentElement.scrollTop + 'px'");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.tfoot) {
|
||||||
|
var trs = this.tfoot.getElementsByTagName('tr');
|
||||||
|
for (x=0; x<trs.length; x++) {
|
||||||
|
trs[x].style.position ='relative';
|
||||||
|
trs[x].style.setExpression("bottom", "(this.parentElement.parentElement.offsetHeight - this.parentElement.parentElement.parentElement.clientHeight - this.parentElement.parentElement.parentElement.scrollTop) + 'px'");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
eval("window.attachEvent('onresize', function () { document.getElementById('" + this.tableEl.id + "').style.visibility = 'hidden'; document.getElementById('" + this.tableEl.id + "').style.visibility = 'visible'; } )");
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
this.initFFengine = function () {
|
||||||
|
this.containerEl.style.overflow = 'hidden';
|
||||||
|
this.tableEl.style.width = this.newWidth + 'px';
|
||||||
|
|
||||||
|
var headHeight = (this.thead) ? this.thead.clientHeight : 0;
|
||||||
|
var footHeight = (this.tfoot) ? this.tfoot.clientHeight : 0;
|
||||||
|
var bodyHeight = this.tbody.clientHeight;
|
||||||
|
var trs = this.tbody.getElementsByTagName('tr');
|
||||||
|
if (bodyHeight >= (this.newHeight - (headHeight + footHeight))) {
|
||||||
|
this.tbody.style.overflow = '-moz-scrollbars-vertical';
|
||||||
|
for (x=0; x<trs.length; x++) {
|
||||||
|
var tds = trs[x].getElementsByTagName('td');
|
||||||
|
tds[tds.length-1].style.paddingRight += this.scrollWidth + 'px';
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.tbody.style.overflow = '-moz-scrollbars-none';
|
||||||
|
}
|
||||||
|
|
||||||
|
var cellSpacing = (this.tableEl.offsetHeight - (this.tbody.clientHeight + headHeight + footHeight)) / 4;
|
||||||
|
this.tbody.style.height = (this.newHeight - (headHeight + cellSpacing * 2) - (footHeight + cellSpacing * 2)) + 'px';
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
this.tableEl = tableEl;
|
||||||
|
this.scrollWidth = 16;
|
||||||
|
|
||||||
|
this.originalHeight = this.tableEl.clientHeight;
|
||||||
|
this.originalWidth = this.tableEl.clientWidth;
|
||||||
|
|
||||||
|
this.newHeight = parseInt(tableHeight);
|
||||||
|
this.newWidth = tableWidth ? parseInt(tableWidth) : this.originalWidth;
|
||||||
|
|
||||||
|
this.tableEl.style.height = 'auto';
|
||||||
|
this.tableEl.removeAttribute('height');
|
||||||
|
|
||||||
|
this.containerEl = this.tableEl.parentNode.insertBefore(document.createElement('div'), this.tableEl);
|
||||||
|
this.containerEl.appendChild(this.tableEl);
|
||||||
|
this.containerEl.style.height = this.newHeight + 'px';
|
||||||
|
this.containerEl.style.width = this.newWidth + 'px';
|
||||||
|
|
||||||
|
|
||||||
|
var thead = this.tableEl.getElementsByTagName('thead');
|
||||||
|
this.thead = (thead[0]) ? thead[0] : null;
|
||||||
|
|
||||||
|
var tfoot = this.tableEl.getElementsByTagName('tfoot');
|
||||||
|
this.tfoot = (tfoot[0]) ? tfoot[0] : null;
|
||||||
|
|
||||||
|
var tbody = this.tableEl.getElementsByTagName('tbody');
|
||||||
|
this.tbody = (tbody[0]) ? tbody[0] : null;
|
||||||
|
|
||||||
|
if (!this.tbody) return;
|
||||||
|
|
||||||
|
if (document.all && document.getElementById && !window.opera) this.initIEengine();
|
||||||
|
if (!document.all && document.getElementById && !window.opera) this.initFFengine();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Sortable HTML table
|
||||||
|
* http://www.webtoolkit.info/
|
||||||
|
*
|
||||||
|
**/
|
||||||
|
function SortableTable (tableEl) {
|
||||||
|
|
||||||
|
this.tbody = tableEl.getElementsByTagName('tbody');
|
||||||
|
this.thead = tableEl.getElementsByTagName('thead');
|
||||||
|
this.tfoot = tableEl.getElementsByTagName('tfoot');
|
||||||
|
|
||||||
|
this.getInnerText = function (el) {
|
||||||
|
if (typeof(el.textContent) != 'undefined') return el.textContent;
|
||||||
|
if (typeof(el.innerText) != 'undefined') return el.innerText;
|
||||||
|
if (typeof(el.innerHTML) == 'string') return el.innerHTML.replace(/<[^<>]+>/g,'');
|
||||||
|
}
|
||||||
|
|
||||||
|
this.getParent = function (el, pTagName) {
|
||||||
|
if (el == null) return null;
|
||||||
|
else if (el.nodeType == 1 && el.tagName.toLowerCase() == pTagName.toLowerCase())
|
||||||
|
return el;
|
||||||
|
else
|
||||||
|
return this.getParent(el.parentNode, pTagName);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.sort = function (cell) {
|
||||||
|
|
||||||
|
var column = cell.cellIndex;
|
||||||
|
var itm = this.getInnerText(this.tbody[0].rows[1].cells[column]);
|
||||||
|
var sortfn = this.sortCaseInsensitive;
|
||||||
|
|
||||||
|
if (itm.match(/\d\d[-]+\d\d[-]+\d\d\d\d/)) sortfn = this.sortDate; // date format mm-dd-yyyy
|
||||||
|
if (itm.replace(/^\s+|\s+$/g,"").match(/^[\d\.]+$/)) sortfn = this.sortNumeric;
|
||||||
|
|
||||||
|
this.sortColumnIndex = column;
|
||||||
|
|
||||||
|
var newRows = new Array();
|
||||||
|
for (j = 0; j < this.tbody[0].rows.length; j++) {
|
||||||
|
newRows[j] = this.tbody[0].rows[j];
|
||||||
|
}
|
||||||
|
|
||||||
|
newRows.sort(sortfn);
|
||||||
|
|
||||||
|
if (cell.getAttribute("sortdir") == 'down') {
|
||||||
|
newRows.reverse();
|
||||||
|
cell.setAttribute('sortdir','up');
|
||||||
|
} else {
|
||||||
|
cell.setAttribute('sortdir','down');
|
||||||
|
}
|
||||||
|
|
||||||
|
for (i=0;i<newRows.length;i++) {
|
||||||
|
this.tbody[0].appendChild(newRows[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
this.sortCaseInsensitive = function(a,b) {
|
||||||
|
aa = thisObject.getInnerText(a.cells[thisObject.sortColumnIndex]).toLowerCase();
|
||||||
|
bb = thisObject.getInnerText(b.cells[thisObject.sortColumnIndex]).toLowerCase();
|
||||||
|
if (aa==bb) return 0;
|
||||||
|
if (aa<bb) return -1;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.sortDate = function(a,b) {
|
||||||
|
aa = thisObject.getInnerText(a.cells[thisObject.sortColumnIndex]);
|
||||||
|
bb = thisObject.getInnerText(b.cells[thisObject.sortColumnIndex]);
|
||||||
|
date1 = aa.substr(6,4)+aa.substr(3,2)+aa.substr(0,2);
|
||||||
|
date2 = bb.substr(6,4)+bb.substr(3,2)+bb.substr(0,2);
|
||||||
|
if (date1==date2) return 0;
|
||||||
|
if (date1<date2) return -1;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.sortNumeric = function(a,b) {
|
||||||
|
aa = parseFloat(thisObject.getInnerText(a.cells[thisObject.sortColumnIndex]));
|
||||||
|
if (isNaN(aa)) aa = 0;
|
||||||
|
bb = parseFloat(thisObject.getInnerText(b.cells[thisObject.sortColumnIndex]));
|
||||||
|
if (isNaN(bb)) bb = 0;
|
||||||
|
return aa-bb;
|
||||||
|
}
|
||||||
|
|
||||||
|
// define variables
|
||||||
|
var thisObject = this;
|
||||||
|
var sortSection = this.thead;
|
||||||
|
|
||||||
|
// constructor actions
|
||||||
|
if (!(this.tbody && this.tbody[0].rows && this.tbody[0].rows.length > 0)) return;
|
||||||
|
|
||||||
|
if (sortSection && sortSection[0].rows && sortSection[0].rows.length > 0) {
|
||||||
|
var sortRow = sortSection[0].rows[0];
|
||||||
|
} else {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (var i=0; i<sortRow.cells.length; i++) {
|
||||||
|
sortRow.cells[i].sTable = this;
|
||||||
|
sortRow.cells[i].onclick = function () {
|
||||||
|
this.sTable.sort(this);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,479 @@
|
|||||||
|
///////////////////////////////////
|
||||||
|
// ajax im 3.41 //
|
||||||
|
// AJAX Instant Messenger //
|
||||||
|
// Copyright (c) 2006-2008 //
|
||||||
|
// http://www.ajaxim.com/ //
|
||||||
|
// Do not remove this notice //
|
||||||
|
///////////////////////////////////
|
||||||
|
|
||||||
|
// See config.js for configuration options //
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Global variables used through the script
|
||||||
|
**/
|
||||||
|
var user='';
|
||||||
|
var pass='';
|
||||||
|
var curSelected='';
|
||||||
|
var loggedIn=false;
|
||||||
|
var titlebarBlinker=false;
|
||||||
|
var defaultTitle = document.title=(siteName.length>0?siteName:document.title);
|
||||||
|
var blinkerTimer;
|
||||||
|
var pingTimer;
|
||||||
|
var newWin, newWinRcvd;
|
||||||
|
var windowButtons;
|
||||||
|
var smilies = [];
|
||||||
|
var soundManager;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Before the window is 'unloaded', confirm the user wants to leave
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
window.onbeforeunload = function(event) {
|
||||||
|
event = event || window.event;
|
||||||
|
if(event && loggedIn) {
|
||||||
|
var text = Languages.get('onunload');
|
||||||
|
event.returnValue = text;
|
||||||
|
window.onbeforeunload = function() { };
|
||||||
|
return text;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* After all content and images for the web page is loaded,
|
||||||
|
* run some functions
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
window.onload = function() {
|
||||||
|
Windows.addObserver({ onResize: IM.handleResize });
|
||||||
|
Windows.addObserver({ onClose: IM.handleClose });
|
||||||
|
Windows.addObserver({ onMaximize: IM.handleResize });
|
||||||
|
Windows.addObserver({ onMinimize: IM.handleMinimize });
|
||||||
|
|
||||||
|
// initialize the sound manager
|
||||||
|
soundManager = new SoundManager();
|
||||||
|
soundManager.onload = function() {
|
||||||
|
soundManager.createSound({id: 'msg_in', url: './sounds/msg_in.mp3', autoLoad: true});
|
||||||
|
soundManager.createSound({id: 'msg_out', url: './sounds/msg_out.mp3', autoLoad: true});
|
||||||
|
soundManager.play('msg_out');
|
||||||
|
};
|
||||||
|
soundManager.beginDelayedInit();
|
||||||
|
|
||||||
|
// attach event
|
||||||
|
// before window is unloaded, remove sound manager
|
||||||
|
Element.observe(window, 'beforeunload', soundManager.destruct);
|
||||||
|
|
||||||
|
// center modal
|
||||||
|
setTimeout(function() { recenterModal(null); }, 1000);
|
||||||
|
|
||||||
|
// on window resize, recenter modal
|
||||||
|
Event.observe(window, 'resize', recenterModal);
|
||||||
|
|
||||||
|
// on window unload, logout the user
|
||||||
|
Event.observe(window, 'unload', function() { if(loggedIn) System.logout(); });
|
||||||
|
|
||||||
|
// clear all inputs
|
||||||
|
clearInputs();
|
||||||
|
|
||||||
|
// replace status images with theme-based images
|
||||||
|
$('statusList').getElementsBySelector('img').each(function(el) {
|
||||||
|
el.src = el.src.replace(/images/g, 'themes/' + theme);
|
||||||
|
});
|
||||||
|
|
||||||
|
// initialize Context Menus
|
||||||
|
Context.loaded();
|
||||||
|
|
||||||
|
// hook mousedown for status list
|
||||||
|
var dOMD = (document.onmousedown ? document.onmousedown : new Function());
|
||||||
|
document.onmousedown = window.onmousedown = function(e) {
|
||||||
|
showHide(e);
|
||||||
|
dOMD(e);
|
||||||
|
}
|
||||||
|
|
||||||
|
// if the user wants to disable register, hide the button
|
||||||
|
if (!allowNewUsers) {
|
||||||
|
$$('.registerObject').each(function(el) {
|
||||||
|
el.remove();
|
||||||
|
});
|
||||||
|
// then fix the buttons for login
|
||||||
|
$('login_dialog_links').setStyle({width:'190px'});
|
||||||
|
}
|
||||||
|
|
||||||
|
// show login
|
||||||
|
Dialogs.login();
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* After all content for the web page is loaded,
|
||||||
|
* load some more stuff.
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
Event.onReady(function() {
|
||||||
|
var getEmoteHTML = new XHConn();
|
||||||
|
getEmoteHTML.connect('themes/' + theme +'/emoticons/emoticons.html', 'GET', '', function(xh) {
|
||||||
|
document.body.innerHTML += xh.responseText;
|
||||||
|
|
||||||
|
var getEmoteJS = new XHConn();
|
||||||
|
getEmoteJS.connect('themes/' + theme +'/emoticons/emoticons.js', 'GET', '', function(xh) {
|
||||||
|
window.smilies = xh.responseText.parseJSON();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// load language file
|
||||||
|
var s = document.createElement('script');
|
||||||
|
s.src = 'languages/' + languageOptions[0][0] + '/lang.js?' + (new Date()).getTime();
|
||||||
|
s.type = 'text/javascript';
|
||||||
|
document.getElementsByTagName('head').item(0).appendChild(s);
|
||||||
|
|
||||||
|
// if lingo is enabled
|
||||||
|
if (useLingo) {
|
||||||
|
// load the lingo file
|
||||||
|
var l = document.createElement('script');
|
||||||
|
l.src = 'languages/' + languageOptions[0][0] + '/lingo.js?' + (new Date()).getTime();
|
||||||
|
l.type = 'text/javascript';
|
||||||
|
document.getElementsByTagName('head').item(0).appendChild(l);
|
||||||
|
}
|
||||||
|
|
||||||
|
// if there is more than one language installed on the server, show them as options
|
||||||
|
if(languageOptions.length > 1) {
|
||||||
|
for(var i=0; i<languageOptions.length; i++)
|
||||||
|
$('languageList').innerHTML += '<a href="#" onclick="Languages.load(\'' + languageOptions[i][0] + '\');return false;">' + languageOptions[i][1] + '</a> | ';
|
||||||
|
|
||||||
|
$('languageList').innerHTML = $('languageList').innerHTML.substring(0, $('languageList').innerHTML.length - 3);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clear the value of input elements
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
function clearInputs() {
|
||||||
|
var formInputs = document.getElementsByTagName('input');
|
||||||
|
for (var i=0; i<formInputs.length; i++)
|
||||||
|
if(formInputs[i].type == 'text' || formInputs[i].type == 'password') formInputs[i].value = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Centers the login/register/forgot password modal
|
||||||
|
*
|
||||||
|
* @arguments
|
||||||
|
* event - passed by browser
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
function recenterModal(event) {
|
||||||
|
var windowScroll = WindowUtilities.getWindowScroll();
|
||||||
|
var pageSize = WindowUtilities.getPageSize();
|
||||||
|
|
||||||
|
var top = (pageSize.windowHeight - $('modal').getHeight())/2;
|
||||||
|
top += windowScroll.top;
|
||||||
|
|
||||||
|
var left = (pageSize.windowWidth - $('modal').getWidth())/2;
|
||||||
|
left += windowScroll.left;
|
||||||
|
|
||||||
|
$('modal').setStyle({top: top + 'px', left: left + 'px', display: 'block'});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function is ran everytime the mouse is clicked
|
||||||
|
*
|
||||||
|
* @arguments
|
||||||
|
* event - passed by browser
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
* @update Benjamin Hutchins
|
||||||
|
**/
|
||||||
|
function showHide(event) {
|
||||||
|
var target;
|
||||||
|
event = event || window.event;
|
||||||
|
if (document.all) {
|
||||||
|
target = event.srcElement;
|
||||||
|
} else {
|
||||||
|
target = event.target;
|
||||||
|
}
|
||||||
|
if (!target) {return;}
|
||||||
|
if (loggedIn &&
|
||||||
|
target.id != 'statusList' &&
|
||||||
|
target.id != 'fontsList' &&
|
||||||
|
target.id != 'statusSettings' &&
|
||||||
|
target.id != 'curStatus' &&
|
||||||
|
target.parentNode.id != 'statusList' &&
|
||||||
|
target.parentNode.id != 'fontsList' &&
|
||||||
|
target.id != 'customMessage' &&
|
||||||
|
target.parentNode.id != 'customMessage' &&
|
||||||
|
target.id != 'emoticonList' &&
|
||||||
|
target.className != 'emotIcon' &&
|
||||||
|
target.id != 'fontSizeList' &&
|
||||||
|
target.parentNode.id != 'fontSizeList' &&
|
||||||
|
target.id != 'fontColorList' &&
|
||||||
|
target.className != 'colorItem' &&
|
||||||
|
target.className != 'tTable'
|
||||||
|
) // to put it simply, if you did not click on a list
|
||||||
|
{
|
||||||
|
Element.setStyle($('statusList'), {'display': 'none'});
|
||||||
|
Element.setStyle($('emoticonList'), {'display': 'none'});
|
||||||
|
Element.setStyle($('fontsList'), {'display': 'none'});
|
||||||
|
Element.setStyle($('fontSizeList'), {'display': 'none'});
|
||||||
|
Element.setStyle($('fontColorList'), {'display': 'none'});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Will check for the press of the 'Return'/'Enter' key,
|
||||||
|
* if found, func() is ran. If it is not, then func2, if supplied,
|
||||||
|
* and if it is a function, is ran.
|
||||||
|
*
|
||||||
|
* @arguments
|
||||||
|
* event - supplied by browser
|
||||||
|
* func - (function) run if Enter is pressed
|
||||||
|
* func2 - (function) run if Enter is not pressed
|
||||||
|
*
|
||||||
|
* @author Benjamin Hutchins
|
||||||
|
**/
|
||||||
|
function handleInput(event, func, func2) {
|
||||||
|
event = event || event.window;
|
||||||
|
var asc = document.all ? event.keyCode : event.which;
|
||||||
|
|
||||||
|
if(asc == 13) {
|
||||||
|
func();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (typeof func2 == 'function')
|
||||||
|
func2();
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Will run through passed variable 'text' and fix
|
||||||
|
* it's regExpression faults.
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
* @return fromatted 'text'
|
||||||
|
**/
|
||||||
|
function regExpEscape(text) {
|
||||||
|
if (!arguments.callee.sRE) {
|
||||||
|
var specials = [
|
||||||
|
'/', '.', '*', '+', '?', '|',
|
||||||
|
'(', ')', '[', ']', '{', '}', '\\'
|
||||||
|
];
|
||||||
|
arguments.callee.sRE = new RegExp(
|
||||||
|
'(\\' + specials.join('|\\') + ')', 'g'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return text.replace(arguments.callee.sRE, '\\$1');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Wrapper to scroll down within an element
|
||||||
|
*
|
||||||
|
* @arguments
|
||||||
|
* id - element to scroll down within
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
function scrollToBottom(id) {
|
||||||
|
$(id).scrollTop = $(id).scrollHeight - $(id).clientHeight;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Strip out whitespace on then sides of 'text'
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
* @return trimmed 'text'
|
||||||
|
**/
|
||||||
|
function trim(text) {
|
||||||
|
if(text == null) return null;
|
||||||
|
return text.replace(/^[ \t]+|[ \t]+$/g, "");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Toggle audio on and off
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
function toggleAudio() {
|
||||||
|
if(audioNotify == true) {
|
||||||
|
audioNotify = false;
|
||||||
|
$('toggleaudio').src = 'themes/'+theme+'/window/audio_off.png';
|
||||||
|
} else {
|
||||||
|
audioNotify = true;
|
||||||
|
$('toggleaudio').src = 'themes/'+theme+'/window/audio_on.png';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Make a window title and the web page "blink"
|
||||||
|
*
|
||||||
|
* @arguments
|
||||||
|
* name - username to retrieve IM Window
|
||||||
|
* message - message to show 'nlinking'
|
||||||
|
* alter - which step of blinking are we in
|
||||||
|
* chatroom - is this a chatroom
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
function titlebarBlink(name, message, alter, chatroom) {
|
||||||
|
if(titlebarBlinker == false) {
|
||||||
|
document.title = defaultTitle;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(chatroom == 0 && IM.windows[name].detached) {
|
||||||
|
IM.windows[name].popup.titlebarBlink(name, message, alter);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(alter == 0) {
|
||||||
|
document.title = name + '!';
|
||||||
|
blinkerTimer = setTimeout("titlebarBlink('"+name+"', '"+message+"', 1, "+chatroom+")", 1000);
|
||||||
|
} else if(alter == 1) {
|
||||||
|
document.title = '"' + message.substring(0, 10) + (message.length > 10 ? '...' : '') + '"';
|
||||||
|
blinkerTimer = setTimeout("titlebarBlink('"+name+"', '"+message+"', 2, "+chatroom+")", 1000);
|
||||||
|
} else if(alter == 2) {
|
||||||
|
document.title = defaultTitle;
|
||||||
|
blinkerTimer = setTimeout("titlebarBlink('"+name+"', '"+message+"', 0, "+chatroom+")", 1000);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Toggle the variable 'titlebarBlinker' to true/false
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
* @update Benjamin Hutchins
|
||||||
|
**/
|
||||||
|
function blinkerOn(onoff) {
|
||||||
|
titlebarBlinker = (onoff == true ? true : false);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Button effects for browsers without ":" support
|
||||||
|
*
|
||||||
|
* @arguments
|
||||||
|
* el - element to affect
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
function buttonHover(el) {
|
||||||
|
var newsrc = el.src;
|
||||||
|
newsrc = newsrc.replace(/_hover/, '');
|
||||||
|
el.src = newsrc.replace(/\.png/, '_hover.png');
|
||||||
|
}
|
||||||
|
function buttonDown(el) {
|
||||||
|
el.src = el.src.replace(/_hover\.png/, '_down.png');
|
||||||
|
}
|
||||||
|
function buttonNormal(el) {
|
||||||
|
el.src = el.src.replace(/\_hover.png/, '.png').replace(/\_down.png/, '.png');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check to see is an email is valid
|
||||||
|
*
|
||||||
|
* @arguments
|
||||||
|
* email - email to check
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
* @updated Benjamin Hutchins
|
||||||
|
* @return true if email is valid, false otherwise
|
||||||
|
**/
|
||||||
|
function checkEmailAddr(email) {
|
||||||
|
var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
|
||||||
|
return filter.test(email);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generates a random string
|
||||||
|
*
|
||||||
|
* @arguments
|
||||||
|
* length - length of string to be created
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
* @return random string
|
||||||
|
**/
|
||||||
|
function randomString(length) {
|
||||||
|
var chars = "abcdefghijklmnopqrstuvwxyz1234567890";
|
||||||
|
var pass = "";
|
||||||
|
var charLength = chars.length;
|
||||||
|
|
||||||
|
for(x=0;x<length;x++) {
|
||||||
|
i = Math.floor(Math.random() * charLength);
|
||||||
|
pass += chars.charAt(i);
|
||||||
|
}
|
||||||
|
|
||||||
|
return pass;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* in_array for javascript
|
||||||
|
*
|
||||||
|
* @arguments
|
||||||
|
* arr - array to be searched
|
||||||
|
* value - item to search for
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
* @return true if 'value' is found in 'arr', false if it is not.
|
||||||
|
**/
|
||||||
|
function inArray(arr, value) {
|
||||||
|
var i;
|
||||||
|
for (var group in arr) {
|
||||||
|
// Matches identical (===), not just similar (==).
|
||||||
|
for(i=0; i<arr[group].length; i++) {
|
||||||
|
if(arr[group][i] === value)
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
Array.prototype.inArray = function(search_term) { // Adds inArray to all arrays
|
||||||
|
var i = this.length;
|
||||||
|
if (i > 0) {
|
||||||
|
do {
|
||||||
|
if (this[i] === search_term) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
} while (i--);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks to see if a string is alphanumeric (only letters and numbers)
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
* @return true if string is alphanumeric, false otherwise
|
||||||
|
**/
|
||||||
|
String.prototype.isAlphaNumeric = function() {return /^[A-Za-z0-9_\d]+$/.test (this)};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Load the theme stylesheet
|
||||||
|
**/
|
||||||
|
var loadCSS = document.createElement("link");
|
||||||
|
loadCSS.setAttribute("rel", "stylesheet")
|
||||||
|
loadCSS.setAttribute("type", "text/css")
|
||||||
|
loadCSS.setAttribute("href", 'themes/' + theme + '/style.css')
|
||||||
|
if (typeof loadCSS != "undefined")
|
||||||
|
document.getElementsByTagName("head")[0].appendChild(loadCSS);
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
///////////////////////////////////
|
||||||
|
// ajax im 3.41 //
|
||||||
|
// AJAX Instant Messenger //
|
||||||
|
// Copyright (c) 2006-2008 //
|
||||||
|
// http://www.ajaxim.com/ //
|
||||||
|
// Do not remove this notice //
|
||||||
|
///////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class to handle browser requests
|
||||||
|
**/
|
||||||
|
var Browser = {
|
||||||
|
/**
|
||||||
|
* Get the width of the client browser
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
* @return Document Width
|
||||||
|
**/
|
||||||
|
width: function() {
|
||||||
|
if (self.innerWidth) {
|
||||||
|
return self.innerWidth;
|
||||||
|
} else if (document.documentElement && document.documentElement.clientWidth) {
|
||||||
|
return document.documentElement.clientWidth;
|
||||||
|
} else if (document.body) {
|
||||||
|
return document.body.clientWidth;
|
||||||
|
}
|
||||||
|
return 630;
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the height of the client browser
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
* @return Document Height
|
||||||
|
**/
|
||||||
|
height: function() {
|
||||||
|
if (self.innerWidth) {
|
||||||
|
return self.innerHeight;
|
||||||
|
} else if (document.documentElement && document.documentElement.clientWidth) {
|
||||||
|
return document.documentElement.clientHeight;
|
||||||
|
} else if (document.body) {
|
||||||
|
return document.body.clientHeight;
|
||||||
|
}
|
||||||
|
return 470;
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -0,0 +1,428 @@
|
|||||||
|
///////////////////////////////////
|
||||||
|
// ajax im 3.41 //
|
||||||
|
// AJAX Instant Messenger //
|
||||||
|
// Copyright (c) 2006-2008 //
|
||||||
|
// http://www.ajaxim.com/ //
|
||||||
|
// Do not remove this notice //
|
||||||
|
///////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class to handle buddylist events
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
var Buddylist = {
|
||||||
|
buddyListWin: null, // buddy list window
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Process the creation of the buddy list window
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
create: function() {
|
||||||
|
Event.observe(window, 'resize', Buddylist.fixBuddyList);
|
||||||
|
|
||||||
|
if(!$('bl')) {
|
||||||
|
this.buddyListWin = new Window({id: 'bl', className: "dialog", width: 210, height: (Browser.height() - 60), zIndex: 100, resizable: true, title: Languages.get('buddyList'), draggable: true, closable: false, maximizable: false, detachable: false, minWidth: 205, minHeight: 150, showEffectOptions: {duration: 0}, hideEffectOptions: {duration: 0}});
|
||||||
|
this.buddyListWin.setConstraint(true, {left: 0, right: 0, top: 0, bottom: 0});
|
||||||
|
}
|
||||||
|
|
||||||
|
this.buddyListWin.getContent().innerHTML = '<div id="blTopToolbar"><span class="toolbarButton">' +
|
||||||
|
'<img id="addbuddy" src="themes/'+theme+'/window/addbuddy.png" class="toolbarButton" onclick="Dialogs.newBuddy();" alt="' + Languages.get('addBuddyButton') + '" title="' + Languages.get('addBuddyButton') + '" onmouseover="buttonHover(this);" onmouseout="buttonNormal(this);" onmousedown="buttonDown(this);" onmouseup="buttonNormal(this);" /></span>' +
|
||||||
|
'<span class="toolbarButton toolbarSpacer"><img id="removebuddy" src="themes/'+theme+'/window/removebuddy.png" class="toolbarButton" onclick="Dialogs.removeBuddy();" alt="' + Languages.get('removeBuddyButton') + '" title="' + Languages.get('removeBuddyButton') + '" onmouseover="buttonHover(this);" onmouseout="buttonNormal(this);" onmousedown="buttonDown(this);" onmouseup="buttonNormal(this);" /></span>' +
|
||||||
|
'<span class="toolbarButton"><img id="imanyone" src="themes/'+theme+'/window/imanyone.png" class="toolbarButton" onclick="Dialogs.newIM();" alt="' + Languages.get('IMAnyoneButton') + '" title="' + Languages.get('IMAnyoneButton') + '" onmouseover="buttonHover(this);" onmouseout="buttonNormal(this);" onmousedown="buttonDown(this);" onmouseup="buttonNormal(this);" /></span>' +
|
||||||
|
'<span class="toolbarButton toolbarSpacer"><img id="joinroom" src="themes/'+theme+'/window/joinroom.png" class="toolbarButton" onclick="Dialogs.newRoom();" alt="' + Languages.get('joinChatroomButton') + '" title="' + Languages.get('joinChatroomButton') + '" onmouseover="buttonHover(this);" onmouseout="buttonNormal(this);" onmousedown="buttonDown(this);" onmouseup="buttonNormal(this);"/></span>' +
|
||||||
|
'<span class="toolbarButton"><img id="changepassword" src="themes/'+theme+'/window/changepassword.png" class="toolbarButton" onclick="Dialogs.changeSettings();" alt="' + Languages.get('changeSettingsButton') + '" title="' + Languages.get('changeSettingsButton') + '" onmouseover="buttonHover(this);" onmouseout="buttonNormal(this);" onmousedown="buttonDown(this);" onmouseup="buttonNormal(this);" /></span>' +
|
||||||
|
'<span class="toolbarButton"><img id="toggleaudio" src="themes/'+theme+'/window/audio_'+(audioNotify ? 'on' : 'off')+'.png" onclick="toggleAudio();" alt="' + Languages.get('toggleSoundButton') + '" title="' + Languages.get('toggleSoundButton') + '" /></span>' +
|
||||||
|
(typeof(Status) != 'undefined' ? '<div id="statusSettings"><input type="text" id="customStatus" onkeypress="Status.processCustomAway(event);" style="display:none" onblur="if($(\'customStatus\').style.display != \'none\') { $(\'customStatus\').style.display = \'none\'; $(\'curStatus\').style.display = \'block\'; }" /><a href="#" id="curStatus" onclick="Status.toggleStatusList();return false;">' + Languages.get('available') + '</a></div>' : '') +
|
||||||
|
'</div><div id="blContainer"><ul id="buddylist" class="sortable box"><li style="display:none"></li></ul></div><div id="blBottomToolbar"><a href="#" style="-moz-outline-style: none;" onclick="System.logout();return false;"><img src="themes/'+theme+'/window/signoff.png" style="border:0;" alt="' + Languages.get('signOff') + '" onmouseover="buttonHover(this);" onmouseout="buttonNormal(this);" onmousedown="buttonDown(this);" onmouseup="buttonNormal(this);" /></a></div>';
|
||||||
|
Event.observe(this.buddyListWin.getContent(), 'contextmenu', function() { return false; });
|
||||||
|
|
||||||
|
$('bl_minimize').setStyle({left: (this.buddyListWin.getSize()['width'] - 21) + 'px'});
|
||||||
|
|
||||||
|
this.sizeBuddyList();
|
||||||
|
|
||||||
|
this.buddyListWin.showCenter(false, (((Browser.height()-40) / 2) - (this.buddyListWin.getSize()['height'] / 2)), (buddyListLoc == 0 ? 10 : (Browser.width() - this.buddyListWin.getSize()['width'] - 10)));
|
||||||
|
this.buddyListWin.toFront();
|
||||||
|
|
||||||
|
this.list = {};
|
||||||
|
this.listObjects = {};
|
||||||
|
this.blocked = {};
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Destroy the buddy list window
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
destroy: function() {
|
||||||
|
this.buddyListWin.destroy();
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reposition buddylist
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
fixBuddyList: function() {
|
||||||
|
if(Buddylist.buddyListWin.isVisible()) {
|
||||||
|
Buddylist.buddyListWin.setSize(210, (Browser.height() - 60));
|
||||||
|
Buddylist.buddyListWin.setLocation((((Browser.height()-40) / 2) - (Buddylist.buddyListWin.getSize()['height'] / 2)), (buddyListLoc == 0 ? 10 : (Browser.width() - Buddylist.buddyListWin.getSize()['width'] - 10)));
|
||||||
|
Buddylist.sizeBuddyList();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Resize buddylist
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
sizeBuddyList: function() {
|
||||||
|
$('blContainer').setStyle({width: (this.buddyListWin.getSize()['width'] - 8) + 'px',
|
||||||
|
height: (this.buddyListWin.getSize()['height'] - 95) + 'px'});
|
||||||
|
|
||||||
|
$('blBottomToolbar').setStyle({width: (this.buddyListWin.getSize()['width'] - 8) + 'px',
|
||||||
|
top: (this.buddyListWin.getSize()['height'] - 7) + 'px'});
|
||||||
|
|
||||||
|
$('bl_minimize').setStyle({left: (this.buddyListWin.getSize()['width'] - 21) + 'px'});
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add new buddy to the list
|
||||||
|
*
|
||||||
|
* @arguments
|
||||||
|
* username - user's username
|
||||||
|
* groupname - group the user is in
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
addNewBuddy: function(username, groupname) {
|
||||||
|
username = username.toLowerCase();
|
||||||
|
if(!inArray(Buddylist.list, username) && (!Buddylist.listObjects[username] || !$(Buddylist.listObjects[username].obj))) {
|
||||||
|
var xhConn = new XHConn();
|
||||||
|
|
||||||
|
xhConn.connect(pingTo, "POST", "call=isuser&username="+username, function(xh) {
|
||||||
|
if(xh.responseText == 'not_exists') {
|
||||||
|
$('newbuddy_error_msg').innerHTML = Languages.get('noSuchUser');
|
||||||
|
} else {
|
||||||
|
if(!$(groupname.replace(/\s/, '_') + '_group')) {
|
||||||
|
Buddylist.addGroup(groupname);
|
||||||
|
Buddylist.list[groupname] = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
Buddylist.addBuddy(username, 'Offline', 'none');
|
||||||
|
|
||||||
|
if(parseInt(xh.responseText) == 0) {
|
||||||
|
Buddylist.moveBuddy(username, 'Offline');
|
||||||
|
$(Buddylist.listObjects[username].img).src = 'themes/' + theme + '/offline.png';
|
||||||
|
} else if(parseInt(xh.responseText) == 2) {
|
||||||
|
Buddylist.moveBuddy(username, groupname);
|
||||||
|
$(Buddylist.listObjects[username].img).src = 'themes/' + theme + '/away.png';
|
||||||
|
} else {
|
||||||
|
Buddylist.moveBuddy(username, groupname);
|
||||||
|
$(Buddylist.listObjects[username].img).src = 'themes/' + theme + '/online.png';
|
||||||
|
}
|
||||||
|
|
||||||
|
Buddylist.list[groupname][username] = {'username': username, 'blocked': false, 'status': parseInt(xh.responseText)};
|
||||||
|
|
||||||
|
var xhConn = new XHConn();
|
||||||
|
xhConn.connect(pingTo, "POST", "call=addbuddy&username="+username+'&group='+groupname, null);
|
||||||
|
|
||||||
|
Windows.close('newBuddy');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
$('newbuddy_error_msg').innerHTML = Languages.get('alreadyOnBuddylist');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add buddy to the list
|
||||||
|
*
|
||||||
|
* @arguments
|
||||||
|
* username - username of the buddy we're adding
|
||||||
|
* groupname - the group the buddy is in
|
||||||
|
* buddyicon - the buddy's buddyiocn
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
* update Benjamin Hutchins
|
||||||
|
**/
|
||||||
|
addBuddy: function(username, groupname, buddyicon) {
|
||||||
|
if(!$(groupname.replace(/\s/, '_') + '_group')) this.addGroup(groupname);
|
||||||
|
var groupList = $(groupname.replace(/\s/, '_') + '_group');
|
||||||
|
var iconsrc = (buddyicon=='none'?defaultIcon:pathToIcons+username+'.'+buddyicon);
|
||||||
|
|
||||||
|
var randId = Math.floor(Math.random()*1000000000);
|
||||||
|
while($(randId + '_blItem'))
|
||||||
|
randId = Math.floor(Math.random()*1000000000);
|
||||||
|
|
||||||
|
groupList.innerHTML += '<li id="'+randId+'_blItem" class="buddy'+(useIcons && showInList ? " buddyicon" : "")+'" onmousedown="Buddylist.clickBuddy(event, \''+username+'\');return false;" onselectstart="return false;" onmouseover="Buddylist.selectBuddy(this, \''+username+'\', true);" onmouseout="Buddylist.selectBuddy(this, \''+username+'\', false);" ondblclick="Buddylist.onBuddyDblClick();">' + (useIcons&&showInList?(defaultIcon==""&&buddyicon=='none'?'':'<img class="blIcon" src="'+iconsrc+'" alt="" id="'+randId+'_blIcon" />'):'') + ' <img src="themes/' + theme + '/online.png" alt="" id="'+randId+'_blImg" /> '+username+'</li>';
|
||||||
|
|
||||||
|
Buddylist.listObjects[username] = {};
|
||||||
|
Buddylist.listObjects[username].obj = randId + '_blItem';
|
||||||
|
Buddylist.listObjects[username].img = randId + '_blImg';
|
||||||
|
Buddylist.listObjects[username].icon = buddyicon;
|
||||||
|
Buddylist.listObjects[username].group = groupname;
|
||||||
|
|
||||||
|
$(Buddylist.listObjects[username].obj).setStyle({listStyleType: 'none'});
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Move a buddy from one group to another
|
||||||
|
*
|
||||||
|
* @arguments
|
||||||
|
* username - username of the buddy we're moving
|
||||||
|
* groupname - new group name
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
moveBuddy: function(username, groupname) {
|
||||||
|
if(groupname == null) return;
|
||||||
|
if($(Buddylist.listObjects[username].obj).parentNode == $(groupname.replace(/\s/, '_') + '_group')) return;
|
||||||
|
if(!$(groupname.replace(/\s/, '_') + '_group')) this.addGroup(groupname);
|
||||||
|
|
||||||
|
var group = $(groupname.replace(/\s/, '_') + '_group')
|
||||||
|
|
||||||
|
group.insertBefore($(Buddylist.listObjects[username].obj), null);
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add a new group the buddylist window
|
||||||
|
*
|
||||||
|
* @arguments
|
||||||
|
* groupname - group to add
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
addGroup: function(groupname) {
|
||||||
|
var bList = $('buddylist');
|
||||||
|
bList.innerHTML = (groupname=='Offline' ? bList.innerHTML : '') + '<li id="' + groupname.replace(/\s/, '_') + '_groupTop" class="groupTop" onmousedown="return false;" onselectstart="return false;" onclick="Buddylist.toggleGroup(\'' + groupname + '\');"><img id="' + groupname.replace(/\s/, '_') + '_groupArrow" src="themes/' + theme + '/window/arrow.png" /> ' + groupname +
|
||||||
|
(groupname!='Offline' ? ' <a href="#" class="delLink" onclick="Dialogs.removeGroup(\'' + groupname + '\');return false;"><img src="themes/' + theme + '/window/smallx.png" style="border:0;" onmouseover="buttonHover(this);" onmouseout="buttonNormal(this);" /></a>' : '') + '</li>' + "\n" + '<ul id="' + groupname.replace(/\s/, '_') + '_group" class="group"></ul>' + (groupname!='Offline' ? bList.innerHTML : '');
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove buddy from the buddylist permanently
|
||||||
|
*
|
||||||
|
* @arguments
|
||||||
|
* username - buddy we're removin
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
deleteBuddy: function(username) {
|
||||||
|
if(username.indexOf('_group') != -1) {
|
||||||
|
this.deleteGroup(username.substring(0, username.length - 6));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var usernam = username;
|
||||||
|
|
||||||
|
var ingroup = null;
|
||||||
|
for (var group in this.list) {
|
||||||
|
if(typeof(this.list[group][username]) !== 'undefined' && this.list[group][username].username == username) {
|
||||||
|
ingroup = group;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var buddyToRmv = $(Buddylist.listObjects[username].obj);
|
||||||
|
|
||||||
|
if(typeof(buddyToRmv) !== 'undefined') {
|
||||||
|
buddyToRmv.parentNode.removeChild(buddyToRmv);
|
||||||
|
if(this.list[ingroup]) {
|
||||||
|
this.list[ingroup][username] = null;
|
||||||
|
|
||||||
|
var xhConn = new XHConn();
|
||||||
|
xhConn.connect(pingTo, "POST", "call=removebuddy&username="+username, null);
|
||||||
|
|
||||||
|
}
|
||||||
|
Dialog.closeInfo();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Process the blocking of a buddy
|
||||||
|
*
|
||||||
|
* @arguments
|
||||||
|
* username - the buddy to be blocked
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
* @update Benjamin Hutchins
|
||||||
|
**/
|
||||||
|
blockBuddy: function(username) {
|
||||||
|
var isBlocked = this.blocked.inArray(username);
|
||||||
|
if(isBlocked) {
|
||||||
|
for(var i=0; i<this.blocked.length; i++) {
|
||||||
|
if(this.blocked[i] == username) this.blocked.splice(i, 1);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.blocked[this.blocked.length] = username;
|
||||||
|
}
|
||||||
|
|
||||||
|
var xhConn = new XHConn();
|
||||||
|
xhConn.connect(pingTo, "POST", "call=blockbuddy&username="+username+(isBlocked ? '&status=' + (Status.state + 1) : ''), null);
|
||||||
|
|
||||||
|
for (var group in this.list) {
|
||||||
|
if(typeof(this.list[group][username]) !== 'undefined' && this.list[group][username].username == username) {
|
||||||
|
this.list[group][username].blocked = (isBlocked ? false : true);
|
||||||
|
$(Buddylist.listObjects[username].img).src = (!isBlocked ? 'themes/' + theme + '/blocked.png' : (Buddylist.list[group][username].status == 1 ? 'themes/' + theme + '/online.png' : (Buddylist.list[group][username].status >= 2 ? 'themes/' + theme + '/away.png' : 'themes/' + theme + '/offline.png')));
|
||||||
|
if(!blockedBuddyStatus && isBlocked) {
|
||||||
|
Buddylist.moveBuddy(username, Languages.get('offline'));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove a group from the buddylist permanently
|
||||||
|
*
|
||||||
|
* @arguments
|
||||||
|
* groupname - group to be removes
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
deleteGroup: function(groupname) {
|
||||||
|
var groupNoSpaces = groupname.replace(/\s/, '_');
|
||||||
|
var groupToRmv = $(groupNoSpaces+"_group");
|
||||||
|
var groupTop = $(groupNoSpaces+"_groupTop");
|
||||||
|
|
||||||
|
if(typeof(groupToRmv) !== 'undefined') {
|
||||||
|
groupToRmv.parentNode.removeChild(groupToRmv);
|
||||||
|
groupTop.parentNode.removeChild(groupTop);
|
||||||
|
|
||||||
|
for(var i=0;i<this.list[groupname].length;i++) {
|
||||||
|
var buddyItem = $(Buddylist.listObjects[this.list[groupname][i].username].obj);
|
||||||
|
if(typeof(buddyItem) !== 'undefined') buddyItem.parentNode.removeChild(buddyItem);
|
||||||
|
}
|
||||||
|
|
||||||
|
delete this.list[groupname];
|
||||||
|
|
||||||
|
var xhConn = new XHConn();
|
||||||
|
xhConn.connect(pingTo, "POST", "call=removegroup&group="+groupname, null);
|
||||||
|
|
||||||
|
Dialog.closeInfo();
|
||||||
|
} else {
|
||||||
|
$('deletebuddy_error_msg').innerHTML = Languages.get('noSuchGroup');
|
||||||
|
$('deletebuddy_error_msg').show();
|
||||||
|
Dialog.win.updateHeight();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Toggle whether a group is collapsed or not.
|
||||||
|
*
|
||||||
|
* @arguments
|
||||||
|
* groupname - group to toggle
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
toggleGroup: function(groupname) {
|
||||||
|
var groupList = $(groupname.replace(/\s/, '_') + '_group');
|
||||||
|
var groupArrow = $(groupname.replace(/\s/, '_') + '_groupArrow');
|
||||||
|
|
||||||
|
if(groupList.style.display != 'none') {
|
||||||
|
groupList.hide();
|
||||||
|
groupArrow.src = 'themes/' + theme + '/window/arrow_up.png';
|
||||||
|
} else {
|
||||||
|
groupList.show();
|
||||||
|
groupArrow.src = 'themes/' + theme + '/window/arrow.png';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Proccess mouseover ad mouseout for list items
|
||||||
|
*
|
||||||
|
* @arguments
|
||||||
|
* sel - list element
|
||||||
|
* username - user being messed with
|
||||||
|
* selected - is the mouse over or out
|
||||||
|
**/
|
||||||
|
selectBuddy: function(sel, username, selected) {
|
||||||
|
if(selected === false) {
|
||||||
|
if(curSelected != username) {
|
||||||
|
try {
|
||||||
|
Element.addClassName(sel, 'listNotSelected');
|
||||||
|
Element.removeClassName(sel, 'listSelected');
|
||||||
|
Element.removeClassName(sel, 'listHover');
|
||||||
|
} catch(e) { }
|
||||||
|
} else {
|
||||||
|
Element.addClassName(sel, 'listSelected');
|
||||||
|
Element.removeClassName(sel, 'listNotSelected');
|
||||||
|
Element.removeClassName(sel, 'listHover');
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
Element.addClassName(sel, 'listHover');
|
||||||
|
Element.removeClassName(sel, 'listSelected');
|
||||||
|
Element.removeClassName(sel, 'listNotSelected');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handle mouse clicks on a buddy in the buddylist
|
||||||
|
*
|
||||||
|
* @arguments
|
||||||
|
* event - passed by the browser
|
||||||
|
* username - the user that was clicked
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
* @update Benjamin Hutchins
|
||||||
|
**/
|
||||||
|
clickBuddy: function(event, username) {
|
||||||
|
event = event || window.event;
|
||||||
|
|
||||||
|
if (event.button == 2) {
|
||||||
|
Context.lastClicked = username;
|
||||||
|
} else {
|
||||||
|
Context.lastClicked = null;
|
||||||
|
|
||||||
|
if(curSelected.length > 0) {
|
||||||
|
try {
|
||||||
|
var el = $(Buddylist.listObjects[curSelected].obj);
|
||||||
|
Element.addClassName(el, 'listNotSelected');
|
||||||
|
Element.removeClassName(el, 'listSelected');
|
||||||
|
Element.removeClassName(el, 'listHover');
|
||||||
|
} catch(e) { }
|
||||||
|
}
|
||||||
|
|
||||||
|
curSelected = username;
|
||||||
|
|
||||||
|
var oel = $(Buddylist.listObjects[curSelected].obj);
|
||||||
|
Element.addClassName(oel, 'listSelected');
|
||||||
|
Element.removeClassName(oel, 'listNotSelected');
|
||||||
|
Element.removeClassName(oel, 'listHover');
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Process double clicks, open the IM window
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
onBuddyDblClick: function() {
|
||||||
|
if(curSelected.length > 0) {
|
||||||
|
if(typeof(IM.windows[curSelected]) == 'undefined') {
|
||||||
|
IM.create(curSelected, curSelected);
|
||||||
|
} else {
|
||||||
|
if(IM.windows[curSelected].detached) {
|
||||||
|
if(IM.windows[curSelected].popup.closed) {
|
||||||
|
IM.windows[curSelected] = IM.windows[curSelected].old;
|
||||||
|
IM.windows[curSelected].show();
|
||||||
|
} else {
|
||||||
|
IM.windows[curSelected].popup.focus();
|
||||||
|
}
|
||||||
|
} else if(!IM.windows[curSelected].isVisible()) {
|
||||||
|
IM.windows[curSelected].show();
|
||||||
|
IM.windows[curSelected].toFront();
|
||||||
|
setTimeout("scrollToBottom('" + IM.windows[curSelected].getId() + "_rcvd')", 125);
|
||||||
|
setTimeout("$('" + IM.windows[curSelected].getId() + "_sendBox').focus();", 250);
|
||||||
|
} else {
|
||||||
|
IM.windows[curSelected].toFront();
|
||||||
|
setTimeout("$('" + IM.windows[curSelected].getId() + "_sendBox').focus();", 250);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -0,0 +1,76 @@
|
|||||||
|
///////////////////////////////////
|
||||||
|
// ajax im 3.41 //
|
||||||
|
// AJAX Instant Messenger //
|
||||||
|
// Copyright (c) 2006-2008 //
|
||||||
|
// http://www.ajaxim.com/ //
|
||||||
|
// Do not remove this notice //
|
||||||
|
///////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Button control class
|
||||||
|
*/
|
||||||
|
var ButtonCtl = {
|
||||||
|
/**
|
||||||
|
* Create a button/link wrapper
|
||||||
|
*
|
||||||
|
* @arguments
|
||||||
|
* text - innerHTML for link
|
||||||
|
* action - onClick action
|
||||||
|
* id - element ID to apply (if none is supplied, none is set)
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
create: function(text, action, id) {
|
||||||
|
return '<a href="#" ' + (id!=null ? 'id="' + id + '" ' : '') + 'class="stdButton" onclick="' + action + 'return false;" onmouseover="ButtonCtl.hover(this);" onmousedown="ButtonCtl.down(this);" onmouseup="ButtonCtl.normal(this);" onmouseout="ButtonCtl.normal(this);">' + text + '</a>';
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a submit input button wrapper
|
||||||
|
*
|
||||||
|
* @arguments
|
||||||
|
* text - value for input
|
||||||
|
* id - element ID to apply (if none is supplied, none is set)
|
||||||
|
*
|
||||||
|
* @authro Benjamin Hutchins
|
||||||
|
**/
|
||||||
|
createSubmit: function(text, id) {
|
||||||
|
return '<input type="submit" ' + (id!=null ? 'id="' + id + '" ' : '') + 'class="stdButton" onmouseover="ButtonCtl.hover(this);" onmousedown="ButtonCtl.down(this);" onmouseup="ButtonCtl.normal(this);" onmouseout="ButtonCtl.normal(this);" value="' + text + '"" />';
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Effect to apply to 'el' (element) on mouseover
|
||||||
|
*
|
||||||
|
* @arguments
|
||||||
|
* el - element to affect
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
hover: function(el) {
|
||||||
|
el.className = 'stdButton btnHover';
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Effect to apply to 'el' (element) on mousedown
|
||||||
|
*
|
||||||
|
* @arguments
|
||||||
|
* el - element to affect
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
down: function(el) {
|
||||||
|
el.className = 'stdButton btnDown';
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Restore 'el' (element) to normal on mouseout
|
||||||
|
*
|
||||||
|
* @arguments
|
||||||
|
* el - element to affect
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
normal: function(el) {
|
||||||
|
el.className = 'stdButton';
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -0,0 +1,362 @@
|
|||||||
|
///////////////////////////////////
|
||||||
|
// ajax im 3.41 //
|
||||||
|
// AJAX Instant Messenger //
|
||||||
|
// Copyright (c) 2006-2008 //
|
||||||
|
// http://www.ajaxim.com/ //
|
||||||
|
// Do not remove this notice //
|
||||||
|
///////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Chatroom Class
|
||||||
|
**/
|
||||||
|
var Chatroom = {
|
||||||
|
windows: {}, // JavaScript object to store all chatroom windows
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new chatroom
|
||||||
|
*
|
||||||
|
* @arguments
|
||||||
|
* name - chatroom name
|
||||||
|
* imTitle - window title, default is chatroom name
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
create: function(name, imTitle) {
|
||||||
|
var imLeft = Math.round(Math.random()*(Browser.width()-360))+'px';
|
||||||
|
var imTop = Math.round(Math.random()*(Browser.height()-400))+'px';
|
||||||
|
|
||||||
|
var winId = randomString(32) + '_chat';
|
||||||
|
|
||||||
|
this.windows[name] = new ChatWindow({id: winId, className: "dialog", width: 475, height: 340, top: imTop, left: imLeft, resizable: true, title: imTitle, draggable: true, detachable: false, minWidth: 475, minHeight: 150, showEffectOptions: {duration: 0}, hideEffectOptions: {duration: 0}});
|
||||||
|
|
||||||
|
this.windows[name].setConstraint(true, {left: 0, right: 0, top: 0, bottom: 0});
|
||||||
|
|
||||||
|
this.windows[name].getContent().innerHTML = '<div class="rcvdMessages" id="' + winId + '_rcvd"></div>' + "\n" +
|
||||||
|
'<div class="chatUserList" id="' + winId + '_userlist"><ul id="' + winId + '_ul" class="sortable box"><li style="display:none"></li></ul></div>' + "\n" +
|
||||||
|
'<div class="imToolbar" id="' + winId + '_toolbar" onmousemove="return false;" onselectstart="return false;"><img src="themes/'+theme+'/window/bold_off.png" onmouseover="buttonHover(this);" onmouseout="buttonNormal(this);" onclick="Chatroom.windows[\'' + name + '\'].toggleBold();" onmousedown="return false;" alt="' + Languages.get('bold') + '" id="' + winId + '_bold" /> ' +
|
||||||
|
'<img src="themes/'+theme+'/window/italic_off.png" onmouseover="buttonHover(this);" onmouseout="buttonNormal(this);" onclick="Chatroom.windows[\'' + name + '\'].toggleItalic();" onmousedown="return false;" alt="' + Languages.get('italic') + '" id="' + winId + '_italic" /> '+
|
||||||
|
'<img src="themes/'+theme+'/window/underline_off.png" onmouseover="buttonHover(this);" onmouseout="buttonNormal(this);" onclick="Chatroom.windows[\'' + name + '\'].toggleUnderline();" onmousedown="return false;" alt="' + Languages.get('underline') + '" id="' + winId + '_underline" /></div>' +
|
||||||
|
' <a href="#" class="setFontLink" id="' + winId + '_setFont" onclick="Chatroom.windows[\'' + name + '\'].toggleFontList();return false;" onselectstart="return false;">Tahoma</a>' +
|
||||||
|
' <a href="#" class="setFontSizeLink" id="' + winId + '_setFontSize" onclick="Chatroom.windows[\'' + name + '\'].toggleFontSizeList();return false;" onselectstart="return false;">12</a>' +
|
||||||
|
' <a href="#" class="setFontColorLink" id="' + winId + '_setFontColor" onclick="Chatroom.windows[\'' + name + '\'].toggleFontColorList();return false;" onselectstart="return false;"><div id="' + winId + '_setFontColorColor" style="width:14px;height:14px;display:block;"></div></a>' +
|
||||||
|
' <a href="#" class="insertEmoticonLink" id="' + winId + '_insertEmoticon" onclick="Chatroom.windows[\'' + name + '\'].toggleEmoticonList();return false;" onselectstart="return false;"><img src="themes/' + theme + '/emoticons/mini_smile.gif" width="14" height="14" style="border:0;" /></a>' +
|
||||||
|
"\n" + '<div style="overflow:auto;"><textarea class="inputText" id="' + winId + '_sendBox" onfocus="blinkerOn(false);" onkeypress="return Chatroom.windows[\'' + name + '\'].keyHandler(event);"></textarea></div>';
|
||||||
|
|
||||||
|
this.windows[name].setRoom(name);
|
||||||
|
|
||||||
|
$(winId + '_userlist').setStyle({left: (this.windows[name].getSize().width - 155) + 'px', height: (this.windows[name].getSize().height - 12) + 'px'});
|
||||||
|
$(winId + '_rcvd').setStyle({marginTop: '5px', height: (this.windows[name].getSize().height - 103) + 'px', width: (this.windows[name].getSize().width - 170) + 'px'});
|
||||||
|
$(winId + '_toolbar').setStyle({top: (this.windows[name].getSize().height - 73) + 'px', width: (this.windows[name].getSize().width - 170) + 'px'});
|
||||||
|
$(winId + '_setFont').setStyle({top: (this.windows[name].getSize().height - 65) + 'px'});
|
||||||
|
$(winId + '_setFontSize').setStyle({top: (this.windows[name].getSize().height - 65) + 'px'});
|
||||||
|
$(winId + '_setFontColor').setStyle({top: (this.windows[name].getSize().height - 65) + 'px'});
|
||||||
|
$(winId + '_setFontColorColor').setStyle({backgroundColor: '#000'});
|
||||||
|
$(winId + '_insertEmoticon').setStyle({top: (this.windows[name].getSize().height - 65) + 'px'});
|
||||||
|
|
||||||
|
var sendBox = $(winId + '_sendBox');
|
||||||
|
sendBox.setStyle({top: (this.windows[name].getSize().height - 45) + 'px',
|
||||||
|
left: '2px',
|
||||||
|
width: (this.windows[name].getSize().width - 175) + 'px',
|
||||||
|
fontWeight: '400',
|
||||||
|
fontStyle: 'normal',
|
||||||
|
textDecoration: 'none'});
|
||||||
|
|
||||||
|
this.windows[name].show();
|
||||||
|
this.windows[name].toFront();
|
||||||
|
Windows.focusedWindow = this.windows[name];
|
||||||
|
setTimeout("$('"+winId+"_sendBox').focus();", 250);
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Process chatroom window resize
|
||||||
|
*
|
||||||
|
* @arguments
|
||||||
|
* name - chatroom name
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
handleResize: function(name) {
|
||||||
|
var winId = this.windows[name].getId();
|
||||||
|
|
||||||
|
$(winId + '_userlist').setStyle({left: (this.windows[name].getSize().width - 155) + 'px', height: (this.windows[name].getSize().height - 12) + 'px'});
|
||||||
|
$(winId + '_rcvd').setStyle({height: (this.windows[name].getSize().height - 103) + 'px', width: (this.windows[name].getSize().width - 170) + 'px'});
|
||||||
|
$(winId + '_toolbar').setStyle({top: (this.windows[name].getSize().height - 73) + 'px', width: (this.windows[name].getSize().width - 170) + 'px'});
|
||||||
|
$(winId + '_setFont').setStyle({top: (this.windows[name].getSize().height - 65) + 'px'});
|
||||||
|
$(winId + '_setFontSize').setStyle({top: (this.windows[name].getSize().height - 65) + 'px'});
|
||||||
|
$(winId + '_setFontColor').setStyle({top: (this.windows[name].getSize().height - 65) + 'px'});
|
||||||
|
$(winId + '_setFontColorColor').setStyle({backgroundColor: '#000'});
|
||||||
|
$(winId + '_insertEmoticon').setStyle({top: (this.windows[name].getSize().height - 65) + 'px'});
|
||||||
|
$(winId + '_sendBox').setStyle({top: (this.windows[name].getSize().height - 45) + 'px', left: '2px', width: (this.windows[name].getSize().width - 175) + 'px'});
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Send request to server to enter a chatroom
|
||||||
|
*
|
||||||
|
* @argument
|
||||||
|
* room - room name user is entering
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
join: function(room) {
|
||||||
|
room = room.toLowerCase();
|
||||||
|
|
||||||
|
var xhConn = new XHConn();
|
||||||
|
xhConn.connect(pingTo, "POST", "call=joinroom&room="+room,
|
||||||
|
function(xh) {
|
||||||
|
if(xh.responseText.indexOf('"') == -1) {
|
||||||
|
switch(xh.responseText) {
|
||||||
|
case 'already_joined':
|
||||||
|
$('newroom_error_msg').innerHTML = Languages.get('alreadyInRoom').replace('%1', room);
|
||||||
|
break;
|
||||||
|
case 'room_is_user':
|
||||||
|
$('newroom_error_msg').innerHTML = Languages.get('invalidRoom');
|
||||||
|
break;
|
||||||
|
case 'invalid_chars':
|
||||||
|
$('newroom_error_msg').innerHTML = Languages.get('invalidRoomChars');
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if(!$(room + '_im')) {
|
||||||
|
Chatroom.create(room, room);
|
||||||
|
} else {
|
||||||
|
if(!Chatroom.windows[room].isVisible()) {
|
||||||
|
Chatroom.windows[room].show();
|
||||||
|
setTimeout("scrollToBottom('" + room + "_rcvd')", 125);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
var users = xh.responseText.parseJSON().users;
|
||||||
|
for(var i=0; i<users.length; i++)
|
||||||
|
if(!$(users[i]+'_'+name+'_chatUser')) Chatroom.windows[room].addUser(users[i]);
|
||||||
|
Windows.close('newRoom');
|
||||||
|
Chatroom.windows[room].toFront();
|
||||||
|
setTimeout("$('"+Chatroom.windows[room].getId()+"_sendBox').focus()", 125);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Proccess the leaving of a chatroom
|
||||||
|
*
|
||||||
|
* @arguments
|
||||||
|
* room - room name the user is leaving
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
leave: function(room) {
|
||||||
|
var xhConn = new XHConn();
|
||||||
|
xhConn.connect(pingTo, "POST", "call=leaveroom&room="+room, null);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Chatroom Window Class
|
||||||
|
**/
|
||||||
|
var ChatWindow = Class.create();
|
||||||
|
Object.extend(ChatWindow.prototype, IMWindow.prototype);
|
||||||
|
Object.extend(ChatWindow.prototype, {
|
||||||
|
curSelected: '', // currnet user selected from the chatroom user list
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the class' room name variable
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
setRoom: function(name) {
|
||||||
|
this.room = name;
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add a user to the chatroom user list
|
||||||
|
*
|
||||||
|
* @arguments
|
||||||
|
* username - user to add
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
addUser: function(username) {
|
||||||
|
$(this.getId() + '_ul').innerHTML += '<li id="'+username+'_'+this.room+'_chatUser" class="buddy" onmousedown="Chatroom.windows[\'' + this.room + '\'].clickUser(\''+username+'\');return false;" onselectstart="return false;" onmouseover="Chatroom.windows[\'' + this.room + '\'].selectUser(this, \''+username+'\', true);" onmouseout="Chatroom.windows[\'' + this.room + '\'].selectUser(this, \''+username+'\', false);" ondblclick="Chatroom.windows[\'' + this.room + '\'].onUserDblClick();" style="padding:0px;"><img src="themes/' + theme + '/online.png" alt="" id="'+username+'_'+this.room+'_chatImg" /> '+username+'</li>';
|
||||||
|
$(username+'_'+this.room+'_chatUser').setStyle({listStyleType: 'none'});
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove a user from the chatroom user list
|
||||||
|
*
|
||||||
|
* @arguments
|
||||||
|
* username - user to remove
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
deleteUser: function(username) {
|
||||||
|
var toDelete = $(username + '_' + this.room + '_chatUser');
|
||||||
|
if(typeof(toDelete) !== 'undefined')
|
||||||
|
toDelete.parentNode.removeChild(toDelete);
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Process mouseover and mousout calls for the user list
|
||||||
|
*
|
||||||
|
* @arguments
|
||||||
|
* sel - element
|
||||||
|
* username - user's username
|
||||||
|
* selected - is mouse over or did it go out
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
selectUser: function(sel, username, selected) {
|
||||||
|
if(selected === false) {
|
||||||
|
if(this.curSelected != username) {
|
||||||
|
try {
|
||||||
|
Element.addClassName(sel, 'listNotSelected');
|
||||||
|
Element.removeClassName(sel, 'listSelected');
|
||||||
|
Element.removeClassName(sel, 'listHover');
|
||||||
|
} catch(e) { }
|
||||||
|
} else {
|
||||||
|
Element.addClassName(sel, 'listSelected');
|
||||||
|
Element.removeClassName(sel, 'listNotSelected');
|
||||||
|
Element.removeClassName(sel, 'listHover');
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
Element.addClassName(sel, 'listHover');
|
||||||
|
Element.removeClassName(sel, 'listSelected');
|
||||||
|
Element.removeClassName(sel, 'listNotSelected');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Process event when a user is clicked
|
||||||
|
*
|
||||||
|
* @arguments
|
||||||
|
* username - the username of the user clicked
|
||||||
|
*
|
||||||
|
* @author Josh Gross
|
||||||
|
**/
|
||||||
|
clickUser: function(username) {
|
||||||
|
if(this.curSelected.length > 0) {
|
||||||
|
try {
|
||||||
|
var el = $(this.curSelected + '_' + this.room + '_chatUser');
|
||||||
|
Element.addClassName(el, 'listNotSelected');
|
||||||
|
Element.removeClassName(el, 'listSelected');
|
||||||
|
Element.removeClassName(el, 'listHover');
|
||||||
|
} catch(e) { }
|
||||||
|
}
|
||||||
|
|
||||||
|
this.curSelected = username;
|
||||||
|
|
||||||
|
var oel = $(this.curSelected + '_' + this.room + '_chatUser');
|
||||||
|
Element.addClassName(oel, 'listSelected');
|
||||||
|
Element.removeClassName(oel, 'listNotSelected');
|
||||||
|
Element.removeClassName(oel, 'listHover');
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* On DoubleClick of a user from the chatroom user
|
||||||
|
* list, start a private IM with him/her.
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
onUserDblClick: function() {
|
||||||
|
if(this.curSelected.length > 0) {
|
||||||
|
if(typeof(IM.windows[this.curSelected]) == 'undefined') {
|
||||||
|
IM.create(this.curSelected, this.curSelected);
|
||||||
|
} else {
|
||||||
|
if(!IM.windows[this.curSelected].isVisible()) {
|
||||||
|
IM.windows[this.curSelected].show();
|
||||||
|
IM.windows[this.curSelected].toFront();
|
||||||
|
setTimeout("scrollToBottom('" + IM.windows[this.curSelected].getId() + "_rcvd')", 125);
|
||||||
|
setTimeout("$('" + IM.windows[this.curSelected].getId() + "_sendBox').focus();", 250);
|
||||||
|
} else {
|
||||||
|
IM.windows[this.curSelected].toFront();
|
||||||
|
setTimeout("$('" + IM.windows[this.curSelected].getId() + "_sendBox').focus();", 250);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class to handle the window of the chat rooms
|
||||||
|
**/
|
||||||
|
var ChatroomList = {
|
||||||
|
curSelected: '', // current selected chat room
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get list of chat rooms that exist
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
get: function(applyTo) {
|
||||||
|
var xhConn = new XHConn();
|
||||||
|
|
||||||
|
xhConn.connect(pingTo, "POST", "call=roomlist", function(xh) {
|
||||||
|
var rooms = xh.responseText.parseJSON();
|
||||||
|
|
||||||
|
applyTo.innerHTML = '<ul id="join_room_ul" class="sortable box" style="padding: 0px; margin: 0px;"><li style="display:none;"></li>';
|
||||||
|
|
||||||
|
if(rooms.length > 0 || predefRooms.length > 0) {
|
||||||
|
for(var i=0; i<rooms.length; i++) {
|
||||||
|
var hexmd5 = hex_md5(rooms[i]);
|
||||||
|
if (!$('chatroom_list_' + hexmd5)) {
|
||||||
|
applyTo.innerHTML += '<li id="chatroom_list_' + hexmd5 + '" class="buddy" style="padding-left:1%;" onmousedown="ChatroomList.clickRoom(\'' + rooms[i] + '\');return false;" onmouseover="ChatroomList.selectRoom(this, \'' + rooms[i] + '\', true);" onmouseout="ChatroomList.selectRoom(this, \'' + rooms[i] + '\', false);">' + rooms[i] + '</li>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for(var i=0; i<predefRooms.length; i++) {
|
||||||
|
var hexmd5 = hex_md5(predefRooms[i]);
|
||||||
|
if (!$('chatroom_list_' + hexmd5)) {
|
||||||
|
applyTo.innerHTML += '<li id="chatroom_list_' + hexmd5 + '" class="buddy" style="padding-left:1%;" onmousedown="ChatroomList.clickRoom(\'' + predefRooms[i] + '\');return false;" onmouseover="ChatroomList.selectRoom(this, \'' + predefRooms[i] + '\', true);" onmouseout="ChatroomList.selectRoom(this, \'' + predefRooms[i] + '\', false);">' + predefRooms[i] + '</li>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
applyTo.innerHTML += '<li class="buddy" style="margin: 2px 0px 0px 0px; padding: 0px; text-align: center;">' + Languages.get('noRoomsExist') + '</li>';
|
||||||
|
}
|
||||||
|
applyTo.innerHTML += '</ul>';
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Proccess mouseover and mouseout of list items
|
||||||
|
*
|
||||||
|
* @arguments
|
||||||
|
* sel - list element
|
||||||
|
* roomname - chatroom name
|
||||||
|
* selected - did mouse go over or out
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
selectRoom: function(sel, roomname, selected) {
|
||||||
|
if(selected === false) {
|
||||||
|
if(this.curSelected != roomname) {
|
||||||
|
try {
|
||||||
|
Element.addClassName(sel, 'listNotSelected').removeClassName('listSelected').removeClassName('listHover');
|
||||||
|
} catch(e) { }
|
||||||
|
} else {
|
||||||
|
Element.addClassName(sel, 'listSelected').removeClassName('listNotSelected').removeClassName('listHover');
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
Element.addClassName(sel, 'listHover').removeClassName('listSelected').removeClassName('listNotSelected');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Process the clicking of a room
|
||||||
|
*
|
||||||
|
* @arguments
|
||||||
|
* roomname - room that was clicked
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
clickRoom: function(roomname) {
|
||||||
|
if(this.curSelected.length > 0) {
|
||||||
|
try {
|
||||||
|
Element.addClassName($('chatroom_list_' + hex_md5(this.curSelected)), 'listNotSelected').removeClassName('listSelected').removeClassName('listHover');
|
||||||
|
} catch(e) { }
|
||||||
|
}
|
||||||
|
|
||||||
|
this.curSelected = roomname;
|
||||||
|
$('roomname').value = roomname;
|
||||||
|
|
||||||
|
Element.addClassName($('chatroom_list_' + hex_md5(roomname)), 'listSelected').removeClassName('listNotSelected').removeClassName('listHover');
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -0,0 +1,110 @@
|
|||||||
|
///////////////////////////////////
|
||||||
|
// ajax im 3.41 //
|
||||||
|
// AJAX Instant Messenger //
|
||||||
|
// Copyright (c) 2006-2008 //
|
||||||
|
// http://www.ajaxim.com/ //
|
||||||
|
// Do not remove this notice //
|
||||||
|
///////////////////////////////////
|
||||||
|
|
||||||
|
// Configuration //
|
||||||
|
|
||||||
|
// Title //
|
||||||
|
var siteName = 'ajax im'; // Name of your site (appears as the page title).
|
||||||
|
// If '', then the title will be used from the index file.
|
||||||
|
|
||||||
|
// Registration //
|
||||||
|
var allowNewUsers = true; // Enable/Disable open registration
|
||||||
|
|
||||||
|
// Languages //
|
||||||
|
// Format: [
|
||||||
|
// ['folderName', 'properName'],
|
||||||
|
// ['language2Folder', 'Language 2 Proper Name'],
|
||||||
|
// ...
|
||||||
|
// ]
|
||||||
|
// Note: The first language will be used as the default language.
|
||||||
|
var languageOptions = [
|
||||||
|
['english', 'English']
|
||||||
|
];
|
||||||
|
|
||||||
|
// Theme Settings //
|
||||||
|
var theme = 'dark'; // ajax im theme
|
||||||
|
var alertWidth = 400; // alert window width
|
||||||
|
|
||||||
|
// Notification //
|
||||||
|
var useBlinker = true; // Show new message in titlebar when window isn't active.
|
||||||
|
var blinkSpeed = 1000; // How fast to change between the titles when "blinking" (in milliseconds).
|
||||||
|
var pulsateTitles = true; // Pulsate (blink) IM window titles on new IM when they are not the active window.
|
||||||
|
var audioNotify = true; // By default, play sounds upon getting an IM?
|
||||||
|
|
||||||
|
// Server //
|
||||||
|
var pingFrequency = 2500; // How often to ping the server (in milliseconds). Best range between 2500 and 3500 ms.
|
||||||
|
var pingTo = 'ajax_im.php'; // The file that is the "server".
|
||||||
|
var adminPingTo = 'admin.php'; // The "server" script for admin functions.
|
||||||
|
var blockedBuddyStatus = false; // Show blocked buddies' status.
|
||||||
|
|
||||||
|
// Windows //
|
||||||
|
var imWidth = 310; // Default IM window width
|
||||||
|
var imHeight = 335; // Default IM window height
|
||||||
|
var imDetachable = true; // Enable/Disable ability to detach IM windows from the application
|
||||||
|
var buddyListLoc = 1; // Default buddylist location: 0=left, 1=right (of window)
|
||||||
|
|
||||||
|
// Timeouts //
|
||||||
|
var idleTime = 15; // How long until a user goes idle from now sending any messages (in minutes).
|
||||||
|
// If 0, feature not used.
|
||||||
|
|
||||||
|
// Lingo Text-Replacement //
|
||||||
|
var useLingo = true; // Automated text replacement for messaging. Will replace typos and shorthand,
|
||||||
|
// as defined in the current language's lingo.js file, with the proper replacement
|
||||||
|
// text.
|
||||||
|
var lingoPunction = [ // Punction the can be placed at the end of a word/setence.
|
||||||
|
[" ", " "], // Format: [RegularExpression, Real]
|
||||||
|
["\\.\\.", ".."],
|
||||||
|
["\\.\\.\\.", "..."],
|
||||||
|
["\\.\\.\\.\\.", "...."],
|
||||||
|
["\\.\\.\\.\\.\\.", "....."],
|
||||||
|
["\\.", "."],
|
||||||
|
[",", ","],
|
||||||
|
[";", ";"],
|
||||||
|
["\\!", "!"],
|
||||||
|
["\\?", "?"]
|
||||||
|
];
|
||||||
|
|
||||||
|
// Buddy Icons //
|
||||||
|
var useIcons = true; // Enable/Disable use of buddy icons
|
||||||
|
var pathToIcons = './buddyicons/';// Path to buddy icons, include trailing slash.
|
||||||
|
var showInList = false; // Enable/Disable showing of buddy icons in the buddy list
|
||||||
|
var vanishingIcons = true; // Enable/Disable the hiding of the buddy icons in a chat
|
||||||
|
var vanishingSpeed = 10000; // Show the buddy icon for X amount until it is hidden (in milliseconds).
|
||||||
|
var defaultIcon = ''; // Location of image to use when no buddy icon is availible
|
||||||
|
// If blank, no default icon is used
|
||||||
|
|
||||||
|
|
||||||
|
// Messaging History //
|
||||||
|
var imHistory = true; // Retain conversations with buddies throughout the session?
|
||||||
|
// How it works: If an IM window is closed an imHistory is true,
|
||||||
|
// next time that IM window is opened (during the same session!),
|
||||||
|
// the old chat text will be there
|
||||||
|
|
||||||
|
// Chatrooms //
|
||||||
|
var predefRooms = []; // Define preset rooms that will always exist when a user views the "Join Room" list.
|
||||||
|
// Format: ['room1', 'room2', ...]
|
||||||
|
|
||||||
|
// Timestamp Format //
|
||||||
|
// This is the timestamp format used to note when an IM was received.
|
||||||
|
/* M = month, Jan - Dec
|
||||||
|
* m = month, 01 - 12, with prepended 0 (01, 02, ...)
|
||||||
|
* u = month, 1 - 12, without prepended 0 (1, 2, ...)
|
||||||
|
* d = day, 01 - 31, with prepended 0 (01, 02, ...)
|
||||||
|
* x = day, 1 - 31, without prepended 0 (1, 2, ...)
|
||||||
|
* Y = year, 4 digits (eg: 2008)
|
||||||
|
* y = year, 2 digits (eg: 08)
|
||||||
|
* H = hours, 24-hour format with prepended 0 (01, 02, ...)
|
||||||
|
* h = hours, 12-hour format without prepended 0 (1, 2, ...)
|
||||||
|
* Q = hours, 24-hour format without prepended 0 (1, 2, ...)
|
||||||
|
* q = hours, 12-hour format with prepended 0 (01, 02, ...)
|
||||||
|
* i = minutes
|
||||||
|
* s = seconds
|
||||||
|
* a = am/pm
|
||||||
|
* A = AM/PM
|
||||||
|
*/
|
||||||
|
var timestamp = '[h:i:s a]';
|
||||||
@@ -0,0 +1,146 @@
|
|||||||
|
///////////////////////////////////
|
||||||
|
// ajax im 3.41 //
|
||||||
|
// AJAX Instant Messenger //
|
||||||
|
// Copyright (c) 2006-2008 //
|
||||||
|
// http://www.ajaxim.com/ //
|
||||||
|
// Do not remove this notice //
|
||||||
|
///////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handle all right-click menus for buddy list
|
||||||
|
*
|
||||||
|
* @author Benjamin Hutchins
|
||||||
|
**/
|
||||||
|
var Context = {
|
||||||
|
currentUser: null, // current user that the menu is being shown for
|
||||||
|
lastClicked: null, // last user that was right-clicked
|
||||||
|
|
||||||
|
/**
|
||||||
|
* On window load, apply new observes
|
||||||
|
*
|
||||||
|
* @author Benjamin Hutchins
|
||||||
|
**/
|
||||||
|
loaded: function() {
|
||||||
|
if (typeof document.oncontextmenu != 'undefined') {
|
||||||
|
document.oncontextmenu = Context.oncontextmenu;
|
||||||
|
} else {
|
||||||
|
window.oncontextmenu = Context.oncontextmenu;
|
||||||
|
}
|
||||||
|
|
||||||
|
document.onmousedown = window.onmousedown = Context.onmousedown;
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* onClick of 'Get Info', open the users' profile.
|
||||||
|
*
|
||||||
|
* @author Benjamin Hutchins
|
||||||
|
**/
|
||||||
|
profile: function() {
|
||||||
|
$('divContext').style.display = 'none';
|
||||||
|
if(typeof(Profile.windows[Context.currentUser]) == 'undefined') {
|
||||||
|
Profile.create(Context.currentUser, Context.currentUser);
|
||||||
|
} else {
|
||||||
|
if(!Profile.windows[Context.currentUser].isVisible()) {
|
||||||
|
Profile.windows[Context.currentUser].show();
|
||||||
|
Profile.windows[Context.currentUser].toFront();
|
||||||
|
} else {
|
||||||
|
Profile.windows[Context.currentUser].toFront();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* onClick of 'IM', open the conversation window with the user.
|
||||||
|
*
|
||||||
|
* @author Benjamin Hutchins
|
||||||
|
**/
|
||||||
|
createIM: function() {
|
||||||
|
$('divContext').style.display = 'none';
|
||||||
|
if(typeof(IM.windows[Context.currentUser]) == 'undefined') {
|
||||||
|
IM.create(Context.currentUser, Context.currentUser);
|
||||||
|
} else {
|
||||||
|
if(IM.windows[Context.currentUser].detached) {
|
||||||
|
if(IM.windows[Context.currentUser].popup.closed) {
|
||||||
|
IM.windows[Context.currentUser] = IM.windows[Context.currentUser].old;
|
||||||
|
IM.windows[Context.currentUser].show();
|
||||||
|
} else {
|
||||||
|
IM.windows[Context.currentUser].popup.focus();
|
||||||
|
}
|
||||||
|
} else if(!IM.windows[Context.currentUser].isVisible()) {
|
||||||
|
IM.windows[Context.currentUser].show();
|
||||||
|
IM.windows[Context.currentUser].toFront();
|
||||||
|
setTimeout("scrollToBottom('" + IM.windows[Context.currentUser].getId() + "_rcvd')", 125);
|
||||||
|
setTimeout("$('" + IM.windows[Context.currentUser].getId() + "_sendBox').focus();", 250);
|
||||||
|
} else {
|
||||||
|
IM.windows[Context.currentUser].toFront();
|
||||||
|
setTimeout("$('" + IM.windows[Context.currentUser].getId() + "_sendBox').focus();", 250);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* onClick of 'Block' or 'Unblock', toggle the user's blocked status.
|
||||||
|
*
|
||||||
|
* @author Benjamin Hutchins
|
||||||
|
**/
|
||||||
|
blockBuddy: function() {
|
||||||
|
$('divContext').style.display = 'none';
|
||||||
|
Dialogs.blockBuddy(Context.currentUser);
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* onClick of 'Remove', remove the user from the friend's list.
|
||||||
|
*
|
||||||
|
* @author Benjamin Hutchins
|
||||||
|
**/
|
||||||
|
removeBuddy: function() {
|
||||||
|
$('divContext').style.display = 'none';
|
||||||
|
Dialogs.removeBuddy(Context.currentUser);
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Global onContextMenu handler
|
||||||
|
*
|
||||||
|
* @author Benjamin Hutchins
|
||||||
|
**/
|
||||||
|
oncontextmenu: function (event) {
|
||||||
|
if (loggedIn && Context.lastClicked != null) {
|
||||||
|
event = event || window.event;
|
||||||
|
|
||||||
|
Context.currentUser = Context.lastClicked;
|
||||||
|
var scrollTop = document.body.scrollTop ? document.body.scrollTop : document.documentElement.scrollTop;
|
||||||
|
var scrollLeft = document.body.scrollLeft ? document.body.scrollLeft : document.documentElement.scrollLeft;
|
||||||
|
|
||||||
|
$('divContext').style.display = 'none';
|
||||||
|
var group = Buddylist.listObjects[Context.currentUser].group;
|
||||||
|
$('contextBlock').innerHTML = (typeof Buddylist.list[group] != 'undefined' && Buddylist.list[group][Context.currentUser].blocked == true ? Languages.get('contextUnblock') : Languages.get('contextBlock'));
|
||||||
|
Element.setStyle($('divContext'), {
|
||||||
|
left: (event.clientX + scrollLeft - 5) + 'px',
|
||||||
|
top: (event.clientY + scrollTop - 5) + 'px',
|
||||||
|
zIndex: Windows.maxZIndex + 20,
|
||||||
|
display: 'block'
|
||||||
|
});
|
||||||
|
|
||||||
|
Context.lastClicked = null;
|
||||||
|
return false;
|
||||||
|
} else if ($('divContext')) {
|
||||||
|
$('divContext').style.display = 'none';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Global onMouseDown handler, hide right-click menu,
|
||||||
|
* as long as it wasn't a right click.
|
||||||
|
*
|
||||||
|
* @author Benjamin Hutchins
|
||||||
|
**/
|
||||||
|
onmousedown: function (event) {
|
||||||
|
if (loggedIn) {
|
||||||
|
event = event || window.event;
|
||||||
|
if (event.button != 2 && event.button != 3) {
|
||||||
|
setTimeout("$('divContext').style.display='none';", 100);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -0,0 +1,405 @@
|
|||||||
|
///////////////////////////////////
|
||||||
|
// ajax im 3.41 //
|
||||||
|
// AJAX Instant Messenger //
|
||||||
|
// Copyright (c) 2006-2008 //
|
||||||
|
// http://www.ajaxim.com/ //
|
||||||
|
// Do not remove this notice //
|
||||||
|
///////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Dialog and windows class
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
var Dialogs = {
|
||||||
|
/**
|
||||||
|
* Display login modal
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
login: function() {
|
||||||
|
clearInputs();
|
||||||
|
$('login_error_msg').innerHTML = '';
|
||||||
|
this.mainDialogShow('login');
|
||||||
|
this.currentMainDialog = 'login';
|
||||||
|
setTimeout("try { $('username').focus(); } catch(e) { }", 1125);
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Display register modal
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
register: function() {
|
||||||
|
clearInputs();
|
||||||
|
$('register_error_msg').innerHTML = '';
|
||||||
|
Dialogs.mainDialogShow('register');
|
||||||
|
this.currentMainDialog = 'register';
|
||||||
|
setTimeout("try { $('newusername').focus(); } catch(e) { }", 505);
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Display forgot password modal
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
forgotPass: function() {
|
||||||
|
clearInputs();
|
||||||
|
$('forgotpass_error_msg').innerHTML = '';
|
||||||
|
Dialogs.mainDialogShow('forgotPass');
|
||||||
|
this.currentMainDialog = 'forgotPass';
|
||||||
|
setTimeout("try { $('resetto').focus(); } catch(e) { }", 505);
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Display main dialog
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
mainDialogShow: function(dialog) {
|
||||||
|
if(this.currentMainDialog) Element.setStyle(this.currentMainDialog + 'Dialog', {'display': 'none'});
|
||||||
|
Element.setStyle(dialog + 'Dialog', {'display': 'block'});
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* New IM window, or IM Anyone. Displays a window to enter a
|
||||||
|
* username in attempt to message a new friend.
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
newIM: function() {
|
||||||
|
var newIMWin;
|
||||||
|
if($('newIM')) {
|
||||||
|
Windows.getWindow('newIM').toFront();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
newIMWin = new Window({id: 'newIM', className: "dialog", width: 240, height: 120, resizable: false, title: Languages.get('newIM'), draggable: true, closable: true, maximizable: false, minimizable: false, detachable: false, minWidth: 240, minHeight: 120, showEffectOptions: {duration: 0}, hideEffectOptions: {duration: 0}});
|
||||||
|
|
||||||
|
newIMWin.setConstraint(true, {left: 0, right: 0, top: 0, bottom: 0});
|
||||||
|
|
||||||
|
newIMWin.getContent().innerHTML = '<div class="dialog_info lang-newIMPlease langinsert-clear" style="padding:3px;">' + Languages.get('newIMPlease') + '</div> \
|
||||||
|
<span id="newim_error_msg" class="errorMsg"> </span> \
|
||||||
|
<div id="newim_box" style="padding-left:30px;width:100%;"> \
|
||||||
|
<div style="display:block;float:left;margin-right:5px;padding-top:4px;">' + Languages.get('username') + ':</div><input type="text" style="width:120px;" id="sendto" name="sendto" onkeypress="handleInput(event, function() { IM.newIMWindow(); })" /> \
|
||||||
|
</div> \
|
||||||
|
<div id="newim_buttons">' +
|
||||||
|
ButtonCtl.create(Languages.get('openIM'), 'IM.newIMWindow();') +
|
||||||
|
ButtonCtl.create(Languages.get('cancel'), 'Windows.close(\'newIM\');') +
|
||||||
|
'</div>';
|
||||||
|
|
||||||
|
$('newim_buttons').setStyle({position: 'absolute', top: '110px', left: '25px'});
|
||||||
|
newIMWin.setDestroyOnClose();
|
||||||
|
newIMWin.showCenter();
|
||||||
|
setTimeout("$('sendto').focus();", 125);
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Display a window that will allow the user
|
||||||
|
* to enter a name for a chat room to be created.
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
newRoom: function() {
|
||||||
|
var newRoomWin;
|
||||||
|
if($('newRoom')) {
|
||||||
|
Windows.getWindow('newRoom').toFront();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
newRoomWin = new Window({id: 'newRoom', className: "dialog", width: 240, height: 300, resizable: false, title: Languages.get('newRoom'), draggable: true, closable: true, maximizable: false, minimizable: false, detachable: false, minWidth: 240, minHeight: 120, showEffectOptions: {duration: 0}, hideEffectOptions: {duration: 0}});
|
||||||
|
|
||||||
|
newRoomWin.setConstraint(true, {left: 0, right: 0, top: 0, bottom: 0});
|
||||||
|
|
||||||
|
newRoomWin.getContent().innerHTML = '<div class="dialog_info lang-newRoomPlease langinsert-clear" style="padding:3px;">' + Languages.get('newRoomPlease') + '</div> \
|
||||||
|
<span id="newroom_error_msg" class="errorMsg"> </span> \
|
||||||
|
<div id="newroom_box" style="padding-left:25px;width:100%;"> \
|
||||||
|
<div style="display:block;margin-right:5px;padding-top:4px;" class="lang-roomname langinsert-replace">' + Languages.get('roomname') + ':</div><input type="text" style="width:187px;margin-left:0px;" id="roomname" name="roomname" onkeypress="handleInput(event, function() {Chatroom.join($(\'roomname\').value); }, function(){$(\'roomname\').value = $(\'roomname\').value.toLowerCase();})" /> \
|
||||||
|
<div id="newroom_room_list"></div> \
|
||||||
|
</div> \
|
||||||
|
<div id="newroom_buttons">' +
|
||||||
|
ButtonCtl.create(Languages.get('joinRoom'), 'Chatroom.join($(\'roomname\').value);') +
|
||||||
|
ButtonCtl.create(Languages.get('cancel'), 'Windows.close(\'newRoom\');') +
|
||||||
|
'</div>';
|
||||||
|
|
||||||
|
$('newroom_buttons').setStyle({position: 'absolute', top: '290px', left: '25px'});
|
||||||
|
|
||||||
|
ChatroomList.get($('newroom_room_list'));
|
||||||
|
|
||||||
|
newRoomWin.setDestroyOnClose();
|
||||||
|
newRoomWin.showCenter();
|
||||||
|
setTimeout("$('roomname').focus();", 125);
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Display a window to allow the user to enter another
|
||||||
|
* buddy's username and a group name to have the user added
|
||||||
|
* to the user's buddylist.
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
newBuddy: function() {
|
||||||
|
var newBuddyWin;
|
||||||
|
if($('newBuddy')) {
|
||||||
|
Windows.getWindow('newBuddy').toFront();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
newBuddyWin = new Window({id: 'newBuddy', className: "dialog", width: 240, height: 160, resizable: false, title: Languages.get('newBuddy'), draggable: true, closable: true, maximizable: false, minimizable: false, detachable: false, minWidth: 240, minHeight: 120, showEffectOptions: {duration: 0}, hideEffectOptions: {duration: 0}});
|
||||||
|
|
||||||
|
newBuddyWin.setConstraint(true, {left: 0, right: 0, top: 0, bottom: 0});
|
||||||
|
|
||||||
|
newBuddyWin.getContent().innerHTML = '<div class="dialog_info" style="padding:3px;">' + Languages.get('newBuddyPlease') + '</div> \
|
||||||
|
<span id="newbuddy_error_msg" class="errorMsg"> </span> \
|
||||||
|
<div id="newbuddy_box" style="padding-left:22px;width:100%;"> \
|
||||||
|
<div style="display:block;float:left;margin-right:24px;padding-top:4px;">' + Languages.get('username') + ':</div><input type="text" style="width:110px;" id="newBuddyUsername" name="newBuddyUsername" onkeypress="handleInput(event, function() { Buddylist.addNewBuddy($(\'newBuddyUsername\').value, $(\'newBuddyGroup\').value); })" /><br /> \
|
||||||
|
<div style="display:block;float:left;margin-right:5px;padding-top:4px;">' + Languages.get('addtogroup') + ':</div><input type="text" style="width:110px;" id="newBuddyGroup" name="newBuddyGroup" value="Friends" onfocus="this.select();" onkeypress="handleInput(event, function() { Buddylist.addNewBuddy($(\'newBuddyUsername\').value, $(\'newBuddyGroup\').value); })" /> \
|
||||||
|
</div> \
|
||||||
|
<div id="newbuddy_buttons">' +
|
||||||
|
ButtonCtl.create(Languages.get('add'), 'Buddylist.addNewBuddy($(\'newBuddyUsername\').value, $(\'newBuddyGroup\').value);') +
|
||||||
|
ButtonCtl.create(Languages.get('cancel'), 'Windows.close(\'newBuddy\');') +
|
||||||
|
'</div>';
|
||||||
|
|
||||||
|
$('newbuddy_buttons').setStyle({position: 'absolute', top: '150px', left: '25px'});
|
||||||
|
|
||||||
|
newBuddyWin.setDestroyOnClose();
|
||||||
|
newBuddyWin.showCenter();
|
||||||
|
setTimeout("$('newBuddyUsername').focus();", 125);
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Display a window to confirm the removal of a buddy.
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
* @update Benjamin Hutchins
|
||||||
|
**/
|
||||||
|
removeBuddy: function(username) {
|
||||||
|
var delBuddyWin;
|
||||||
|
|
||||||
|
if (typeof username == 'undefined')
|
||||||
|
var username = curSelected;
|
||||||
|
|
||||||
|
if(username == '' || username.length == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if($('delBuddy')) {
|
||||||
|
Windows.getWindow('delBuddy').toFront();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
delBuddyWin = new Window({id: 'delBuddy', className: "dialog", width: 240, height: 70, resizable: false, title: Languages.get('removeBuddy'), draggable: true, closable: true, maximizable: false, minimizable: false, detachable: false, minWidth: 240, minHeight:70, showEffectOptions: {duration: 0}, hideEffectOptions: {duration: 0}});
|
||||||
|
|
||||||
|
delBuddyWin.setConstraint(true, {left: 0, right: 0, top: 0, bottom: 0});
|
||||||
|
|
||||||
|
delBuddyWin.getContent().innerHTML = '<div class="dialog_info" style="padding:3px;">' + Languages.get('removeBuddyAreYouSure').replace('%1', username) + '</div> \
|
||||||
|
<div id="delbuddy_buttons">' +
|
||||||
|
ButtonCtl.create(Languages.get('ok'), 'Buddylist.deleteBuddy(\'' + username + '\');Windows.close(\'delBuddy\');') +
|
||||||
|
ButtonCtl.create(Languages.get('cancel'), 'Windows.close(\'delBuddy\');') +
|
||||||
|
'</div>';
|
||||||
|
|
||||||
|
$('delbuddy_buttons').setStyle({position: 'absolute', top: '60px', left: '25px'});
|
||||||
|
|
||||||
|
delBuddyWin.setDestroyOnClose();
|
||||||
|
delBuddyWin.showCenter();
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Display a window to confirm the blocking/unblocking
|
||||||
|
* of a buddy.
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
blockBuddy: function(buddy) {
|
||||||
|
var blockBuddyWin;
|
||||||
|
|
||||||
|
if($('blockBuddy')) {
|
||||||
|
Windows.getWindow('blockBuddy').toFront();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
blockBuddyWin = new Window({id: 'blockBuddy', className: "dialog", width: 240, height: 70, resizable: false, title: Languages.get('blockBuddy'), draggable: true, closable: true, maximizable: false, minimizable: false, detachable: false, minWidth: 240, minHeight:70, showEffectOptions: {duration: 0}, hideEffectOptions: {duration: 0}});
|
||||||
|
|
||||||
|
blockBuddyWin.setConstraint(true, {left: 0, right: 0, top: 0, bottom: 0});
|
||||||
|
|
||||||
|
blockBuddyWin.getContent().innerHTML = '<div class="dialog_info" style="padding:3px;">' + (Buddylist.blocked.inArray(buddy) ? Languages.get('unblockBuddyAreYouSure').replace('%1', buddy) : Languages.get('blockBuddyAreYouSure').replace('%1', buddy)) + '</div> \
|
||||||
|
<div id="blockbuddy_buttons">' +
|
||||||
|
ButtonCtl.create(Languages.get('ok'), 'Buddylist.blockBuddy(\'' + buddy + '\');Windows.close(\'blockBuddy\');') +
|
||||||
|
ButtonCtl.create(Languages.get('cancel'), 'Windows.close(\'blockBuddy\');') +
|
||||||
|
'</div>';
|
||||||
|
|
||||||
|
$('blockbuddy_buttons').setStyle({position: 'absolute', top: '60px', left: '25px'});
|
||||||
|
|
||||||
|
blockBuddyWin.setDestroyOnClose();
|
||||||
|
blockBuddyWin.showCenter();
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Display a window to confirm the removal of an
|
||||||
|
* entire buddy group.
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
removeGroup: function(group) {
|
||||||
|
var delGroupWin;
|
||||||
|
if($('delGroup')) {
|
||||||
|
Windows.getWindow('delGroup').toFront();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
delGroupWin = new Window({id: 'delGroup', className: "dialog", width: 240, height: 70, resizable: false, title: Languages.get('removeGroup'), draggable: true, closable: true, maximizable: false, minimizable: false, detachable: false, minWidth: 240, minHeight:70, showEffectOptions: {duration: 0}, hideEffectOptions: {duration: 0}});
|
||||||
|
|
||||||
|
delGroupWin.setConstraint(true, {left: 0, right: 0, top: 0, bottom: 0});
|
||||||
|
|
||||||
|
delGroupWin.getContent().innerHTML = '<div class="dialog_info" style="padding:3px;">' + Languages.get('removeGroupAreYouSure').replace('%1', group) + '</div> \
|
||||||
|
<div id="delgroup_buttons">' +
|
||||||
|
ButtonCtl.create(Languages.get('ok'), 'Buddylist.deleteGroup(\'' + group + '\');Windows.close(\'delGroup\');') +
|
||||||
|
ButtonCtl.create(Languages.get('cancel'), 'Windows.close(\'delGroup\');') +
|
||||||
|
'</div>';
|
||||||
|
|
||||||
|
$('delgroup_buttons').setStyle({position: 'absolute', top: '60px', left: '25px'});
|
||||||
|
|
||||||
|
delGroupWin.setDestroyOnClose();
|
||||||
|
delGroupWin.showCenter();
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Display a window to show the available settings
|
||||||
|
* that the user can change.
|
||||||
|
*
|
||||||
|
* @author Benjamin Hutchins
|
||||||
|
**/
|
||||||
|
changeSettings: function() {
|
||||||
|
var changeSettings;
|
||||||
|
if($('changeSettings')) {
|
||||||
|
Windows.getWindow('changeSettings').toFront();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
changeSettings = new Window({id: 'changeSettings', className: "dialog", width: 300, height: 160, resizable: false, title: Languages.get('changeSettings'), draggable: true, closable: true, maximizable: false, minimizable: false, detachable: false, minWidth: 240, minHeight: 150, showEffectOptions: {duration: 0}, hideEffectOptions: {duration: 0}});
|
||||||
|
|
||||||
|
changeSettings.setConstraint(true, {left: 0, right: 0, top: 0, bottom: 0});
|
||||||
|
|
||||||
|
changeSettings.getContent().innerHTML = '<div class="dialog_info lang-changeSettingsInstructions langinsert-clear" style="padding:3px;">' + Languages.get('changeSettingsInstructions') + '</div> \
|
||||||
|
<div id="changesettings_buttons">' +
|
||||||
|
ButtonCtl.create(Languages.get('changeSettingsPassword'), 'Dialogs.changePass();if($(\'changeSettings\')){Windows.close(\'changeSettings\');}') +
|
||||||
|
ButtonCtl.create(Languages.get('changeSettingsProfile'), 'Dialogs.changeProfile();if($(\'changeSettings\')){Windows.close(\'changeSettings\');}') +
|
||||||
|
(useIcons ? ButtonCtl.create(Languages.get('changeSettingsBuddyicon'), 'Dialogs.changeIcon();if($(\'changeSettings\')){Windows.close(\'changeSettings\');}') : '') +
|
||||||
|
ButtonCtl.create(Languages.get('cancel'), 'Windows.close(\'changeSettings\');') +
|
||||||
|
'</div>';
|
||||||
|
|
||||||
|
$('changesettings_buttons').setStyle({position: 'absolute', top: '60px', left: '85px'});
|
||||||
|
|
||||||
|
changeSettings.setDestroyOnClose();
|
||||||
|
changeSettings.showCenter();
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Display a window to allow the user to change
|
||||||
|
* their buddy profile.
|
||||||
|
*
|
||||||
|
* @author Benjamin Hutchins
|
||||||
|
**/
|
||||||
|
changeProfile: function() {
|
||||||
|
var changeProfileWin;
|
||||||
|
if($('changeProfile')) {
|
||||||
|
Windows.getWindow('changeProfile').toFront();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
changeProfileWin = new Window({id: 'changeProfile', className: "dialog", width: 300, height: 250, resizable: false, title: Languages.get('changeProfile'), draggable: true, closable: true, maximizable: false, minimizable: false, detachable: false, minWidth: 240, minHeight: 240, showEffectOptions: {duration: 0}, hideEffectOptions: {duration: 0}});
|
||||||
|
changeProfileWin.setConstraint(true, {left: 0, right: 0, top: 0, bottom: 0});
|
||||||
|
changeProfileWin.getContent().innerHTML = '<div class="dialog_info lang-changeProfileInstructions langinsert-clear" style="padding:3px;">' + Languages.get('changeProfileInstructions') + '</div> \
|
||||||
|
<span id="changeprofile_error_msg" class="errorMsg"> </span> \
|
||||||
|
<textarea style="width:97%;height:150px;" id="changeprofile_textarea"></textarea> \
|
||||||
|
<div id="changeprofile_buttons">' +
|
||||||
|
ButtonCtl.create(Languages.get('change'), 'System.changeProfile();') +
|
||||||
|
ButtonCtl.create(Languages.get('cancel'), 'Windows.close(\'changeProfile\');') +
|
||||||
|
'</div>';
|
||||||
|
|
||||||
|
$('changeprofile_buttons').setStyle({position: 'absolute', top: '245px', left: '55px'});
|
||||||
|
|
||||||
|
var xhConn = new XHConn();
|
||||||
|
xhConn.connect(pingTo, "POST", "call=getprofile&user="+user,
|
||||||
|
function(xh) {
|
||||||
|
$('changeprofile_textarea').value = xh.responseText;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
changeProfileWin.setDestroyOnClose();
|
||||||
|
changeProfileWin.showCenter();
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Display a window to allow the user to upload
|
||||||
|
* a new buddy icon.
|
||||||
|
*
|
||||||
|
* @author Benjamin Hutchins
|
||||||
|
**/
|
||||||
|
changeIcon: function () {
|
||||||
|
if(!useIcons) return;
|
||||||
|
|
||||||
|
var changeIconWin;
|
||||||
|
if($('changeIcon')) {
|
||||||
|
Windows.getWindow('changeIcon').toFront();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
changeIconWin = new Window({id: 'changeIcon', className: "dialog", width: 300, height: 160, resizable: false, title: Languages.get('changeBuddyicon'), draggable: true, closable: true, maximizable: false, minimizable: false, detachable: false, minWidth: 240, minHeight: 120, showEffectOptions: {duration: 0}, hideEffectOptions: {duration: 0}});
|
||||||
|
|
||||||
|
changeIconWin.setConstraint(true, {left: 0, right: 0, top: 0, bottom: 0});
|
||||||
|
|
||||||
|
changeIconWin.getContent().innerHTML = '<div class="dialog_info lang-changeBuddyiconInstructions langinsert-clear" style="padding:3px;">' + Languages.get('changeBuddyiconInstructions') + '</div> \
|
||||||
|
<span id="changeicon_error_msg" class="errorMsg"> </span> \
|
||||||
|
<form target="changeicon_iframe" id="changeicon_form" enctype="multipart/form-data" method="post" action="' + pingTo + '"> \
|
||||||
|
<input type="hidden" name="call" value="changeicon" style="display:none;" /> \
|
||||||
|
<input id="changeicon_input_file" type="file" name="icon" /> \
|
||||||
|
<div id="changeicon_buttons">' +
|
||||||
|
ButtonCtl.createSubmit(Languages.get('change')) +
|
||||||
|
ButtonCtl.create(Languages.get('cancel'), 'Windows.close(\'changeIcon\');') +
|
||||||
|
'</form>' +
|
||||||
|
'<iframe src="about:blank" onload="System.changeIcon()" style="display:none" id="changeicon_iframe" name="changeicon_iframe"></iframe>' +
|
||||||
|
'</div>';
|
||||||
|
|
||||||
|
$('changeicon_buttons').setStyle({position: 'absolute', top: '150px', left: '55px'});
|
||||||
|
|
||||||
|
changeIconWin.setDestroyOnClose();
|
||||||
|
changeIconWin.showCenter();
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Display a window to allow the user to change
|
||||||
|
* their password.
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
changePass: function() {
|
||||||
|
var changePassWin;
|
||||||
|
if($('changePass')) {
|
||||||
|
Windows.getWindow('changePass').toFront();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
changePassWin = new Window({id: 'changePass', className: "dialog", width: 300, height: 160, resizable: false, title: Languages.get('changePassword'), draggable: true, closable: true, maximizable: false, minimizable: false, detachable: false, minWidth: 240, minHeight: 120, showEffectOptions: {duration: 0}, hideEffectOptions: {duration: 0}});
|
||||||
|
|
||||||
|
changePassWin.setConstraint(true, {left: 0, right: 0, top: 0, bottom: 0});
|
||||||
|
|
||||||
|
changePassWin.getContent().innerHTML = '<div class="dialog_info lang-changePasswordInstructions langinsert-clear" style="padding:3px;">' + Languages.get('changePasswordInstructions') + '</div> \
|
||||||
|
<span id="changepass_error_msg" class="errorMsg"> </span> \
|
||||||
|
<div id="changepass_box" style="padding-left:12px;width:100%;"> \
|
||||||
|
<div style="display:block;float:left;margin-right:5px;padding-top:4px;" class="lang-currentPassword langinsert-replace">' + Languages.get('currentPassword') + ':</div><input type="password" style="width:110px;" id="currentpw" name="currentpw" onkeypress="handleInput(event, function() { System.changePass(); })" /><br /> \
|
||||||
|
<div style="display:block;float:left;margin-right:20px;padding-top:4px;" class="lang-currentPassword langinsert-replace">' + Languages.get('newPassword') + ':</div><input type="password" style="width:110px;" id="newpw" name="newpw" onkeypress="handleInput(event, function() { changePass(); })" /> \
|
||||||
|
<div style="display:block;float:left;margin-right:4px;padding-top:4px;" class="lang-currentPassword langinsert-replace">' + Languages.get('confirmPassword') + ':</div><input type="password" style="width:110px;" id="confirmpw" name="confirmpw" onkeypress="handleInput(event, function() { System.changePass(); })" /> \
|
||||||
|
</div> \
|
||||||
|
<div id="changepass_buttons">' +
|
||||||
|
ButtonCtl.create(Languages.get('change'), 'System.changePass();') +
|
||||||
|
ButtonCtl.create(Languages.get('cancel'), 'Windows.close(\'changePass\');') +
|
||||||
|
'</div>';
|
||||||
|
|
||||||
|
$('changepass_buttons').setStyle({position: 'absolute', top: '150px', left: '55px'});
|
||||||
|
|
||||||
|
changePassWin.setDestroyOnClose();
|
||||||
|
changePassWin.showCenter();
|
||||||
|
setTimeout("$('currentpw').focus();", 125);
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -0,0 +1,584 @@
|
|||||||
|
///////////////////////////////////
|
||||||
|
// ajax im 3.41 //
|
||||||
|
// AJAX Instant Messenger //
|
||||||
|
// Copyright (c) 2006-2008 //
|
||||||
|
// http://www.ajaxim.com/ //
|
||||||
|
// Do not remove this notice //
|
||||||
|
///////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* AjaxIM Class
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
var AjaxIM = {
|
||||||
|
windows: {}, // JavaScript object to hold all IM windows
|
||||||
|
sendBoxWithFocus: null, // current box that has focus
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create new IM window
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
* @update Benjamin Hutchins
|
||||||
|
**/
|
||||||
|
create: function(name, imTitle) {
|
||||||
|
var buddyicon = typeof Buddylist.listObjects[name] == 'undefined' ? 'none' : Buddylist.listObjects[name].icon;
|
||||||
|
var iconsrc = (buddyicon=='none'?defaultIcon:pathToIcons+name+'.'+buddyicon);
|
||||||
|
var imLeft = Math.round(Math.random()*(Browser.width()-360))+'px';
|
||||||
|
var imTop = Math.round(Math.random()*(Browser.height()-400))+'px';
|
||||||
|
|
||||||
|
var winId = randomString(32) + '_im';
|
||||||
|
|
||||||
|
this.windows[name] = new IMWindow({id: winId, className: "dialog", width: 320, height: 335, top: imTop, left: imLeft, resizable: true, title: imTitle, draggable: true, detachable: imDetachable, minWidth: 320, minHeight: 150, showEffectOptions: {duration: 0}, hideEffectOptions: {duration: 0}});
|
||||||
|
|
||||||
|
this.windows[name].setConstraint(true, {left: 0, right: 0, top: 0, bottom: 0});
|
||||||
|
|
||||||
|
this.windows[name].getContent().innerHTML = '<div class="userToolbar" id="' + winId + '_userFuncs">' +
|
||||||
|
'<img src="themes/'+theme+'/window/addbuddy.png" class="toolbarButton" onclick="Dialogs.newBuddy();$(\'newBuddyUsername\').value=\'' + name + '\'" alt="' + Languages.get('addBuddyButton') + '" title="' + Languages.get('addBuddyButton') + '" onmouseover="buttonHover(this);" onmouseout="buttonNormal(this);" onmousedown="buttonDown(this);" onmouseup="buttonNormal(this);" /> ' +
|
||||||
|
'<img src="themes/'+theme+'/window/block.png" class="toolbarButton" onclick="Dialogs.blockBuddy(\'' + name + '\');" alt="" title="" onmouseover="buttonHover(this);" onmouseout="buttonNormal(this);" onmousedown="buttonDown(this);" onmouseup="buttonNormal(this);" />' +
|
||||||
|
'</div>' +
|
||||||
|
(useIcons?(defaultIcon==""&&buddyicon=="none"?'':'<img src="'+iconsrc+'" id="buddyIcon_'+name+'" alt="Buddy Icon" class="buddyIcon" onmouseover="IM.buddyIconHover(this);" onmouseout="IM.buddyIconNormal(this);" />'):'') +
|
||||||
|
'<div class="rcvdMessages" id="' + winId + '_rcvd"></div>' + "\n" +
|
||||||
|
'<div class="imToolbar" id="' + winId + '_toolbar" onmousemove="return false;" onselectstart="return false;"><img src="themes/'+theme+'/window/bold_off.png" onmouseover="buttonHover(this);" onmouseout="buttonNormal(this);" onclick="IM.windows[\'' + name + '\'].toggleBold();" onmousedown="return false;" alt="' + Languages.get('bold') + '" id="' + winId + '_bold" /> ' +
|
||||||
|
'<img src="themes/'+theme+'/window/italic_off.png" onmouseover="buttonHover(this);" onmouseout="buttonNormal(this);" onclick="IM.windows[\'' + name + '\'].toggleItalic();" onmousedown="return false;" alt="' + Languages.get('italic') + '" id="' + winId + '_italic" /> '+
|
||||||
|
'<img src="themes/'+theme+'/window/underline_off.png" onmouseover="buttonHover(this);" onmouseout="buttonNormal(this);" onclick="IM.windows[\'' + name + '\'].toggleUnderline();" onmousedown="return false;" alt="' + Languages.get('underline') + '" id="' + winId + '_underline" /></div>' +
|
||||||
|
' <a href="#" class="setFontLink" id="' + winId + '_setFont" onclick="IM.windows[\'' + name + '\'].toggleFontList();return false;" onselectstart="return false;">Tahoma</a>' +
|
||||||
|
' <a href="#" class="setFontSizeLink" id="' + winId + '_setFontSize" onclick="IM.windows[\'' + name + '\'].toggleFontSizeList();return false;" onselectstart="return false;">12</a>' +
|
||||||
|
' <a href="#" class="setFontColorLink" id="' + winId + '_setFontColor" onclick="IM.windows[\'' + name + '\'].toggleFontColorList();return false;" onselectstart="return false;"><div id="' + winId + '_setFontColorColor" style="width:14px;height:14px;display:block;"></div></a>' +
|
||||||
|
' <a href="#" class="insertEmoticonLink" id="' + winId + '_insertEmoticon" onclick="IM.windows[\'' + name + '\'].toggleEmoticonList();return false;" onselectstart="return false;"><img src="themes/' + theme + '/emoticons/mini_smile.gif" width="14" height="14" style="border:0;" /></a>' +
|
||||||
|
"\n" + '<div style="overflow:auto;"><textarea class="inputText" id="' + winId + '_sendBox" onfocus="blinkerOn(false);IM.sendBoxWithFocus=this;" onblur="IM.sendBoxWithFocus=null;" onkeypress="return IM.windows[\'' + name + '\'].keyHandler(event);"></textarea></div>';
|
||||||
|
|
||||||
|
this.windows[name].setUsername(name);
|
||||||
|
|
||||||
|
$(winId + '_rcvd').setStyle({height: (this.windows[name].getSize().height - 135) + 'px', width: (this.windows[name].getSize().width - 10) + 'px'});
|
||||||
|
$(winId + '_toolbar').setStyle({top: (this.windows[name].getSize().height - 73) + 'px', width: (this.windows[name].getSize().width - 10) + 'px'});
|
||||||
|
$(winId + '_setFont').setStyle({top: (this.windows[name].getSize().height - 65) + 'px'});
|
||||||
|
$(winId + '_setFontSize').setStyle({top: (this.windows[name].getSize().height - 65) + 'px'});
|
||||||
|
$(winId + '_setFontColor').setStyle({top: (this.windows[name].getSize().height - 65) + 'px'});
|
||||||
|
$(winId + '_setFontColorColor').setStyle({backgroundColor: '#000'});
|
||||||
|
$(winId + '_insertEmoticon').setStyle({top: (this.windows[name].getSize().height - 65) + 'px'});
|
||||||
|
$(winId + '_sendBox').setStyle({top: (this.windows[name].getSize().height - 45) + 'px', left: '2px', width: (this.windows[name].getSize().width - 16) + 'px', fontWeight: '400', fontStyle: 'normal', textDecoration: 'none'});
|
||||||
|
|
||||||
|
this.windows[name].show();
|
||||||
|
this.windows[name].toFront();
|
||||||
|
Windows.focusedWindow = this.windows[name];
|
||||||
|
setTimeout("$('"+winId+"_sendBox').focus();", 250);
|
||||||
|
if (vanishingIcons){setTimeout("if($('buddyIcon_"+name+"')){$('buddyIcon_"+name+"').hide();}", vanishingSpeed);}
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sends a message to the server
|
||||||
|
*
|
||||||
|
* @arguments
|
||||||
|
* username - who the message is being sent to
|
||||||
|
* message - the message to send
|
||||||
|
* chatroom - (bool) is this a chatroom
|
||||||
|
* isBold - (bool) is the message bolded
|
||||||
|
* isItalic - (bool) is the message italicized
|
||||||
|
* isUnderline - (bool) is the message underlined
|
||||||
|
* fontName - font family for the message
|
||||||
|
* fontSize - font size for the message
|
||||||
|
* fontColor - font color for the message
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
sendMessage: function(username, message, chatroom, isBold, isItalic, isUnderline, fontName, fontSize, fontColor) {
|
||||||
|
var xhConn = new XHConn();
|
||||||
|
|
||||||
|
xhConn.connect(pingTo, "POST", "call=send&recipient="+username+"&chatroom="+chatroom+"&bold="+isBold+"&italic="+isItalic+"&underline="+isUnderline+"&font="+fontName+"&fontsize="+fontSize+"&fontcolor="+fontColor+"&message="+encodeURIComponent(message),
|
||||||
|
function(xh) {
|
||||||
|
var error = null;
|
||||||
|
|
||||||
|
switch(xh.responseText) {
|
||||||
|
case 'sent':
|
||||||
|
// do nothing
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'sent_offline':
|
||||||
|
error = Languages.get('notifySentButOffline');
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'not_online':
|
||||||
|
error = Languages.get('errorNotLoggedIn');
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'too_long':
|
||||||
|
error = Languages.get('errorMsgTooLong');
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'not_logged_in':
|
||||||
|
if (typeof System != 'undefined') {
|
||||||
|
System.logout();
|
||||||
|
} else {
|
||||||
|
self.opener.System.logout();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
error = Languages.get('errorUnknown');
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(chatroom == 'true')
|
||||||
|
Chatroom.windows[username].sendResult(message, isBold, isItalic, isUnderline, fontName, fontSize, fontColor, error);
|
||||||
|
else
|
||||||
|
IM.windows[username].sendResult(message, isBold, isItalic, isUnderline, fontName, fontSize, fontColor, error);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
if(audioNotify == true) soundManager.play('msg_out');
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Replaces emotes with images
|
||||||
|
*
|
||||||
|
* @arguments
|
||||||
|
* str - the message to run replaces on
|
||||||
|
* itemsList - array of emotes
|
||||||
|
**/
|
||||||
|
emoteReplace: function(str, itemsList) {
|
||||||
|
var r;
|
||||||
|
for(var s in itemsList) {
|
||||||
|
if(str.indexOf(s) > -1)
|
||||||
|
str = str.replace(new RegExp(regExpEscape(s), 'g'), '<img src="themes/' + theme + '/emoticons/' + itemsList[s] + '" alt="' + itemsList[s] + '" title="' + s + '" />');
|
||||||
|
}
|
||||||
|
return str;
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Start a new message with a user that might not be in your buddy list,
|
||||||
|
* ran via Dialogs.newIM()
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
newIMWindow: function() {
|
||||||
|
if($('sendto').value.replace(/^\s*|\s*$/g,"").length > 0) {
|
||||||
|
var toWhom = $('sendto').value;
|
||||||
|
|
||||||
|
if(typeof(this.windows[toWhom]) == 'undefined') {
|
||||||
|
this.create(toWhom, toWhom);
|
||||||
|
} else {
|
||||||
|
if(!this.windows[toWhom].isVisible()) {
|
||||||
|
this.windows[toWhom].show();
|
||||||
|
setTimeout("scrollToBottom('" + this.windows[toWhom].getId() + "_rcvd')", 125);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Windows.close('newIM');
|
||||||
|
this.windows[toWhom].toFront();
|
||||||
|
setTimeout("$('" + this.windows[toWhom].getId() + "_sendBox').focus()", 125);
|
||||||
|
} else {
|
||||||
|
$('newim_error_msg').innerHTML = Languages.get('newIMProper');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
handleClose: function(eventName, win) {
|
||||||
|
if(win.getId().indexOf('_im') == -1 && win.getId().indexOf('_chat') == -1) return;
|
||||||
|
|
||||||
|
if(typeof(win.room) !== 'undefined') Chatroom.leave(win.room);
|
||||||
|
|
||||||
|
var rcvdBox = $(win.getId() + '_rcvd');
|
||||||
|
if(imHistory == true) {
|
||||||
|
rcvdBox.innerHTML = '<span class="imHistory">' +
|
||||||
|
rcvdBox.innerHTML.replace(new RegExp('\(' + Languages.get('autoreply') + ':\)/g'), Languages.get('autoreply') + ':').replace(/<(?![Bb][Rr] ?\/?)([^>]+)>/ig, '') +
|
||||||
|
"</span>\n";
|
||||||
|
} else {
|
||||||
|
rcvdBox.innerHTML = '';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
handleMinimize: function(eventName, win) {
|
||||||
|
if(win.getId().indexOf('_im') == -1) return;
|
||||||
|
|
||||||
|
var curIM = $(win.getId() + '_rcvd');
|
||||||
|
curIM.scrollTop = curIM.scrollHeight - curIM.clientHeight + 6;
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a timestamp to use in a chat window based off the
|
||||||
|
* configuration variable 'timestamp'
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
createTimestamp: function() {
|
||||||
|
Stamp = new Date();
|
||||||
|
var tH = String(Stamp.getHours()); var ti = String(Stamp.getMinutes()); var ts = String(Stamp.getSeconds());
|
||||||
|
var th = tH > 12 ? tH - 12 : tH; var ta = tH > 12 ? 'pm' : 'am'; var tA = tH > 12 ? 'PM' : 'AM';
|
||||||
|
var td = String(Stamp.getDate()); var tm = String(Stamp.getMonth() + 1);
|
||||||
|
var tM = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'July', 'Aug', 'Sep', 'Nov', 'Dec'][tm - 1];
|
||||||
|
var tY = String(Stamp.getFullYear()); var ty = tY.substring(2);
|
||||||
|
|
||||||
|
tu = tm; tx = td; tQ = tH;
|
||||||
|
|
||||||
|
tH = (tH.length > 1) ? tH : "0"+tH; ti = (ti.length > 1) ? ti : "0"+ti;
|
||||||
|
tq = (th.length > 1) ? th : "0"+th; ts = (ts.length > 1) ? ts : "0"+ts;
|
||||||
|
td = (td.length > 1) ? td : "0"+td; tm = (tm.length > 1) ? tm : "0"+tm;
|
||||||
|
if(typeof timestamp == 'undefined') {
|
||||||
|
timestamp = self.opener.timestamp;
|
||||||
|
}
|
||||||
|
return timestamp.replace(/H/, tH).replace(/h/, th).replace(/i/, ti).replace(/s/, ts)
|
||||||
|
.replace(/d/, td).replace(/Y/, tY).replace(/y/, ty).replace(/m/, tm)
|
||||||
|
.replace(/u/, tu).replace(/x/, tx).replace(/Q/, tQ).replace(/q/, tq)
|
||||||
|
.replace(/a/, ta).replace(/A/, tA).replace(/M/, tM);
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Append status changes to chat window
|
||||||
|
*
|
||||||
|
* @author Benjamin Hutchins
|
||||||
|
**/
|
||||||
|
notifyUser: function(username, error) {
|
||||||
|
if(typeof(IM.windows[username]) != 'undefined') {
|
||||||
|
if(IM.windows[username].isVisible()) {
|
||||||
|
IM.windows[username].sendResult('', '', '', '', '', '', '', error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add effects to a buddy icon.
|
||||||
|
*
|
||||||
|
* @arguments
|
||||||
|
* el - buddy icon element
|
||||||
|
*
|
||||||
|
* @author Benjamin Hutchins
|
||||||
|
**/
|
||||||
|
buddyIconHover: function(el) {
|
||||||
|
/*var clone = new Element('img', {
|
||||||
|
'src': $(el).src,
|
||||||
|
// 'id': $(el).id + '_clone',
|
||||||
|
// 'class': 'buddyIconClone',
|
||||||
|
// 'alt': '' // valid XHTML
|
||||||
|
}).insert(Element.getOffsetParent(el), 'content'); //.setStyle({'position': 'absolute', 'top': el.offsetTop, 'left': el.offsetLeft});
|
||||||
|
//clonePosition(clone, el, {setLeft:true, setTop:true});*/
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Restore effects set by IM.buddyIconHover back to 'Normal'
|
||||||
|
*
|
||||||
|
* @arguments
|
||||||
|
* el - buddy icon element
|
||||||
|
*
|
||||||
|
* @author Benjamin Hutchins
|
||||||
|
**/
|
||||||
|
buddyIconNormal: function(el) {
|
||||||
|
if ($(el.id + '_clone')) {
|
||||||
|
$(el.id + '_clone').remove();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A class to mantain an IM Window's guts.
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
var AjaxIMWindow = Class.create();
|
||||||
|
Object.extend(AjaxIMWindow.prototype, Window.prototype);
|
||||||
|
Object.extend(AjaxIMWindow.prototype, {
|
||||||
|
/**
|
||||||
|
* Set the class' username variable
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
setUsername: function(username) {
|
||||||
|
this.username = username;
|
||||||
|
},
|
||||||
|
|
||||||
|
send: function() {
|
||||||
|
// do nothing here.
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* After a message is sent to the server via IM.sendMessage(),
|
||||||
|
* this function is ran to append the message to the user's window
|
||||||
|
*
|
||||||
|
* @arguments
|
||||||
|
* message - the message to send
|
||||||
|
* isBold - (bool) is the message bolded
|
||||||
|
* isItalic - (bool) is the message italicized
|
||||||
|
* isUnderline - (bool) is the message underlined
|
||||||
|
* fontName - font family for the message
|
||||||
|
* fontSize - font size for the message
|
||||||
|
* fontColor - font color for the message
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
* @update Benjamin Hutchins
|
||||||
|
**/
|
||||||
|
sendResult: function(message, isBold, isItalic, isUnderline, fontName, fontSize, fontColor, result) {
|
||||||
|
var winId = this.getId();
|
||||||
|
var sendBox = $(winId + '_sendBox');
|
||||||
|
var rcvdBox = $(winId + '_rcvd');
|
||||||
|
|
||||||
|
if(result != null) {
|
||||||
|
rcvdBox.innerHTML = rcvdBox.innerHTML + '<span class="imError">' + result + '</span><br>';
|
||||||
|
}
|
||||||
|
|
||||||
|
if(trim(message).length > 0) {
|
||||||
|
message = message.replace(/<br\/>/g, '\n').replace(/</g, '<').replace(/>/g, '>').replace(/<([^>]+)>/ig, '').replace(/\n/g, '<br/>').replace(/(\s|\n|>|^)(\w+:\/\/[^<\s\n]+)/, '$1<a href="$2" target="_blank">$2</a>');
|
||||||
|
message = IM.emoteReplace(message, smilies);
|
||||||
|
if(message.replace(/<([^>]+)>/ig, '').indexOf('/me') == 0)
|
||||||
|
rcvdBox.innerHTML = rcvdBox.innerHTML + "<b class=\"userA\">" + IM.createTimestamp() + " <i>" + user + ' ' + message.replace(/<([^>]+)>/ig, '').replace(/\/me/, '') + "</i></b><br>\n";
|
||||||
|
else
|
||||||
|
rcvdBox.innerHTML = rcvdBox.innerHTML + "<b class=\"userA\">" + IM.createTimestamp() + " " + user + ":</b> <span style=\"font-family:" + fontName + ",sans-serif;font-size:" + fontSize + "px;color:" + fontColor + ";\">" + (isBold == 'true' ? "<b>" : "") + (isItalic == 'true' ? "<i>" : "") + (isUnderline == 'true' ? "<u>" : "") + message + (isBold == 'true' ? "</b>" : "") + (isItalic == 'true' ? "</i>" : "") + (isUnderline == 'true' ? "</u>" : "") + "</span><br>\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
scrollToBottom(winId + '_rcvd');
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
toggleBold: function() {
|
||||||
|
var winId = this.getId();
|
||||||
|
var sendBox = $(winId + '_sendBox');
|
||||||
|
|
||||||
|
sendBox.hide(); // horrah weird Opera 9 input refresh!
|
||||||
|
if(sendBox.style.fontWeight == '400') {
|
||||||
|
$(winId + '_bold').src = 'themes/' + theme + '/window/bold_on.png';
|
||||||
|
sendBox.setStyle({fontWeight: '700'});
|
||||||
|
} else {
|
||||||
|
sendBox.setStyle({fontWeight: '400'});
|
||||||
|
$(winId + '_bold').src = 'themes/' + theme + '/window/bold_off.png';
|
||||||
|
}
|
||||||
|
sendBox.show(); // horrah weird Opera 9 input refresh!
|
||||||
|
setTimeout("$('" + winId + "_sendBox').focus();", 125);
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
toggleItalic: function() {
|
||||||
|
var winId = this.getId();
|
||||||
|
var sendBox = $(winId + '_sendBox');
|
||||||
|
|
||||||
|
sendBox.hide(); // horrah weird Opera 9 input refresh!
|
||||||
|
if(sendBox.style.fontStyle == 'normal') {
|
||||||
|
sendBox.setStyle({fontStyle: 'italic'});
|
||||||
|
$(winId + '_italic').src = 'themes/' + theme + '/window/italic_on.png';
|
||||||
|
} else {
|
||||||
|
sendBox.setStyle({fontStyle: 'normal'});
|
||||||
|
$(winId + '_italic').src = 'themes/' + theme + '/window/italic_off.png';
|
||||||
|
}
|
||||||
|
sendBox.show(); // horrah weird Opera 9 input refresh!
|
||||||
|
setTimeout("$('" + winId + "_sendBox').focus();", 125);
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
toggleUnderline: function() {
|
||||||
|
var winId = this.getId();
|
||||||
|
var sendBox = $(winId + '_sendBox');
|
||||||
|
|
||||||
|
sendBox.hide(); // horrah weird Opera 9 input refresh!
|
||||||
|
if(sendBox.style.textDecoration == 'none') {
|
||||||
|
sendBox.setStyle({textDecoration: 'underline'});
|
||||||
|
$(winId + '_underline').src = 'themes/' + theme + '/window/underline_on.png';
|
||||||
|
} else {
|
||||||
|
sendBox.setStyle({textDecoration: 'none'});
|
||||||
|
$(winId + '_underline').src = 'themes/' + theme + '/window/underline_off.png';
|
||||||
|
}
|
||||||
|
sendBox.show(); // horrah weird Opera 9 input refresh!
|
||||||
|
setTimeout("$('" + winId + "_sendBox').focus();", 125);
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
toggleFontList: function() {
|
||||||
|
var fL = $('fontsList');
|
||||||
|
var fLBtn = $(this.getId() + '_setFont');
|
||||||
|
|
||||||
|
$('emoticonList', 'fontColorList', 'fontSizeList').invoke('hide');
|
||||||
|
|
||||||
|
if($('fontsList').style.display == 'block') {
|
||||||
|
fL.hide();
|
||||||
|
} else {
|
||||||
|
fL.setStyle({left: Position.cumulativeOffset(fLBtn)[0] + 'px',
|
||||||
|
top: (Position.cumulativeOffset(fLBtn)[1] + Element.getHeight(fLBtn) - 1) + 'px',
|
||||||
|
zIndex: Windows.maxZIndex + 20,
|
||||||
|
display: 'block'});
|
||||||
|
|
||||||
|
IM.active = this;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
toggleFontSizeList: function() {
|
||||||
|
var fsL = $('fontSizeList');
|
||||||
|
var fsLBtn = $(this.getId() + '_setFontSize');
|
||||||
|
|
||||||
|
$('emoticonList', 'fontsList', 'fontColorList').invoke('hide');
|
||||||
|
|
||||||
|
if($('fontSizeList').style.display == 'block') {
|
||||||
|
$('fontSizeList').setStyle({display: 'none'});
|
||||||
|
} else {
|
||||||
|
fsL.setStyle({left: Position.cumulativeOffset(fsLBtn)[0] + 'px',
|
||||||
|
top: (Position.cumulativeOffset(fsLBtn)[1] + Element.getHeight(fsLBtn) - 1) + 'px',
|
||||||
|
zIndex: Windows.maxZIndex + 20,
|
||||||
|
display: 'block'});
|
||||||
|
|
||||||
|
IM.active = this;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
toggleEmoticonList: function() {
|
||||||
|
var eL = $('emoticonList');
|
||||||
|
var eLBtn = $(this.getId() + '_insertEmoticon');
|
||||||
|
|
||||||
|
$('fontsList', 'fontSizeList', 'fontColorList').invoke('hide');
|
||||||
|
|
||||||
|
if($('emoticonList').style.display == 'block') {
|
||||||
|
$('emoticonList').setStyle({display: 'none'});
|
||||||
|
} else {
|
||||||
|
eL.setStyle({left: Position.cumulativeOffset(eLBtn)[0] + 'px',
|
||||||
|
top: (Position.cumulativeOffset(eLBtn)[1] + Element.getHeight(eLBtn) - 1) + 'px',
|
||||||
|
zIndex: Windows.maxZIndex + 20,
|
||||||
|
display: 'block'});
|
||||||
|
|
||||||
|
IM.active = this;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
toggleFontColorList: function() {
|
||||||
|
var fcL = $('fontColorList');
|
||||||
|
var fcLBtn = $(this.getId() + '_setFontColor');
|
||||||
|
|
||||||
|
$('fontsList', 'fontSizeList', 'emoticonList').invoke('hide');
|
||||||
|
|
||||||
|
if($('fontColorList').style.display == 'block') {
|
||||||
|
$('fontColorList').setStyle({display: 'none'});
|
||||||
|
} else {
|
||||||
|
fcL.setStyle({left: Position.cumulativeOffset(fcLBtn)[0] + 'px',
|
||||||
|
top: (Position.cumulativeOffset(fcLBtn)[1] + Element.getHeight(fcLBtn) - 1) + 'px',
|
||||||
|
zIndex: Windows.maxZIndex + 20,
|
||||||
|
display: 'block'});
|
||||||
|
|
||||||
|
IM.active = this;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
setFont: function(fontname) {
|
||||||
|
var winId = this.getId();
|
||||||
|
var sendBox = $(winId + '_sendBox');
|
||||||
|
|
||||||
|
sendBox.hide();
|
||||||
|
sendBox.setStyle({fontFamily: fontname + ', sans-serif'});
|
||||||
|
sendBox.show();
|
||||||
|
|
||||||
|
$(winId + '_setFont').innerHTML = fontname;
|
||||||
|
setTimeout("$('" + winId + "_sendBox').focus();", 125);
|
||||||
|
this.toggleFontList('');
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
setFontSize: function(size) {
|
||||||
|
var winId = this.getId();
|
||||||
|
var sendBox = $(winId + '_sendBox');
|
||||||
|
|
||||||
|
sendBox.hide();
|
||||||
|
sendBox.setStyle({fontSize: size + 'px'});
|
||||||
|
sendBox.show();
|
||||||
|
|
||||||
|
$(winId + '_setFontSize').innerHTML = size;
|
||||||
|
setTimeout("$('" + winId + "_sendBox').focus();", 125);
|
||||||
|
this.toggleFontSizeList('');
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
setFontColor: function(color) {
|
||||||
|
var winId = this.getId();
|
||||||
|
var sendBox = $(winId + '_sendBox');
|
||||||
|
|
||||||
|
sendBox.setStyle({color: color});
|
||||||
|
|
||||||
|
$(winId + '_setFontColorColor').setStyle({backgroundColor: color});
|
||||||
|
setTimeout("$('" + winId + "_sendBox').focus();", 125);
|
||||||
|
this.toggleFontColorList('');
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds text to a windows' message box
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
insertText: function(tti) {
|
||||||
|
var winId = this.getId();
|
||||||
|
var sendBox = $(winId + '_sendBox');
|
||||||
|
|
||||||
|
sendBox.value += tti;
|
||||||
|
setTimeout("$('" + winId + "_sendBox').focus();", 125);
|
||||||
|
this.toggleEmoticonList();
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks for pressing on 'Return' or 'Enter'
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
* @update Benjamin Hutchins
|
||||||
|
**/
|
||||||
|
keyHandler: function(event) {
|
||||||
|
event = event || window.event;
|
||||||
|
var asc = document.all ? event.keyCode : event.which;
|
||||||
|
var shift = event.shiftKey;
|
||||||
|
|
||||||
|
if(useLingo) {
|
||||||
|
var message = $(this.getId() + '_sendBox').value;
|
||||||
|
if(trim(message).length > 0) {
|
||||||
|
for(var i=0; i<lingoPunction.length; i++) {
|
||||||
|
if(RegExp(lingoPunction[i][0]+"$").test(message)) {
|
||||||
|
$(this.getId() + '_sendBox').value = Languages.lingoReplace(message, lingoPunction[i]);
|
||||||
|
if(asc == 13 && !shift){}else{return true;}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(asc == 13 && !shift) {
|
||||||
|
this.send();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Detaches an IM window to a new window
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
* @update Benjamin Hutchins
|
||||||
|
**/
|
||||||
|
detach: function() {
|
||||||
|
var winId = this.getId();
|
||||||
|
newWin = this.username;
|
||||||
|
newWinRcvd = $(winId + '_rcvd').innerHTML;
|
||||||
|
this.hide();
|
||||||
|
this.popup = window.open('./popup.html', winId + '_im', 'left='+this.getLocation()['left']+',top='+this.getLocation()['top']+',width=320,height=335,toolbar=0,location=1,status=0,menubar=0,resizable=1,scrollbars=0');
|
||||||
|
this.detached = true;
|
||||||
|
}
|
||||||
|
});
|
||||||
@@ -0,0 +1,90 @@
|
|||||||
|
///////////////////////////////////
|
||||||
|
// ajax im 3.41 //
|
||||||
|
// AJAX Instant Messenger //
|
||||||
|
// Copyright (c) 2006-2008 //
|
||||||
|
// http://www.ajaxim.com/ //
|
||||||
|
// Do not remove this notice //
|
||||||
|
///////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* IM Class
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
var IM = {
|
||||||
|
/**
|
||||||
|
* Handle resize of windows
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
* @update Benjamin Hutchins
|
||||||
|
**/
|
||||||
|
handleResize: function(eventName, win, detached) {
|
||||||
|
if(win.getId() == 'bl') {
|
||||||
|
Buddylist.sizeBuddyList();
|
||||||
|
} else if(win.getId().indexOf('_im') != -1) {
|
||||||
|
var name = win.getId();
|
||||||
|
var curIM = $(name + '_rcvd');
|
||||||
|
|
||||||
|
curIM.setStyle({height: (win.getSize()['height'] - 135) + 'px', width: (win.getSize()['width'] - 10) + 'px'});
|
||||||
|
|
||||||
|
$(name + '_toolbar').setStyle({top: (win.getSize()['height'] - 73) + 'px', width: (win.getSize()['width'] - 10) + 'px'});
|
||||||
|
$(name + '_setFont').setStyle({top: (win.getSize()['height'] - 65) + 'px'});
|
||||||
|
$(name + '_setFontSize').setStyle({top: (win.getSize()['height'] - 65) + 'px'});
|
||||||
|
$(name + '_setFontColor').setStyle({top: (win.getSize()['height'] - 65) + 'px'});
|
||||||
|
$(name + '_insertEmoticon').setStyle({top: (win.getSize()['height'] - 65) + 'px'});
|
||||||
|
$(name + '_sendBox').setStyle({top: (win.getSize()['height'] - 45) + 'px', width: (win.getSize()['width'] - 16) + 'px'});
|
||||||
|
|
||||||
|
curIM.scrollTop = curIM.scrollHeight - curIM.clientHeight + 6;
|
||||||
|
} else if(win.getId().indexOf('_chat') != -1) {
|
||||||
|
Chatroom.handleResize(win.room);
|
||||||
|
} else if(win.getId().indexOf('admin-') != -1) {
|
||||||
|
AdminWindows.handleResize(win);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
Object.extend(IM, AjaxIM);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A class to mantain an IM Window's guts.
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
var IMWindow = Class.create(AjaxIMWindow);
|
||||||
|
IMWindow.addMethods({
|
||||||
|
/**
|
||||||
|
* Checks to see if there is a message, if there is,
|
||||||
|
* send it to the server.
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
* @update Benjamin Hitchins
|
||||||
|
**/
|
||||||
|
send: function($super) {
|
||||||
|
$super();
|
||||||
|
var winId = this.getId();
|
||||||
|
var sendBox = $(winId + '_sendBox');
|
||||||
|
|
||||||
|
var isBold = (sendBox.style.fontWeight == '400' ? 'false' : 'true');
|
||||||
|
var isItalic = (sendBox.style.fontStyle == 'normal' ? 'false' : 'true');
|
||||||
|
var isUnderline = (sendBox.style.textDecoration == 'none' ? 'false' : 'true');
|
||||||
|
var fontName = $(winId + '_setFont').innerHTML;
|
||||||
|
var fontSize = $(winId + '_setFontSize').innerHTML;
|
||||||
|
var fontColor = $(winId + '_setFontColorColor').style.backgroundColor;
|
||||||
|
var chatroom = (typeof(this.room) !== 'undefined' ? 'true' : 'false');
|
||||||
|
|
||||||
|
if(trim(sendBox.value).length > 0) {
|
||||||
|
var message = sendBox.value;
|
||||||
|
sendBox.value = '';
|
||||||
|
IM.sendMessage((chatroom == 'true' ? this.room : this.username), message.replace(/&/g, "&").replace(/</g, '<').replace(/>/g, '>').replace(/\n/g, "<br/>"), chatroom, isBold, isItalic, isUnderline, fontName, fontSize, fontColor);
|
||||||
|
|
||||||
|
Status.lastIM = new Date().getTime();
|
||||||
|
if (typeof(Status) != 'undefined' && Status.wasSetAutoAway) {
|
||||||
|
Status.set(1, Languages.get('available'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
scrollToBottom(winId + '_rcvd');
|
||||||
|
sendBox.focus();
|
||||||
|
}
|
||||||
|
});
|
||||||
@@ -0,0 +1,196 @@
|
|||||||
|
///////////////////////////////////
|
||||||
|
// ajax im 3.41 //
|
||||||
|
// AJAX Instant Messenger //
|
||||||
|
// Copyright (c) 2006-2008 //
|
||||||
|
// http://www.ajaxim.com/ //
|
||||||
|
// Do not remove this notice //
|
||||||
|
///////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Language class
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
* @update Benjamin Hutchins
|
||||||
|
* - Added to popup
|
||||||
|
* - Added lingo-replacement
|
||||||
|
**/
|
||||||
|
var Languages = {
|
||||||
|
current: '', // current language being used
|
||||||
|
previous: '', // previous language used
|
||||||
|
available: languageOptions, // list of available languages
|
||||||
|
loaded: [], // list of languages loaded
|
||||||
|
dictionary: {}, // dictionary of languages
|
||||||
|
lingodict: {}, // dictionary of lingo-replacements
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Load a new language
|
||||||
|
*
|
||||||
|
* @arguments
|
||||||
|
* language - the language to be loaded
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
* @update Benjamin Hutchins
|
||||||
|
* - Loads lingo dictionary for language as well
|
||||||
|
**/
|
||||||
|
load: function(language) {
|
||||||
|
for(var i=0; i<Languages.loaded.length; i++) {
|
||||||
|
if(Languages.loaded[i][0] == language)
|
||||||
|
return Languages.set(language);
|
||||||
|
}
|
||||||
|
|
||||||
|
var s = document.createElement('script');
|
||||||
|
s.src = 'languages/' + language + '/lang.js?' + (new Date()).getTime();
|
||||||
|
s.type = 'text/javascript';
|
||||||
|
document.getElementsByTagName('head').item(0).appendChild(s);
|
||||||
|
|
||||||
|
if (useLingo) {
|
||||||
|
var l = document.createElement('script');
|
||||||
|
l.src = 'languages/' + language + '/lingo.js?' + (new Date()).getTime();
|
||||||
|
l.type = 'text/javascript';
|
||||||
|
document.getElementsByTagName('head').item(0).appendChild(l);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds a language to Language.dictionary
|
||||||
|
*
|
||||||
|
* @arguments
|
||||||
|
* language - the name of the language
|
||||||
|
* dict - the language dictionary
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
onLoad: function(language, dict) {
|
||||||
|
for(var i=0; i<Languages.available.length; i++) {
|
||||||
|
if(Languages.available[i][0] == language) {
|
||||||
|
Languages.loaded[Languages.loaded.length] = Languages.available[i];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Languages.dictionary[language] = dict;
|
||||||
|
Languages.set(language);
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds a lingo-dictionary to Language.lingodict
|
||||||
|
*
|
||||||
|
* @arguments
|
||||||
|
* language - the language of the dictionary
|
||||||
|
* dict - the dictionary itself
|
||||||
|
*
|
||||||
|
* @author Benjamin Hutchins
|
||||||
|
**/
|
||||||
|
onLingoLoad: function(language, dict) {
|
||||||
|
Languages.lingodict[language] = dict;
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Goes through and changes any items with the class lang-TEXT,
|
||||||
|
* where TEXT is the language dictionary key, to the actual text.
|
||||||
|
*
|
||||||
|
* @arguments
|
||||||
|
* language - the language to use
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
set: function(language) {
|
||||||
|
Languages.previous = Languages.current;
|
||||||
|
Languages.current = language;
|
||||||
|
|
||||||
|
var langObjs = $$('[class*="lang-"]');
|
||||||
|
|
||||||
|
langObjs.each(function(el) {
|
||||||
|
var langItem = el.className.split(' ');
|
||||||
|
var i;
|
||||||
|
for(i=0; i<langItem.length; i++)
|
||||||
|
if(langItem[i].indexOf('lang-') > -1) break;
|
||||||
|
|
||||||
|
langItem = langItem[i].substring(5);
|
||||||
|
|
||||||
|
var langText = Languages.get(langItem);
|
||||||
|
var oldLangText = Languages.get(langItem, Languages.previous);
|
||||||
|
|
||||||
|
var preprocessEl = $(document.createElement('div'));
|
||||||
|
preprocessEl.setStyle({display: 'none'});
|
||||||
|
preprocessEl.innerHTML = oldLangText + '';
|
||||||
|
document.body.appendChild(preprocessEl);
|
||||||
|
|
||||||
|
oldLangText = preprocessEl.innerHTML;
|
||||||
|
|
||||||
|
if(el.className.indexOf('langinsert-post') > -1 && el.innerHTML.indexOf(oldLangText) == -1)
|
||||||
|
el.innerHTML += Languages.get(langItem);
|
||||||
|
else if(el.className.indexOf('langinsert-clear') > -1)
|
||||||
|
el.innerHTML = Languages.get(langItem);
|
||||||
|
else if(el.className.indexOf('langinsert-pre') > -1 && el.innerHTML.indexOf(oldLangText) == -1)
|
||||||
|
el.innerHTML = Languages.get(langItem) + el.innerHTML;
|
||||||
|
else {
|
||||||
|
if(el.innerHTML.length == 0) {
|
||||||
|
el.innerHTML = langText;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(langText.indexOf('%1') > -1) {
|
||||||
|
langText = langText.split(/%1/);
|
||||||
|
oldLangText = preprocessEl.innerHTML.split(/%1/);
|
||||||
|
|
||||||
|
el.innerHTML = el.innerHTML.replace(oldLangText[0], langText[0]).replace(oldLangText[1], langText[1]);
|
||||||
|
} else
|
||||||
|
el.innerHTML = el.innerHTML.replace(oldLangText, langText);
|
||||||
|
}
|
||||||
|
|
||||||
|
document.body.removeChild(preprocessEl);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the text to show for a language
|
||||||
|
**/
|
||||||
|
get: function(text, language) {
|
||||||
|
if(language != null && language.length == 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
return Languages.dictionary[language != null ? language : Languages.current][text];
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Removed lingo-text from a message
|
||||||
|
*
|
||||||
|
* @arguments
|
||||||
|
* message - the message entered by the user
|
||||||
|
* last - last punction character
|
||||||
|
*
|
||||||
|
* @author Benjamin Hutchins
|
||||||
|
* @return none-lingo message
|
||||||
|
**/
|
||||||
|
lingoReplace: function(message, last) {
|
||||||
|
var exp = RegExp(last[0]+"$");
|
||||||
|
var mostof = message.replace(exp,"");
|
||||||
|
var word = trim(mostof.substring(mostof.lastIndexOf(" "), mostof.length)).replace(exp,"");
|
||||||
|
mostof = mostof.substring(0, mostof.length-word.length);
|
||||||
|
return mostof + Languages.lingo(word) + last[1];
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Runs a single word through the lingo-dictionary
|
||||||
|
*
|
||||||
|
* @arguments
|
||||||
|
* text - word to try and replace
|
||||||
|
*
|
||||||
|
* @author Benjamin Hutchins
|
||||||
|
* @return none-lingo text if availible, else returns text
|
||||||
|
**/
|
||||||
|
lingo: function(text, language) {
|
||||||
|
if(language != null && language.length == 0)
|
||||||
|
return text;
|
||||||
|
language = language != null ? language : Languages.current;
|
||||||
|
if (typeof Languages.lingodict[language] != 'undefined') {
|
||||||
|
if (typeof Languages.lingodict[language][text.toLowerCase()] != 'undefined') {
|
||||||
|
return Languages.lingodict[language][text.toLowerCase()];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return text;
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -0,0 +1,79 @@
|
|||||||
|
///////////////////////////////////
|
||||||
|
// ajax im 3.41 //
|
||||||
|
// AJAX Instant Messenger //
|
||||||
|
// Copyright (c) 2006-2008 //
|
||||||
|
// http://www.ajaxim.com/ //
|
||||||
|
// Do not remove this notice //
|
||||||
|
///////////////////////////////////
|
||||||
|
|
||||||
|
/**
|
||||||
|
* IM Class
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
var IM = {
|
||||||
|
/**
|
||||||
|
* Handle resize of window
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
handleResize: function(e) {
|
||||||
|
var rcvdBox = $(winName + '_rcvd');
|
||||||
|
rcvdBox.style.height = (browserHeight() - 133) + 'px';
|
||||||
|
rcvdBox.style.width = (browserWidth() - 15) + 'px';
|
||||||
|
|
||||||
|
$(winName + '_toolbar').style.top = (browserHeight() - 93) + 'px';
|
||||||
|
$(winName + '_toolbar').style.width = (browserWidth() - 10) + 'px';
|
||||||
|
$(winName + '_setFont').style.top = (browserHeight() - 85) + 'px';
|
||||||
|
$(winName + '_setFontSize').style.top = (browserHeight() - 85) + 'px';
|
||||||
|
$(winName + '_setFontColor').style.top = (browserHeight() - 85) + 'px';
|
||||||
|
$(winName + '_insertEmoticon').style.top = (browserHeight() - 85) + 'px';
|
||||||
|
$(winName + '_sendBox').style.top = (browserHeight() - 65) + 'px';
|
||||||
|
$(winName + '_sendBox').style.width = (browserWidth() - 16) + 'px';
|
||||||
|
|
||||||
|
rcvdBox.scrollTop = rcvdBox.scrollHeight - rcvdBox.clientHeight + 6;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
Object.extend(IM, AjaxIM);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A class to mantain an IM Window's guts.
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
var IMWindow = Class.create(AjaxIMWindow);
|
||||||
|
IMWindow.addMethods({
|
||||||
|
/**
|
||||||
|
* Checks to see if there is a message, if there is,
|
||||||
|
* send it to the server.
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
* @update Benjamin Hitchins
|
||||||
|
**/
|
||||||
|
send: function($super) {
|
||||||
|
$super();
|
||||||
|
var winId = this.getId();
|
||||||
|
var sendBox = $(winId + '_sendBox');
|
||||||
|
|
||||||
|
var isBold = (sendBox.style.fontWeight == '400' ? 'false' : 'true');
|
||||||
|
var isItalic = (sendBox.style.fontStyle == 'normal' ? 'false' : 'true');
|
||||||
|
var isUnderline = (sendBox.style.textDecoration == 'none' ? 'false' : 'true');
|
||||||
|
var fontName = $(winId + '_setFont').innerHTML;
|
||||||
|
var fontSize = $(winId + '_setFontSize').innerHTML;
|
||||||
|
var fontColor = $(winId + '_setFontColorColor').style.backgroundColor;
|
||||||
|
|
||||||
|
if(trim(sendBox.value).length > 0) {
|
||||||
|
var message = sendBox.value;
|
||||||
|
sendBox.value = '';
|
||||||
|
IM.sendMessage(this.username, message.replace(/&/g, "&").replace(/</g, '<').replace(/>/g, '>').replace(/\n/g, "<br/>"), '', isBold, isItalic, isUnderline, fontName, fontSize, fontColor);
|
||||||
|
|
||||||
|
self.opener.Status.lastIM = new Date().getTime();
|
||||||
|
if (typeof(Status) != 'undefined' && self.opener.Status.wasSetAutoAway) {
|
||||||
|
self.opener.Status.set(1, Languages.get('available'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
scrollToBottom(winId + '_rcvd');
|
||||||
|
sendBox.focus();
|
||||||
|
}
|
||||||
|
});
|
||||||
@@ -0,0 +1,71 @@
|
|||||||
|
///////////////////////////////////
|
||||||
|
// ajax im 3.41 //
|
||||||
|
// AJAX Instant Messenger //
|
||||||
|
// Copyright (c) 2006-2008 //
|
||||||
|
// http://www.ajaxim.com/ //
|
||||||
|
// Do not remove this notice //
|
||||||
|
///////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handle all requests that deal with a users' profile
|
||||||
|
*
|
||||||
|
* @author Benjamin Hutchins
|
||||||
|
**/
|
||||||
|
var Profile = {
|
||||||
|
windows: {}, // store all existent windows
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create new window for a user's profile,
|
||||||
|
* load the user profile and append it inside the window
|
||||||
|
*
|
||||||
|
* @arguments
|
||||||
|
* name - username of user we're getting the profile of
|
||||||
|
* title - title for window, default is the user's username
|
||||||
|
*
|
||||||
|
* @author Benjamin Hutchins
|
||||||
|
**/
|
||||||
|
create: function(name, title) {
|
||||||
|
var winLeft = Math.round(Math.random()*(Browser.width()-360))+'px';
|
||||||
|
var winTop = Math.round(Math.random()*(Browser.height()-400))+'px';
|
||||||
|
|
||||||
|
var winId = randomString(32) + '_profile';
|
||||||
|
|
||||||
|
this.windows[name] = new Window({id: winId, className: "dialog", width: 320, height: 335, top: winTop, left: winLeft, resizable: true, title: title, draggable: true, detachable: false, minWidth: 320, minHeight: 150, showEffectOptions: {duration: 0}, hideEffectOptions: {duration: 0}});
|
||||||
|
|
||||||
|
this.windows[name].setConstraint(true, {left: 0, right: 0, top: 0, bottom: 0});
|
||||||
|
var xhConn = new XHConn();
|
||||||
|
xhConn.connect(pingTo, "POST", "call=getprofile&user="+name,
|
||||||
|
function(xh) {
|
||||||
|
Profile.windows[name].getContent().innerHTML = '<div class="userProfile" id="'+name+'_userProfile">' +
|
||||||
|
(xh.responseText == "" ? Languages.get('hasNoProfile') : xh.responseText) + '</div>' +
|
||||||
|
'<div class="updateProfile">' +
|
||||||
|
ButtonCtl.create(Languages.get('update'), 'Profile.update(\''+name+'\');') +
|
||||||
|
'</div>';
|
||||||
|
}.bind(name)
|
||||||
|
);
|
||||||
|
//this.windows[name].setDestroyOnClose();
|
||||||
|
this.windows[name].show();
|
||||||
|
this.windows[name].toFront();
|
||||||
|
Windows.focusedWindow = this.windows[name];
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Force-update a user's profile
|
||||||
|
*
|
||||||
|
* @arguments
|
||||||
|
* name - user's username
|
||||||
|
*
|
||||||
|
* @author Benjamin Hutchins
|
||||||
|
**/
|
||||||
|
update: function(name) {
|
||||||
|
if ($(name+'_userProfile')) {
|
||||||
|
var xhConn = new XHConn();
|
||||||
|
xhConn.connect(pingTo, "POST", "call=getprofile&user="+name,
|
||||||
|
function(xh) {
|
||||||
|
$(name+'_userProfile').innerHTML = (xh.responseText == "" ? Languages.get('hasNoProfile') : xh.responseText);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -0,0 +1,91 @@
|
|||||||
|
///////////////////////////////////
|
||||||
|
// ajax im 3.41 //
|
||||||
|
// AJAX Instant Messenger //
|
||||||
|
// Copyright (c) 2006-2008 //
|
||||||
|
// http://www.ajaxim.com/ //
|
||||||
|
// Do not remove this notice //
|
||||||
|
///////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handles user status changes
|
||||||
|
**/
|
||||||
|
var Status = {
|
||||||
|
state: 0, // current status
|
||||||
|
awayMessage: '', // away message
|
||||||
|
wasSetAutoAway: false, // did you get set as away because you were being antisocial?
|
||||||
|
lastIM: null, // timestamp of the last IM you sent
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Change your status
|
||||||
|
*
|
||||||
|
* @arguments
|
||||||
|
* status - status [0=online, 1=away, 99=friends only, 49=invisible]
|
||||||
|
* away_msg - away message to use
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
set: function(status, away_msg) {
|
||||||
|
lastIM = new Date().getTime();
|
||||||
|
if(status == 1) { // away
|
||||||
|
this.state = 1;
|
||||||
|
this.awayMessage = away_msg;
|
||||||
|
$('curStatus').innerHTML = this.awayMessage.substring(0, 30) + (this.awayMessage.length > 30 ? '...' : '');
|
||||||
|
} else { // back
|
||||||
|
this.state = status; // 0 for avail, 99 for "friends only", 49 for "invisible"
|
||||||
|
this.awayMessage = '';
|
||||||
|
$('curStatus').innerHTML = away_msg;
|
||||||
|
}
|
||||||
|
|
||||||
|
$('statusList').hide();
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Display entry box to allow the user to enter
|
||||||
|
* a custom away message.
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
customAway: function() {
|
||||||
|
$('curStatus').hide();
|
||||||
|
$('customStatus').show().focus();
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handle keyboard entires on customStatus.
|
||||||
|
*
|
||||||
|
* @arguments
|
||||||
|
* event - sent by browser
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
processCustomAway: function(event) {
|
||||||
|
event = event || event.window;
|
||||||
|
var asc = document.all ? event.keyCode : event.which;
|
||||||
|
|
||||||
|
if(asc == 13) {
|
||||||
|
awayMessage = $('customStatus').value;
|
||||||
|
$('curStatus').innerHTML = awayMessage.substring(0, 30) + (awayMessage.length > 30 ? '...' : '');
|
||||||
|
$('curStatus').show();
|
||||||
|
$('customStatus').hide();
|
||||||
|
|
||||||
|
Status.set(1, awayMessage);
|
||||||
|
}
|
||||||
|
return asc != 13;
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Display/Hide the status drop down list
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
toggleStatusList: function() {
|
||||||
|
var sL = $('statusList');
|
||||||
|
if(sL.style.display == 'block') {
|
||||||
|
sL.hide();
|
||||||
|
if(sL.style.zIndex > Windows.maxZIndex) Windows.maxZIndex = sL.style.zIndex;
|
||||||
|
} else {
|
||||||
|
Element.setStyle(sL, {left: parseInt(Buddylist.buddyListWin.getLocation()['left']) + $('statusSettings').offsetLeft + $('blTopToolbar').offsetLeft + 'px', top: parseInt(Buddylist.buddyListWin.getLocation()['top']) + $('statusSettings').offsetTop + $('blTopToolbar').offsetTop + $('statusSettings').offsetHeight + 'px', zIndex: Windows.maxZIndex + 20, display: 'block'});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -0,0 +1,611 @@
|
|||||||
|
///////////////////////////////////
|
||||||
|
// ajax im 3.41 //
|
||||||
|
// AJAX Instant Messenger //
|
||||||
|
// Copyright (c) 2006-2008 //
|
||||||
|
// http://www.ajaxim.com/ //
|
||||||
|
// Do not remove this notice //
|
||||||
|
///////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handles session and most requests to the server
|
||||||
|
*
|
||||||
|
**/
|
||||||
|
var System = {
|
||||||
|
/**
|
||||||
|
* Checks to see if a login is valid and,
|
||||||
|
* if so logs the user in, else it shows an error.
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
* @update Benjamin Hutchins
|
||||||
|
**/
|
||||||
|
login: function(u, p) {
|
||||||
|
var username = (u ? u : $('username').value);
|
||||||
|
var password = (p ? p : $('password').value);
|
||||||
|
|
||||||
|
var xhConn = new XHConn();
|
||||||
|
xhConn.connect(pingTo, "POST", "call=login&username="+username+"&password="+hex_md5(password),
|
||||||
|
function(xh) {
|
||||||
|
if(xh.responseText == 'invalid' || xh.responseText == 'banned') {
|
||||||
|
$('login_error_msg').innerHTML = (xh.responseText == 'invalid' ? Languages.get('incorrectInfo') : Languages.get('userBanned'));
|
||||||
|
$('login_error_msg').show();
|
||||||
|
new Effect.Shake('modal');
|
||||||
|
} else {
|
||||||
|
loggedIn = true;
|
||||||
|
user = username;
|
||||||
|
pass = hex_md5(password);
|
||||||
|
defaultTitle = document.title = document.title + ': ' + user;
|
||||||
|
|
||||||
|
$('languageList').hide();
|
||||||
|
|
||||||
|
if(typeof(Buddylist) != 'undefined') {
|
||||||
|
Buddylist.create();
|
||||||
|
|
||||||
|
if(trim(xh.responseText).length == 0) System.logout();
|
||||||
|
|
||||||
|
var response = xh.responseText.parseJSON();
|
||||||
|
|
||||||
|
pingTimer = setInterval('System.ping()', pingFrequency);
|
||||||
|
$('modal').hide();
|
||||||
|
|
||||||
|
if(response.blocked && response.blocked.length > 0) {
|
||||||
|
var blockList = response.blocked.parseJSON();
|
||||||
|
Buddylist.blocked = blockList;
|
||||||
|
} else {
|
||||||
|
Buddylist.blocked = {};
|
||||||
|
}
|
||||||
|
|
||||||
|
var buddy;
|
||||||
|
if(response.buddy && response.buddy.length > 0) {
|
||||||
|
var budList = response.buddy.parseJSON();
|
||||||
|
for(var group in budList) {
|
||||||
|
if(!$(group.replace(/\s/, '_')+'_group') && group != 'toJSONString') Buddylist.addGroup(group);
|
||||||
|
if(!Buddylist.list[group]) Buddylist.list[group] = {};
|
||||||
|
for(i=0; i<budList[group].length; i++) {
|
||||||
|
buddy = budList[group][i];
|
||||||
|
Buddylist.list[group][buddy.username] = {'username': buddy.username, 'blocked': (Buddylist.blocked.inArray(buddy.username) ? true : false), 'status': buddy.is_online, 'icon': buddy.icon}
|
||||||
|
|
||||||
|
if(typeof(Buddylist.listObjects[buddy.username]) == 'undefined') Buddylist.addBuddy(buddy.username, group, buddy.icon);
|
||||||
|
$(Buddylist.listObjects[buddy.username].obj).setStyle({display: 'block'});
|
||||||
|
if(!blockedBuddyStatus && Buddylist.list[group][buddy.username].blocked) {
|
||||||
|
Buddylist.moveBuddy(buddy.username, Languages.get('offline'));
|
||||||
|
$(Buddylist.listObjects[buddy.username].img).src = 'themes/' + theme + '/blocked.png';
|
||||||
|
} else {
|
||||||
|
if(buddy.is_online == 0 || buddy.is_online == 50) {
|
||||||
|
Buddylist.moveBuddy(buddy.username, Languages.get('offline'));
|
||||||
|
$(Buddylist.listObjects[buddy.username].img).src = 'themes/' + theme + '/offline.png';
|
||||||
|
} else if(buddy.is_online == 2) {
|
||||||
|
Buddylist.moveBuddy(buddy.username, group);
|
||||||
|
$(Buddylist.listObjects[buddy.username].img).src = 'themes/' + theme + '/away.png';
|
||||||
|
} else {
|
||||||
|
Buddylist.moveBuddy(buddy.username, group);
|
||||||
|
$(Buddylist.listObjects[buddy.username].img).src = 'themes/' + theme + '/online.png';
|
||||||
|
}
|
||||||
|
if(Buddylist.list[group][buddy.username].blocked == true) $(Buddylist.listObjects[buddy.username].img).src = 'themes/' + theme + '/blocked.png';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(response.admin == 1) {
|
||||||
|
var s = document.createElement('script');
|
||||||
|
s.src = 'js/admin.js?' + (new Date()).getTime();
|
||||||
|
s.type = 'text/javascript';
|
||||||
|
document.getElementsByTagName('head').item(0).appendChild(s);
|
||||||
|
|
||||||
|
$('blBottomToolbar').innerHTML += '<a id="admin-button" href="#" onclick="AdminWindows.userSearch();return false;" title="Admin"><img src="themes/' + theme + '/window/admin.png" alt="Admin" style="border:0;" /></a>';
|
||||||
|
$('admin-button').setStyle({'position':'absolute', 'left': '0', 'top': '0'});
|
||||||
|
}
|
||||||
|
|
||||||
|
Event.observe(document, 'focus', function() { blinkerOn(false); });
|
||||||
|
Event.observe(window, 'focus', function() { blinkerOn(false); });
|
||||||
|
|
||||||
|
Event.observe(document, 'blur', function() { blinkerOn(true); });
|
||||||
|
Event.observe(window, 'blur', function() { blinkerOn(true); });
|
||||||
|
|
||||||
|
Event.observe(document, 'keypress',
|
||||||
|
function(event) {
|
||||||
|
event = event || window.event;
|
||||||
|
if(Windows.focusedWindow.getId().indexOf('_im') != -1 && IM.sendBoxWithFocus == null) {
|
||||||
|
var sB = $(Windows.focusedWindow.getId() + '_sendBox');
|
||||||
|
sB.focus(); sB.value += String.fromCharCode(event.charCode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
Event.stopObserving(window, 'resize', recenterModal);
|
||||||
|
Status.lastIM = new Date().getTime();
|
||||||
|
System.ping();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check for press of 'return' or 'enter' and run 'func'
|
||||||
|
*
|
||||||
|
* @author Benjamin Hutchins
|
||||||
|
**/
|
||||||
|
keyHandler: function(event, func) {
|
||||||
|
event = event || window.event;
|
||||||
|
var asc = document.all ? event.keyCode : event.which;
|
||||||
|
if(asc == 13 && typeof func == 'function') func();
|
||||||
|
return asc != 13;
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Log out the user
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
logout: function() {
|
||||||
|
if(user == '' || pass == '') return;
|
||||||
|
var xmlhttp=false;
|
||||||
|
/*@cc_on @*/
|
||||||
|
/*@if (@_jscript_version >= 5)
|
||||||
|
try {
|
||||||
|
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
|
||||||
|
} catch (e) {
|
||||||
|
try {
|
||||||
|
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
|
||||||
|
} catch (E) {
|
||||||
|
xmlhttp = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@end @*/
|
||||||
|
if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
|
||||||
|
xmlhttp = new XMLHttpRequest();
|
||||||
|
}
|
||||||
|
xmlhttp.open('POST', pingTo, false);
|
||||||
|
xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
|
||||||
|
xmlhttp.send('call=logout');
|
||||||
|
|
||||||
|
clearTimeout(pingTimer);
|
||||||
|
|
||||||
|
defaultTitle = document.title = document.title.replace(': ' + user, '');
|
||||||
|
user = '';
|
||||||
|
pass = '';
|
||||||
|
loggedIn = false;
|
||||||
|
|
||||||
|
if(typeof(Status) != 'undefined') {
|
||||||
|
Status.state = 0;
|
||||||
|
Status.awayMessage = '';
|
||||||
|
}
|
||||||
|
Element.stopObserving(window, 'resize', recenterModal);
|
||||||
|
|
||||||
|
if(typeof(Buddylist) != 'undefined') Buddylist.destroy();
|
||||||
|
|
||||||
|
for(var name in IM.windows) {
|
||||||
|
if(typeof(IM.windows[name].getId) != 'undefined' && typeof($(IM.windows[name].getId())) != 'undefined') {
|
||||||
|
try {
|
||||||
|
if(IM.windows[name].detached)
|
||||||
|
IM.windows[name].popup.close();
|
||||||
|
else
|
||||||
|
IM.windows[name].destroy();
|
||||||
|
} catch(e) { }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for(var name in Chatroom.windows) {
|
||||||
|
if(typeof(Chatroom.windows[name].getId) != 'undefined' && typeof($(Chatroom.windows[name].getId())) != 'undefined') {
|
||||||
|
try {
|
||||||
|
Chatroom.windows[name].destroy();
|
||||||
|
} catch(e) { }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if($('admin-userSearch'))
|
||||||
|
Windows.getWindow('admin-userSearch').destroy();
|
||||||
|
|
||||||
|
Dialog.alert('<span class="dialog_long_label">' + Languages.get('signedOff') + '</span>',
|
||||||
|
{ windowParameters: {className:'alert', width:alertWidth, height: 85},
|
||||||
|
okLabel: Languages.get('reconnect'),
|
||||||
|
ok:function(win) {
|
||||||
|
try {
|
||||||
|
window.location.reload();
|
||||||
|
} catch(e) { }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Processes register requests
|
||||||
|
*
|
||||||
|
* @author Jostua Gross
|
||||||
|
**/
|
||||||
|
register: function() {
|
||||||
|
// if registration is disabled, don't do anything
|
||||||
|
if (!allowNewUsers) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var error = '';
|
||||||
|
|
||||||
|
var registerButton = $('register_button');
|
||||||
|
Event.stopObserving(registerButton, 'click', System.register);
|
||||||
|
|
||||||
|
if(($('newpassword').value == $('newpassword2').value)) {
|
||||||
|
if(checkEmailAddr($('newemail').value)) {
|
||||||
|
if($('newpassword').value.length >= 6 && $('newpassword').value.length <= 20) {
|
||||||
|
if($('newusername').value.isAlphaNumeric() && $('newusername').value.length >= 3 && $('newusername').value.length <= 16) {
|
||||||
|
var xhConn = new XHConn();
|
||||||
|
|
||||||
|
var username = $('newusername').value.toLowerCase();
|
||||||
|
var password = $('newpassword').value;
|
||||||
|
var email = $('newemail').value;
|
||||||
|
xhConn.connect(pingTo, "POST", "call=register&username="+username+"&password="+password+"&email="+email,
|
||||||
|
function(xh) {
|
||||||
|
switch(xh.responseText) {
|
||||||
|
case 'user_registered':
|
||||||
|
Dialog.alert('<span class="dialog_long_label">' + Languages.get('registerSuccess') + '</span><div style="clear:both"></div>',
|
||||||
|
{windowParameters: {className:'alert', width:alertWidth},
|
||||||
|
ok:function(win) { clearInputs(); Dialog.closeInfo(); Dialogs.login(); }});
|
||||||
|
Event.observe(registerButton, 'click', System.register);
|
||||||
|
return;
|
||||||
|
case 'username_taken':
|
||||||
|
error = Languages.get('registerUsernameTaken');
|
||||||
|
break;
|
||||||
|
case 'username_bad':
|
||||||
|
error = Languages.get('registerUsernameBad');
|
||||||
|
break;
|
||||||
|
case 'password_bad_length':
|
||||||
|
error = Languages.get('registerPasswordShort');
|
||||||
|
break;
|
||||||
|
case 'invalid_email':
|
||||||
|
error = Languages.get('registerInvalidEmail');
|
||||||
|
break;
|
||||||
|
case 'email_already_used':
|
||||||
|
error = Languages.get('registerEmailTaken');
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
error = Languages.get('registerFailed');
|
||||||
|
}
|
||||||
|
|
||||||
|
$('register_error_msg').innerHTML = error;
|
||||||
|
$('register_error_msg').setStyle({display: 'block'});
|
||||||
|
|
||||||
|
new Effect.Shake('modal');
|
||||||
|
Event.observe(registerButton, 'click', System.register);
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
error = Languages.get('registerUsernameBad');
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
error = Languages.get('registerPasswordShort');
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
error = Languages.get('registerInvalidEmail');
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
error = Languages.get('registerPasswordsMatch');
|
||||||
|
}
|
||||||
|
|
||||||
|
$('register_error_msg').innerHTML = error;
|
||||||
|
$('register_error_msg').setStyle({display: 'block'});
|
||||||
|
|
||||||
|
new Effect.Shake('modal');
|
||||||
|
|
||||||
|
Event.observe(registerButton, 'click', System.register);
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check how long a user has been idle,
|
||||||
|
* if they've been idle more than idleTime allows,
|
||||||
|
* set them as away.
|
||||||
|
*
|
||||||
|
* @author Benjamin Hutchins
|
||||||
|
**/
|
||||||
|
idle: function() {
|
||||||
|
var timeStamp = new Date().getTime() - (idleTime * 60 * 1000);
|
||||||
|
if (Status.lastIM < timeStamp && typeof(Status) != 'undefined' && Status.state == 0) {
|
||||||
|
Status.set(1, Languages.get('away'));
|
||||||
|
Status.wasSetAutoAway = true;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The heart of this script,
|
||||||
|
* ping the server for new events and messages
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
**/
|
||||||
|
ping: function(initial) {
|
||||||
|
// if auto-away is enabled, check the idle timer
|
||||||
|
if (idleTime > 0)
|
||||||
|
System.idle();
|
||||||
|
|
||||||
|
var xhConn = new XHConn();
|
||||||
|
xhConn.connect(pingTo, "POST", "call=ping&away="+(typeof(Status) != 'undefined' ? Status.state : 0)+(initial == true ? '&initial=true' : ''),
|
||||||
|
function(xh) {
|
||||||
|
var i;
|
||||||
|
|
||||||
|
if((typeof xh.status != 'undefined' && xh.status!=200) || xh.responseText == 'not_logged_in') {
|
||||||
|
System.logout();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(trim(xh.responseText).length == 0) return;
|
||||||
|
|
||||||
|
var response = xh.responseText.parseJSON();
|
||||||
|
|
||||||
|
var from, data, chatroom;
|
||||||
|
var messageCount = (typeof(response.messages) !== 'undefined' ? response.messages.length : 0);
|
||||||
|
for(i=0; i<messageCount; i++) {
|
||||||
|
chatroom = response.messages[i].chatroom;
|
||||||
|
if(!chatroom) {
|
||||||
|
from = response.messages[i].sender;
|
||||||
|
who = from;
|
||||||
|
} else {
|
||||||
|
var fromx = response.messages[i].sender.split('\.');
|
||||||
|
from = fromx[1];
|
||||||
|
who = fromx[0];
|
||||||
|
}
|
||||||
|
data = response.messages[i].message;
|
||||||
|
|
||||||
|
var winId = null;
|
||||||
|
try { winId = window[chatroom ? 'Chatroom' : 'IM'].windows[who].getId(); } catch(e) { };
|
||||||
|
|
||||||
|
if(!$(winId)) {
|
||||||
|
window[chatroom ? 'Chatroom' : 'IM'].create(who, who);
|
||||||
|
} else {
|
||||||
|
if(!window[chatroom ? 'Chatroom' : 'IM'].windows[who].detached && !window[chatroom ? 'Chatroom' : 'IM'].windows[who].isVisible()) {
|
||||||
|
window[chatroom ? 'Chatroom' : 'IM'].windows[who].show();
|
||||||
|
setTimeout("scrollToBottom('" + window[chatroom ? 'Chatroom' : 'IM'].windows[who].getId() + "_rcvd')", 125);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var curIM = (!window[chatroom ? 'Chatroom' : 'IM'].windows[who].detached ? $(window[chatroom ? 'Chatroom' : 'IM'].windows[who].getId()+"_rcvd") : window[chatroom ? 'Chatroom' : 'IM'].windows[who].popup.$(window[chatroom ? 'Chatroom' : 'IM'].windows[who].getId()+"_rcvd"));
|
||||||
|
|
||||||
|
data = data.replace(/(\s|\n|>|^)(\w+:\/\/[^<\s\n]+)/, '$1<a href="$2" target="_blank">$2</a>');
|
||||||
|
data = IM.emoteReplace(data, smilies);
|
||||||
|
|
||||||
|
if(data.replace(/<([^>]+)>/ig, '').indexOf('/me') == 0)
|
||||||
|
curIM.innerHTML += "<b class=\"user" + (from == user && chatroom ? 'A' : 'B') + "\">" + IM.createTimestamp() + " <i>" + from + ' ' + data.replace(/<([^>]+)>/ig, '').replace(/\/me/, '') + "</i></b><br>\n";
|
||||||
|
else
|
||||||
|
curIM.innerHTML += "<b class=\"user" + (from == user && chatroom ? 'A' : 'B') + "\">" + IM.createTimestamp() + " " + from + ":</b> " + data + "<br>\n";
|
||||||
|
curIM.scrollTop = curIM.scrollHeight - curIM.clientHeight + 6;
|
||||||
|
|
||||||
|
if(!initial) {
|
||||||
|
if(curIM.innerHTML.toLowerCase().replace(/<\S[^>]*>/g, '').indexOf(user.toLowerCase()+': (' + Languages.get('autoreply').toLowerCase() + ')') == -1 && typeof(Status) != 'undefined' && Status.state == 1 && who == from) {
|
||||||
|
var fontName = $(winId + '_setFont').innerHTML;
|
||||||
|
var fontSize = $(winId + '_setFontSize').innerHTML;
|
||||||
|
var fontColor = $(winId + '_setFontColorColor').style.backgroundColor;
|
||||||
|
window[chatroom ? 'Chatroom' : 'IM'].sendMessage(from, '(' + Languages.get('autoreply') + ') ' + Status.awayMessage, false, false, false, fontName, fontSize, fontColor);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(Windows.getFocusedWindow().getId() != window[chatroom ? 'Chatroom' : 'IM'].windows[who].getId() && pulsateTitles == true) {
|
||||||
|
new Effect.Pulsate(window[chatroom ? 'Chatroom' : 'IM'].windows[who].getId() + '_top');
|
||||||
|
}
|
||||||
|
|
||||||
|
if(titlebarBlinker == true && useBlinker == true) {
|
||||||
|
clearTimeout(blinkerTimer);
|
||||||
|
blinkerTimer = setTimeout("titlebarBlink('"+who+"', \""+data.replace(/\"/, '\"').replace(/<([^>]+)>/ig, '')+"\", 0, "+chatroom+")", blinkSpeed);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
curIM = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(messageCount > 0 && audioNotify == true) soundManager.play('msg_in');
|
||||||
|
|
||||||
|
from = null; data = null;
|
||||||
|
var group = '', buddy = '', event = '';
|
||||||
|
var eventCount = (typeof(response.events) !== 'undefined' ? response.events.length : 0);
|
||||||
|
|
||||||
|
for(i=0; i<eventCount; i++) {
|
||||||
|
from = response.events[i].sender;
|
||||||
|
data = response.events[i].event;
|
||||||
|
who = (response.events[i].recipient == user ? from : response.events[i].recipient);
|
||||||
|
event = data.split(',');
|
||||||
|
|
||||||
|
switch(event[0]) {
|
||||||
|
case 'status':
|
||||||
|
if(typeof(Buddylist) != 'undefined') {
|
||||||
|
group = response.events[i].group;
|
||||||
|
if(group && !$(group.replace(/\s/, '_')+'_group') && group != 'toJSONString') Buddylist.addGroup(group);
|
||||||
|
|
||||||
|
if(typeof(Buddylist.listObjects[from]) == 'undefined') {
|
||||||
|
Buddylist.addBuddy(from, group, 'none');
|
||||||
|
Buddylist.list[group][from] = {'username': from, 'blocked': false, 'status': event[1]};
|
||||||
|
$(Buddylist.listObjects[from].obj).setStyle({display: 'block'});
|
||||||
|
} else if (group == null) {
|
||||||
|
group = Buddylist.listObjects[from].group;
|
||||||
|
}
|
||||||
|
|
||||||
|
Buddylist.list[group][from].status = event[1];
|
||||||
|
|
||||||
|
if(!blockedBuddyStatus && typeof(Buddylist.list[group][from]) !== 'undefined' && Buddylist.list[group][from].blocked) {
|
||||||
|
Buddylist.moveBuddy(from, Languages.get('offline'));
|
||||||
|
$(Buddylist.listObjects[from].img).src = 'themes/' + theme + '/blocked.png';
|
||||||
|
} else {
|
||||||
|
if(event[1] == 0 || event[1] == 50) {
|
||||||
|
Buddylist.moveBuddy(from, Languages.get('offline'));
|
||||||
|
IM.notifyUser(from, Languages.get('signedoff').replace('%1', from));
|
||||||
|
$(Buddylist.listObjects[from].img).src = (typeof(Buddylist.list[group][from]) !== 'undefined' && Buddylist.list[group][from].blocked ? 'themes/' + theme + '/blocked.png' : 'themes/' + theme + '/offline.png');
|
||||||
|
} else if(event[1] == 2) {
|
||||||
|
Buddylist.moveBuddy(from, group);
|
||||||
|
IM.notifyUser(from, Languages.get('wentaway').replace('%1', from));
|
||||||
|
$(Buddylist.listObjects[from].img).src = (typeof(Buddylist.list[group][from]) !== 'undefined' && Buddylist.list[group][from].blocked ? 'themes/' + theme + '/blocked.png' : 'themes/' + theme + '/away.png');
|
||||||
|
} else {
|
||||||
|
Buddylist.moveBuddy(from, group);
|
||||||
|
IM.notifyUser(from, Languages.get('cameback').replace('%1', from));
|
||||||
|
$(Buddylist.listObjects[from].img).src = (typeof(Buddylist.list[group][from]) !== 'undefined' && Buddylist.list[group][from].blocked ? 'themes/' + theme + '/blocked.png' : 'themes/' + theme + '/online.png');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'chat':
|
||||||
|
var rcvdBox = $(Chatroom.windows[event[2]].getId()+"_rcvd");
|
||||||
|
if(event[1] == 'join') {
|
||||||
|
if(!$(from+'_'+event[2]+'_chatUser') && typeof(Chatroom.windows[event[2]]) != 'undefined') Chatroom.windows[event[2]].addUser(from);
|
||||||
|
rcvdBox.innerHTML = rcvdBox.innerHTML + "<b class=\"userB\">" + IM.createTimestamp() + " <i>"+from+" " + Languages.get('hasJoined') + "</i></b><br>";
|
||||||
|
scrollToBottom(Chatroom.windows[event[2]].getId()+"_rcvd");
|
||||||
|
} else if(event[1] == 'left') {
|
||||||
|
if(typeof(Chatroom.windows[event[2]]) != 'undefined') Chatroom.windows[event[2]].deleteUser(from);
|
||||||
|
rcvdBox.innerHTML = rcvdBox.innerHTML + "<b class=\"userB\">" + IM.createTimestamp() + " <i>"+from+" " + Languages.get('hasLeft') + "</i></b><br>";
|
||||||
|
scrollToBottom(Chatroom.windows[event[2]].getId()+"_rcvd");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
event = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
from = null; data = null; who = null;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
xhConn = null;
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update a user's budddy profile
|
||||||
|
*
|
||||||
|
* @author Benjamin Hutchins
|
||||||
|
**/
|
||||||
|
changeProfile: function() {
|
||||||
|
var profile = $('changeprofile_textarea').value, error = '';
|
||||||
|
if(profile.replace(/\s/g, "") != "") {
|
||||||
|
var xhConn = new XHConn();
|
||||||
|
xhConn.connect(pingTo, "POST", "call=changeprofile&profile="+encodeURIComponent(profile),
|
||||||
|
function(xh) {
|
||||||
|
if(xh.responseText == 'success') {
|
||||||
|
Dialog.closeInfo();
|
||||||
|
Dialog.alert('<span class="dialog_long_label lang-changeProfileSuccess">' + Languages.get('changeProfileSuccess') + '</span><div style="clear:both"></div>',
|
||||||
|
{windowParameters: {className:'alert', width:alertWidth, height:85},
|
||||||
|
ok: function(win) { Dialog.closeInfo(); Windows.close('changeProfile'); } });
|
||||||
|
} else {
|
||||||
|
error = Languages.get('changeProfileFailed');
|
||||||
|
}
|
||||||
|
|
||||||
|
if(error.length > 0) {
|
||||||
|
$('changeprofile_error_msg').innerHTML = error;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
error = Languages.get('changeProfileEmpty');
|
||||||
|
}
|
||||||
|
if(error.length > 0) {
|
||||||
|
$('changeprofile_error_msg').innerHTML = error;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update a users's buddy icon
|
||||||
|
*
|
||||||
|
* @author Benjamin Hutchins
|
||||||
|
**/
|
||||||
|
changeIcon: function() {
|
||||||
|
// get the iframe as a variable
|
||||||
|
var i = $('changeicon_iframe');
|
||||||
|
if (i.contentDocument) {
|
||||||
|
var d = i.contentDocument;
|
||||||
|
} else if (i.contentWindow) {
|
||||||
|
var d = i.contentWindow.document;
|
||||||
|
} else {
|
||||||
|
var d = window.frames['changeicon_iframe'].document;
|
||||||
|
}
|
||||||
|
|
||||||
|
// if the iframe was never processed, then return empty
|
||||||
|
if (d.location.href == "about:blank") {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// handle returns from the server
|
||||||
|
var error = '', response = d.body.innerHTML;
|
||||||
|
if(response == 'success'){
|
||||||
|
Dialog.closeInfo();
|
||||||
|
Dialog.alert('<span class="dialog_long_label lang-changeBuddyiconSuccess">'+Languages.get('changeBuddyiconSuccess')+'</span><div style="clear:both"></div>',{windowParameters:{className:'alert',width:alertWidth,height:85},ok:function(win){Dialog.closeInfo();Windows.close('changeIcon');}});
|
||||||
|
} else if (response == 'nofile') {
|
||||||
|
error = Languages.get('changeIconSelectFile');
|
||||||
|
} else if (response == 'size') {
|
||||||
|
error = Languages.get('changeIconSize');
|
||||||
|
} else if (response == 'bad_type') {
|
||||||
|
error = Languages.get('changeIconBadType');
|
||||||
|
} else if (response == 'bad_extension') {
|
||||||
|
error = Languages.get('changeIconBadExtension');
|
||||||
|
} else {
|
||||||
|
error = Languages.get('changeIconFailed');
|
||||||
|
}
|
||||||
|
|
||||||
|
// if there was an error, show it
|
||||||
|
if(error.length > 0) {
|
||||||
|
$('changeicon_error_msg').innerHTML = error;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Change a user's password
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
* @update Benjamin Hutchins
|
||||||
|
**/
|
||||||
|
changePass: function() {
|
||||||
|
var currentPw = $('currentpw').value, newPw = $('newpw').value, error = '';
|
||||||
|
|
||||||
|
if(hex_md5(currentPw) == pass) {
|
||||||
|
if(newPw == $('confirmpw').value) {
|
||||||
|
var xhConn = new XHConn();
|
||||||
|
xhConn.connect(pingTo, "POST", "call=pwdchange&username="+user+"&password="+hex_md5(currentPw)+"&newpwd="+newPw,
|
||||||
|
function(xh) {
|
||||||
|
if(xh.responseText == 'pw_changed') {
|
||||||
|
Dialog.closeInfo();
|
||||||
|
Dialog.alert('<span class="dialog_long_label lang-changeSuccess">' + Languages.get('changeSuccess') + '</span><div style="clear:both"></div>', {windowParameters: {className:'alert', width:alertWidth, height:85}, ok: function(win) { Dialog.closeInfo(); Windows.close('changePass'); setTimeout('System.logout();', 250); } });
|
||||||
|
} else if(xh.responseText == 'invalid_pw') {
|
||||||
|
error = Languages.get('currentPassInvalid');
|
||||||
|
$('currentpw').value = '';
|
||||||
|
} else if(xh.responseText == 'password_bad_length') {
|
||||||
|
error = Languages.get('changePasswordShort');
|
||||||
|
$('newpw').value = '';
|
||||||
|
$('confirmpw').value = '';
|
||||||
|
} else {
|
||||||
|
error = Languages.get('changeFailed');
|
||||||
|
}
|
||||||
|
if(error.length > 0) {
|
||||||
|
$('changepass_error_msg').innerHTML = error;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
error = Languages.get('changeNoMatch');
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
error = Languages.get('currentPassInvalid');
|
||||||
|
}
|
||||||
|
if(error.length > 0) {
|
||||||
|
$('changepass_error_msg').innerHTML = error;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reset a user's password to something new because they forgot it
|
||||||
|
*
|
||||||
|
* @author Joshua Gross
|
||||||
|
* @update Benjamin Hutchins
|
||||||
|
**/
|
||||||
|
resetPass: function() {
|
||||||
|
var xhConn = new XHConn();
|
||||||
|
xhConn.connect(pingTo, "POST", "call=reset&email="+encodeURIComponent($('resetto').value),
|
||||||
|
function(xh) {
|
||||||
|
var error = '';
|
||||||
|
if(xh.responseText == 'pw_reset') {
|
||||||
|
Dialog.alert('<span class="dialog_long_label lang-newPasswordEmailed langinsert-clear">' + Languages.get('newPasswordEmailed').replace('%1', $('resetto').value) + '</span><div style="clear:both"></div>', {windowParameters: {className:'alert', width:alertWidth}, ok:function(win) { clearInputs(); Dialog.closeInfo(); Dialogs.login(); }});
|
||||||
|
} else if(xh.responseText == 'no_email_on_record') {
|
||||||
|
error = Languages.get('noEmailOnRecord');
|
||||||
|
} else {
|
||||||
|
error = Languages.get('problemResetting');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (error.length > 0) {
|
||||||
|
$('forgotpass_error_msg').innerHTML = error;
|
||||||
|
$('forgotpass_error_msg').setStyle({display: 'block'});
|
||||||
|
new Effect.Shake('modal');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -0,0 +1,309 @@
|
|||||||
|
/*
|
||||||
|
* A JavaScript implementation of the RSA Data Security, Inc. MD5 Message
|
||||||
|
* Digest Algorithm, as defined in RFC 1321.
|
||||||
|
* Version 2.1 Copyright (C) Paul Johnston 1999 - 2002.
|
||||||
|
* Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
|
||||||
|
* Distributed under the BSD License
|
||||||
|
* See http://pajhome.org.uk/crypt/md5 for more info.
|
||||||
|
*/
|
||||||
|
var hexcase=0;var b64pad="";var chrsz=8;function hex_md5(s){return binl2hex(core_md5(str2binl(s),s.length*chrsz));}
|
||||||
|
function b64_md5(s){return binl2b64(core_md5(str2binl(s),s.length*chrsz));}
|
||||||
|
function str_md5(s){return binl2str(core_md5(str2binl(s),s.length*chrsz));}
|
||||||
|
function hex_hmac_md5(key,data){return binl2hex(core_hmac_md5(key,data));}
|
||||||
|
function b64_hmac_md5(key,data){return binl2b64(core_hmac_md5(key,data));}
|
||||||
|
function str_hmac_md5(key,data){return binl2str(core_hmac_md5(key,data));}
|
||||||
|
function md5_vm_test()
|
||||||
|
{return hex_md5("abc")=="900150983cd24fb0d6963f7d28e17f72";}
|
||||||
|
function core_md5(x,len)
|
||||||
|
{x[len>>5]|=0x80<<((len)%32);x[(((len+64)>>>9)<<4)+14]=len;var a=1732584193;var b=-271733879;var c=-1732584194;var d=271733878;for(var i=0;i<x.length;i+=16)
|
||||||
|
{var olda=a;var oldb=b;var oldc=c;var oldd=d;a=md5_ff(a,b,c,d,x[i+0],7,-680876936);d=md5_ff(d,a,b,c,x[i+1],12,-389564586);c=md5_ff(c,d,a,b,x[i+2],17,606105819);b=md5_ff(b,c,d,a,x[i+3],22,-1044525330);a=md5_ff(a,b,c,d,x[i+4],7,-176418897);d=md5_ff(d,a,b,c,x[i+5],12,1200080426);c=md5_ff(c,d,a,b,x[i+6],17,-1473231341);b=md5_ff(b,c,d,a,x[i+7],22,-45705983);a=md5_ff(a,b,c,d,x[i+8],7,1770035416);d=md5_ff(d,a,b,c,x[i+9],12,-1958414417);c=md5_ff(c,d,a,b,x[i+10],17,-42063);b=md5_ff(b,c,d,a,x[i+11],22,-1990404162);a=md5_ff(a,b,c,d,x[i+12],7,1804603682);d=md5_ff(d,a,b,c,x[i+13],12,-40341101);c=md5_ff(c,d,a,b,x[i+14],17,-1502002290);b=md5_ff(b,c,d,a,x[i+15],22,1236535329);a=md5_gg(a,b,c,d,x[i+1],5,-165796510);d=md5_gg(d,a,b,c,x[i+6],9,-1069501632);c=md5_gg(c,d,a,b,x[i+11],14,643717713);b=md5_gg(b,c,d,a,x[i+0],20,-373897302);a=md5_gg(a,b,c,d,x[i+5],5,-701558691);d=md5_gg(d,a,b,c,x[i+10],9,38016083);c=md5_gg(c,d,a,b,x[i+15],14,-660478335);b=md5_gg(b,c,d,a,x[i+4],20,-405537848);a=md5_gg(a,b,c,d,x[i+9],5,568446438);d=md5_gg(d,a,b,c,x[i+14],9,-1019803690);c=md5_gg(c,d,a,b,x[i+3],14,-187363961);b=md5_gg(b,c,d,a,x[i+8],20,1163531501);a=md5_gg(a,b,c,d,x[i+13],5,-1444681467);d=md5_gg(d,a,b,c,x[i+2],9,-51403784);c=md5_gg(c,d,a,b,x[i+7],14,1735328473);b=md5_gg(b,c,d,a,x[i+12],20,-1926607734);a=md5_hh(a,b,c,d,x[i+5],4,-378558);d=md5_hh(d,a,b,c,x[i+8],11,-2022574463);c=md5_hh(c,d,a,b,x[i+11],16,1839030562);b=md5_hh(b,c,d,a,x[i+14],23,-35309556);a=md5_hh(a,b,c,d,x[i+1],4,-1530992060);d=md5_hh(d,a,b,c,x[i+4],11,1272893353);c=md5_hh(c,d,a,b,x[i+7],16,-155497632);b=md5_hh(b,c,d,a,x[i+10],23,-1094730640);a=md5_hh(a,b,c,d,x[i+13],4,681279174);d=md5_hh(d,a,b,c,x[i+0],11,-358537222);c=md5_hh(c,d,a,b,x[i+3],16,-722521979);b=md5_hh(b,c,d,a,x[i+6],23,76029189);a=md5_hh(a,b,c,d,x[i+9],4,-640364487);d=md5_hh(d,a,b,c,x[i+12],11,-421815835);c=md5_hh(c,d,a,b,x[i+15],16,530742520);b=md5_hh(b,c,d,a,x[i+2],23,-995338651);a=md5_ii(a,b,c,d,x[i+0],6,-198630844);d=md5_ii(d,a,b,c,x[i+7],10,1126891415);c=md5_ii(c,d,a,b,x[i+14],15,-1416354905);b=md5_ii(b,c,d,a,x[i+5],21,-57434055);a=md5_ii(a,b,c,d,x[i+12],6,1700485571);d=md5_ii(d,a,b,c,x[i+3],10,-1894986606);c=md5_ii(c,d,a,b,x[i+10],15,-1051523);b=md5_ii(b,c,d,a,x[i+1],21,-2054922799);a=md5_ii(a,b,c,d,x[i+8],6,1873313359);d=md5_ii(d,a,b,c,x[i+15],10,-30611744);c=md5_ii(c,d,a,b,x[i+6],15,-1560198380);b=md5_ii(b,c,d,a,x[i+13],21,1309151649);a=md5_ii(a,b,c,d,x[i+4],6,-145523070);d=md5_ii(d,a,b,c,x[i+11],10,-1120210379);c=md5_ii(c,d,a,b,x[i+2],15,718787259);b=md5_ii(b,c,d,a,x[i+9],21,-343485551);a=safe_add(a,olda);b=safe_add(b,oldb);c=safe_add(c,oldc);d=safe_add(d,oldd);}
|
||||||
|
return Array(a,b,c,d);}
|
||||||
|
function md5_cmn(q,a,b,x,s,t)
|
||||||
|
{return safe_add(bit_rol(safe_add(safe_add(a,q),safe_add(x,t)),s),b);}
|
||||||
|
function md5_ff(a,b,c,d,x,s,t)
|
||||||
|
{return md5_cmn((b&c)|((~b)&d),a,b,x,s,t);}
|
||||||
|
function md5_gg(a,b,c,d,x,s,t)
|
||||||
|
{return md5_cmn((b&d)|(c&(~d)),a,b,x,s,t);}
|
||||||
|
function md5_hh(a,b,c,d,x,s,t)
|
||||||
|
{return md5_cmn(b^c^d,a,b,x,s,t);}
|
||||||
|
function md5_ii(a,b,c,d,x,s,t)
|
||||||
|
{return md5_cmn(c^(b|(~d)),a,b,x,s,t);}
|
||||||
|
function core_hmac_md5(key,data)
|
||||||
|
{var bkey=str2binl(key);if(bkey.length>16)bkey=core_md5(bkey,key.length*chrsz);var ipad=Array(16),opad=Array(16);for(var i=0;i<16;i++)
|
||||||
|
{ipad[i]=bkey[i]^0x36363636;opad[i]=bkey[i]^0x5C5C5C5C;}
|
||||||
|
var hash=core_md5(ipad.concat(str2binl(data)),512+data.length*chrsz);return core_md5(opad.concat(hash),512+128);}
|
||||||
|
function safe_add(x,y)
|
||||||
|
{var lsw=(x&0xFFFF)+(y&0xFFFF);var msw=(x>>16)+(y>>16)+(lsw>>16);return(msw<<16)|(lsw&0xFFFF);}
|
||||||
|
function bit_rol(num,cnt)
|
||||||
|
{return(num<<cnt)|(num>>>(32-cnt));}
|
||||||
|
function str2binl(str)
|
||||||
|
{var bin=Array();var mask=(1<<chrsz)-1;for(var i=0;i<str.length*chrsz;i+=chrsz)
|
||||||
|
bin[i>>5]|=(str.charCodeAt(i/chrsz)&mask)<<(i%32);return bin;}
|
||||||
|
function binl2str(bin)
|
||||||
|
{var str="";var mask=(1<<chrsz)-1;for(var i=0;i<bin.length*32;i+=chrsz)
|
||||||
|
str+=String.fromCharCode((bin[i>>5]>>>(i%32))&mask);return str;}
|
||||||
|
function binl2hex(binarray)
|
||||||
|
{var hex_tab=hexcase?"0123456789ABCDEF":"0123456789abcdef";var str="";for(var i=0;i<binarray.length*4;i++)
|
||||||
|
{str+=hex_tab.charAt((binarray[i>>2]>>((i%4)*8+4))&0xF)+
|
||||||
|
hex_tab.charAt((binarray[i>>2]>>((i%4)*8))&0xF);}
|
||||||
|
return str;}
|
||||||
|
function binl2b64(binarray)
|
||||||
|
{var tab="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";var str="";for(var i=0;i<binarray.length*4;i+=3)
|
||||||
|
{var triplet=(((binarray[i>>2]>>8*(i%4))&0xFF)<<16)|(((binarray[i+1>>2]>>8*((i+1)%4))&0xFF)<<8)|((binarray[i+2>>2]>>8*((i+2)%4))&0xFF);for(var j=0;j<4;j++)
|
||||||
|
{if(i*8+j*6>binarray.length*32)str+=b64pad;else str+=tab.charAt((triplet>>6*(3-j))&0x3F);}}
|
||||||
|
return str;}
|
||||||
|
|
||||||
|
/*
|
||||||
|
json
|
||||||
|
2006-04-28
|
||||||
|
|
||||||
|
This file adds these methods to JavaScript:
|
||||||
|
|
||||||
|
object.toJSONString()
|
||||||
|
|
||||||
|
This method produces a JSON text from an object. The
|
||||||
|
object must not contain any cyclical references.
|
||||||
|
|
||||||
|
array.toJSONString()
|
||||||
|
|
||||||
|
This method produces a JSON text from an array. The
|
||||||
|
array must not contain any cyclical references.
|
||||||
|
|
||||||
|
string.parseJSON()
|
||||||
|
|
||||||
|
This method parses a JSON text to produce an object or
|
||||||
|
array. It will return false if there is an error.
|
||||||
|
*/
|
||||||
|
(function () {
|
||||||
|
var m = {
|
||||||
|
'\b': '\\b',
|
||||||
|
'\t': '\\t',
|
||||||
|
'\n': '\\n',
|
||||||
|
'\f': '\\f',
|
||||||
|
'\r': '\\r',
|
||||||
|
'"' : '\\"',
|
||||||
|
'\\': '\\\\'
|
||||||
|
},
|
||||||
|
s = {
|
||||||
|
array: function (x) {
|
||||||
|
var a = ['['], b, f, i, l = x.length, v;
|
||||||
|
for (i = 0; i < l; i += 1) {
|
||||||
|
v = x[i];
|
||||||
|
f = s[typeof v];
|
||||||
|
if (f) {
|
||||||
|
v = f(v);
|
||||||
|
if (typeof v == 'string') {
|
||||||
|
if (b) {
|
||||||
|
a[a.length] = ',';
|
||||||
|
}
|
||||||
|
a[a.length] = v;
|
||||||
|
b = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
a[a.length] = ']';
|
||||||
|
return a.join('');
|
||||||
|
},
|
||||||
|
'boolean': function (x) {
|
||||||
|
return String(x);
|
||||||
|
},
|
||||||
|
'null': function (x) {
|
||||||
|
return "null";
|
||||||
|
},
|
||||||
|
number: function (x) {
|
||||||
|
return isFinite(x) ? String(x) : 'null';
|
||||||
|
},
|
||||||
|
object: function (x) {
|
||||||
|
if (x) {
|
||||||
|
if (x instanceof Array) {
|
||||||
|
return s.array(x);
|
||||||
|
}
|
||||||
|
var a = ['{'], b, f, i, v;
|
||||||
|
for (i in x) {
|
||||||
|
v = x[i];
|
||||||
|
f = s[typeof v];
|
||||||
|
if (f) {
|
||||||
|
v = f(v);
|
||||||
|
if (typeof v == 'string') {
|
||||||
|
if (b) {
|
||||||
|
a[a.length] = ',';
|
||||||
|
}
|
||||||
|
a.push(s.string(i), ':', v);
|
||||||
|
b = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
a[a.length] = '}';
|
||||||
|
return a.join('');
|
||||||
|
}
|
||||||
|
return 'null';
|
||||||
|
},
|
||||||
|
string: function (x) {
|
||||||
|
if (/["\\\x00-\x1f]/.test(x)) {
|
||||||
|
x = x.replace(/([\x00-\x1f\\"])/g, function(a, b) {
|
||||||
|
var c = m[b];
|
||||||
|
if (c) {
|
||||||
|
return c;
|
||||||
|
}
|
||||||
|
c = b.charCodeAt();
|
||||||
|
return '\\u00' +
|
||||||
|
Math.floor(c / 16).toString(16) +
|
||||||
|
(c % 16).toString(16);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return '"' + x + '"';
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
Object.prototype.toJSONString = function () {
|
||||||
|
return s.object(this);
|
||||||
|
};
|
||||||
|
|
||||||
|
Array.prototype.toJSONString = function () {
|
||||||
|
return s.array(this);
|
||||||
|
};
|
||||||
|
})();
|
||||||
|
|
||||||
|
String.prototype.parseJSON = function () {
|
||||||
|
try {
|
||||||
|
return !(/[^,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]/.test(
|
||||||
|
this.replace(/"(\\.|[^"\\])*"/g, ''))) &&
|
||||||
|
eval('(' + this + ')');
|
||||||
|
} catch (e) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/** XHConn - Simple XMLHTTP Interface - bfults@gmail.com - 2005-04-08 **
|
||||||
|
** Code licensed under Creative Commons Attribution-ShareAlike License **
|
||||||
|
** http://creativecommons.org/licenses/by-sa/2.0/ **/
|
||||||
|
function XHConn()
|
||||||
|
{
|
||||||
|
var xmlhttp, bComplete = false;
|
||||||
|
xmlhttp = XHRFactory.getInstance();
|
||||||
|
if (!xmlhttp) return null;
|
||||||
|
this.connect = function(sURL, sMethod, sVars, fnDone)
|
||||||
|
{
|
||||||
|
if (!xmlhttp) return false;
|
||||||
|
bComplete = false;
|
||||||
|
sMethod = sMethod.toUpperCase();
|
||||||
|
|
||||||
|
try {
|
||||||
|
if (sMethod == "GET")
|
||||||
|
{
|
||||||
|
xmlhttp.open(sMethod, sURL+"?"+sVars, true);
|
||||||
|
sVars = "";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
xmlhttp.open(sMethod, sURL, true);
|
||||||
|
xmlhttp.setRequestHeader("Method", "POST "+sURL+" HTTP/1.1");
|
||||||
|
xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
|
||||||
|
}
|
||||||
|
xmlhttp.onreadystatechange = function(){
|
||||||
|
if (xmlhttp.readyState == 4 && !bComplete)
|
||||||
|
{
|
||||||
|
bComplete = true;
|
||||||
|
if(fnDone != null) fnDone(xmlhttp);
|
||||||
|
XHRFactory.release(xmlhttp);
|
||||||
|
}};
|
||||||
|
xmlhttp.send(sVars);
|
||||||
|
}
|
||||||
|
catch(z) { return false; }
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/** XHRFactory **
|
||||||
|
** This class from: http://blogs.pathf.com/agileajax/2006/08/object_pooling_.html **/
|
||||||
|
var XHRFactory = (function(){
|
||||||
|
// static private member
|
||||||
|
var stack = new Array();
|
||||||
|
var poolSize = 10;
|
||||||
|
|
||||||
|
var nullFunction = function() {}; // for nuking the onreadystatechange
|
||||||
|
|
||||||
|
// private static methods
|
||||||
|
|
||||||
|
function createXHR() {
|
||||||
|
if (window.XMLHttpRequest) {
|
||||||
|
return new XMLHttpRequest();
|
||||||
|
} else if (window.ActiveXObject) {
|
||||||
|
return new ActiveXObject('Microsoft.XMLHTTP')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// cache a few for use
|
||||||
|
for (var i = 0; i < poolSize; i++) {
|
||||||
|
stack.push(createXHR());
|
||||||
|
}
|
||||||
|
|
||||||
|
// shared instance methods
|
||||||
|
return ({
|
||||||
|
release:function(xhr){
|
||||||
|
xhr.onreadystatechange = nullFunction;
|
||||||
|
stack.push(xhr);
|
||||||
|
},
|
||||||
|
getInstance:function(){
|
||||||
|
if (stack.length < 1) {
|
||||||
|
return createXHR();
|
||||||
|
} else {
|
||||||
|
return stack.pop();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
toString:function(){
|
||||||
|
return "stack size = " + stack.length;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})();
|
||||||
|
|
||||||
|
// Adapted from DOM Ready extension by Dan Webb
|
||||||
|
// http://www.vivabit.com/bollocks/2006/06/21/a-dom-ready-extension-for-prototype
|
||||||
|
// which was based on work by Matthias Miller, Dean Edwards and John Resig
|
||||||
|
//
|
||||||
|
// Usage:
|
||||||
|
//
|
||||||
|
// Event.onReady(callbackFunction);
|
||||||
|
Object.extend(Event, {
|
||||||
|
_domReady : function() {
|
||||||
|
if (arguments.callee.done) return;
|
||||||
|
arguments.callee.done = true;
|
||||||
|
|
||||||
|
if (Event._timer) clearInterval(Event._timer);
|
||||||
|
|
||||||
|
Event._readyCallbacks.each(function(f) { f() });
|
||||||
|
Event._readyCallbacks = null;
|
||||||
|
|
||||||
|
},
|
||||||
|
onReady : function(f) {
|
||||||
|
if (!this._readyCallbacks) {
|
||||||
|
var domReady = this._domReady;
|
||||||
|
|
||||||
|
if (domReady.done) return f();
|
||||||
|
|
||||||
|
if (document.addEventListener)
|
||||||
|
document.addEventListener("DOMContentLoaded", domReady, false);
|
||||||
|
|
||||||
|
/*@cc_on @*/
|
||||||
|
/*@if (@_win32)
|
||||||
|
var dummy = location.protocol == "https:" ? "https://javascript:void(0)" : "javascript:void(0)";
|
||||||
|
document.write("<script id=__ie_onload defer src='" + dummy + "'><\/script>");
|
||||||
|
document.getElementById("__ie_onload").onreadystatechange = function() {
|
||||||
|
if (this.readyState == "complete") { domReady(); }
|
||||||
|
};
|
||||||
|
/*@end @*/
|
||||||
|
|
||||||
|
if (/WebKit/i.test(navigator.userAgent)) {
|
||||||
|
this._timer = setInterval(function() {
|
||||||
|
if (/loaded|complete/.test(document.readyState)) domReady();
|
||||||
|
}, 10);
|
||||||
|
}
|
||||||
|
|
||||||
|
Event.observe(window, 'load', domReady);
|
||||||
|
Event._readyCallbacks = [];
|
||||||
|
}
|
||||||
|
Event._readyCallbacks.push(f);
|
||||||
|
}
|
||||||
|
});
|
||||||
@@ -0,0 +1,432 @@
|
|||||||
|
<?php
|
||||||
|
// Thanks David Majnemer
|
||||||
|
|
||||||
|
// encode/decode stuff is borrowed from the Zend Framework which is released under the New BSD License
|
||||||
|
if (function_exists('json_encode') && function_exists('json_decode'))
|
||||||
|
{
|
||||||
|
class JSON_obj
|
||||||
|
{
|
||||||
|
function encode($data)
|
||||||
|
{
|
||||||
|
return json_encode($data);
|
||||||
|
}
|
||||||
|
|
||||||
|
function decode($data)
|
||||||
|
{
|
||||||
|
return json_decode($data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
class JSON_obj
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Parse tokens used to decode the JSON object. These are not
|
||||||
|
* for public consumption, they are just used internally to the
|
||||||
|
* class.
|
||||||
|
*/
|
||||||
|
|
||||||
|
function JSON_obj()
|
||||||
|
{
|
||||||
|
define('EOF', 0);
|
||||||
|
define('DATUM', 1);
|
||||||
|
define('LBRACE', 2);
|
||||||
|
define('LBRACKET', 3);
|
||||||
|
define('RBRACE', 4);
|
||||||
|
define('RBRACKET', 5);
|
||||||
|
define('COMMA', 6);
|
||||||
|
define('COLON', 7);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Use to maintain a "pointer" to the source being decoded
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
var $_source;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Caches the source length
|
||||||
|
*
|
||||||
|
* @var int
|
||||||
|
*/
|
||||||
|
var $_sourceLength;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The offset within the souce being decoded
|
||||||
|
*
|
||||||
|
* @var int
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
var $_offset;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The current token being considered in the parser cycle
|
||||||
|
*
|
||||||
|
* @var int
|
||||||
|
*/
|
||||||
|
var $_token;
|
||||||
|
|
||||||
|
function encode($value)
|
||||||
|
{
|
||||||
|
return $this->_encodeValue($value);
|
||||||
|
}
|
||||||
|
|
||||||
|
function _encodeArray(&$array)
|
||||||
|
{
|
||||||
|
$tmpArray = array();
|
||||||
|
|
||||||
|
// Check for associative array
|
||||||
|
if (!empty($array) && (array_keys($array) !== range(0, count($array) - 1)))
|
||||||
|
{
|
||||||
|
// Associative array
|
||||||
|
$result = '{';
|
||||||
|
foreach ($array as $key => $value)
|
||||||
|
{
|
||||||
|
$key = (string) $key;
|
||||||
|
$tmpArray[] = $this->_encodeString($key) . ':' . $this->_encodeValue($value);
|
||||||
|
}
|
||||||
|
$result .= implode(',', $tmpArray);
|
||||||
|
$result .= '}';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Indexed array
|
||||||
|
$result = '[';
|
||||||
|
$length = count($array);
|
||||||
|
for ($i = 0; $i < $length; ++$i)
|
||||||
|
{
|
||||||
|
$tmpArray[] = $this->_encodeValue($array[$i]);
|
||||||
|
}
|
||||||
|
$result .= implode(',', $tmpArray);
|
||||||
|
$result .= ']';
|
||||||
|
}
|
||||||
|
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
|
function _encodeValue(&$value)
|
||||||
|
{
|
||||||
|
if (is_array($value))
|
||||||
|
{
|
||||||
|
return $this->_encodeArray($value);
|
||||||
|
}
|
||||||
|
else if (is_int($value) || is_float($value))
|
||||||
|
{
|
||||||
|
return (string) $value;
|
||||||
|
}
|
||||||
|
else if (is_string($value))
|
||||||
|
{
|
||||||
|
return $this->_encodeString($value);
|
||||||
|
}
|
||||||
|
else if (is_bool($value))
|
||||||
|
{
|
||||||
|
return $value ? 'true' : 'false';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function _encodeString(&$string)
|
||||||
|
{
|
||||||
|
// Escape these characters with a backslash:
|
||||||
|
// " \ / \n \r \t \b \f
|
||||||
|
$search = array('\\', "\n", "\t", "\r", "\b", "\f", '"');
|
||||||
|
$replace = array('\\\\', '\\n', '\\t', '\\r', '\\b', '\\f', '\"');
|
||||||
|
$string = str_replace($search, $replace, $string);
|
||||||
|
|
||||||
|
// Escape certain ASCII characters:
|
||||||
|
// 0x08 => \b
|
||||||
|
// 0x0c => \f
|
||||||
|
$string = str_replace(array(chr(0x08), chr(0x0C)), array('\b', '\f'), $string);
|
||||||
|
|
||||||
|
return '"' . $string . '"';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @param string $source String source to decode
|
||||||
|
* @param int $decodeType How objects should be decoded -- see
|
||||||
|
* {@link Zend_Json::TYPE_ARRAY} and {@link Zend_Json::TYPE_OBJECT} for
|
||||||
|
* valid values
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
function decode($source)
|
||||||
|
{
|
||||||
|
// Set defaults
|
||||||
|
$this->_source = $source;
|
||||||
|
$this->_sourceLength = strlen($source);
|
||||||
|
$this->_token = EOF;
|
||||||
|
$this->_offset = 0;
|
||||||
|
|
||||||
|
// Set pointer at first token
|
||||||
|
$this->_getNextToken();
|
||||||
|
return $this->_decodeValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Recursive driving rountine for supported toplevel tops
|
||||||
|
*
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
function _decodeValue()
|
||||||
|
{
|
||||||
|
switch ($this->_token)
|
||||||
|
{
|
||||||
|
case DATUM:
|
||||||
|
$result = $this->_tokenValue;
|
||||||
|
$this->_getNextToken();
|
||||||
|
return $result;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case LBRACE:
|
||||||
|
return $this->_decodeObject();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case LBRACKET:
|
||||||
|
return $this->_decodeArray();
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return null;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Decodes an object of the form:
|
||||||
|
* { "attribute: value, "attribute2" : value,...}
|
||||||
|
*
|
||||||
|
* If ZJsonEnoder or ZJAjax was used to encode the original object
|
||||||
|
* then a special attribute called __className which specifies a class
|
||||||
|
* name that should wrap the data contained within the encoded source.
|
||||||
|
*
|
||||||
|
* Decodes to either an array or StdClass object, based on the value of
|
||||||
|
* {@link $_decodeType}. If invalid $_decodeType present, returns as an
|
||||||
|
* array.
|
||||||
|
*
|
||||||
|
* @return array|StdClass
|
||||||
|
*/
|
||||||
|
function _decodeObject()
|
||||||
|
{
|
||||||
|
$result = array();
|
||||||
|
$tok = $this->_getNextToken();
|
||||||
|
|
||||||
|
while ($tok && $tok != RBRACE)
|
||||||
|
{
|
||||||
|
|
||||||
|
$key = $this->_tokenValue;
|
||||||
|
|
||||||
|
$this->_getNextToken();
|
||||||
|
|
||||||
|
$tok = $this->_getNextToken();
|
||||||
|
$result[$key] = $this->_decodeValue();
|
||||||
|
$tok = $this->_token;
|
||||||
|
|
||||||
|
if ($tok == RBRACE)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
$tok = $this->_getNextToken();
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->_getNextToken();
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Decodes a JSON array format:
|
||||||
|
* [element, element2,...,elementN]
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
function _decodeArray()
|
||||||
|
{
|
||||||
|
$result = array();
|
||||||
|
$tok = $this->_getNextToken(); // Move past the '['
|
||||||
|
$index = 0;
|
||||||
|
|
||||||
|
while ($tok && $tok != RBRACKET)
|
||||||
|
{
|
||||||
|
$result[$index++] = $this->_decodeValue();
|
||||||
|
|
||||||
|
$tok = $this->_token;
|
||||||
|
|
||||||
|
if ($tok == RBRACKET || !$tok)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
$tok = $this->_getNextToken();
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->_getNextToken();
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves the next token from the source stream
|
||||||
|
*
|
||||||
|
* @return int Token constant value specified in class definition
|
||||||
|
*/
|
||||||
|
function _getNextToken()
|
||||||
|
{
|
||||||
|
$this->_token = EOF;
|
||||||
|
$this->_tokenValue = null;
|
||||||
|
|
||||||
|
if (preg_match('/([\t\b\f\n\r ]+)/', $this->_source, $matches, PREG_OFFSET_CAPTURE, $this->_offset) && $matches[0][1] == $this->_offset)
|
||||||
|
{
|
||||||
|
$this->_offset += strlen($matches[0][0]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($this->_offset >= $this->_sourceLength)
|
||||||
|
{
|
||||||
|
return EOF;
|
||||||
|
}
|
||||||
|
|
||||||
|
$str = $this->_source;
|
||||||
|
$str_length = $this->_sourceLength;
|
||||||
|
$i = $this->_offset;
|
||||||
|
$start = $i;
|
||||||
|
|
||||||
|
switch ($str[$i])
|
||||||
|
{
|
||||||
|
case '{':
|
||||||
|
$this->_token = LBRACE;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case '}':
|
||||||
|
$this->_token = RBRACE;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case '[':
|
||||||
|
$this->_token = LBRACKET;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case ']':
|
||||||
|
$this->_token = RBRACKET;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case ',':
|
||||||
|
$this->_token = COMMA;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case ':':
|
||||||
|
$this->_token = COLON;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case '"':
|
||||||
|
$result = '';
|
||||||
|
do
|
||||||
|
{
|
||||||
|
if ($i++ >= $str_length)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
$chr = $str[$i];
|
||||||
|
if ($chr == '\\')
|
||||||
|
{
|
||||||
|
if ($i++ >= $str_length)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
$chr = $str[$i];
|
||||||
|
switch ($chr)
|
||||||
|
{
|
||||||
|
case '"' :
|
||||||
|
$result .= '"';
|
||||||
|
break;
|
||||||
|
case '\\':
|
||||||
|
$result .= '\\';
|
||||||
|
break;
|
||||||
|
case '/' :
|
||||||
|
$result .= '/';
|
||||||
|
break;
|
||||||
|
case 'b' :
|
||||||
|
$result .= chr(8);
|
||||||
|
break;
|
||||||
|
case 'f' :
|
||||||
|
$result .= chr(12);
|
||||||
|
break;
|
||||||
|
case 'n' :
|
||||||
|
$result .= chr(10);
|
||||||
|
break;
|
||||||
|
case 'r' :
|
||||||
|
$result .= chr(13);
|
||||||
|
break;
|
||||||
|
case 't' :
|
||||||
|
$result .= chr(9);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if ($chr == '"')
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$result .= $chr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
while ($i < $str_length);
|
||||||
|
|
||||||
|
$this->_token = DATUM;
|
||||||
|
//$this->_tokenValue = substr($str, $start + 1, $i - $start - 1);
|
||||||
|
$this->_tokenValue = $result;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 't':
|
||||||
|
if (($i + 3) < $str_length && substr($str, $start, 4) == 'true')
|
||||||
|
{
|
||||||
|
$this->_token = DATUM;
|
||||||
|
}
|
||||||
|
$this->_tokenValue = true;
|
||||||
|
$i += 3;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'f':
|
||||||
|
if (($i + 4) < $str_length && substr($str, $start, 5) == 'false')
|
||||||
|
{
|
||||||
|
$this->_token = DATUM;
|
||||||
|
}
|
||||||
|
$this->_tokenValue = false;
|
||||||
|
$i += 4;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'n':
|
||||||
|
if (($i + 3) < $str_length && substr($str, $start, 4) == 'null')
|
||||||
|
{
|
||||||
|
$this->_token = DATUM;
|
||||||
|
}
|
||||||
|
$this->_tokenValue = NULL;
|
||||||
|
$i += 3;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($this->_token != EOF)
|
||||||
|
{
|
||||||
|
$this->_offset = $i + 1; // Consume the last token character
|
||||||
|
return($this->_token);
|
||||||
|
}
|
||||||
|
|
||||||
|
$chr = $str[$i];
|
||||||
|
if (preg_match('/-?([0-9]*)(\.[0-9]*)?(([eE])[-+]?[0-9]+)?/s', $str, $matches, PREG_OFFSET_CAPTURE, $start) && $matches[0][1] == $start)
|
||||||
|
{
|
||||||
|
$datum = $matches[0][0];
|
||||||
|
|
||||||
|
$val = intval($datum);
|
||||||
|
$fVal = floatval($datum);
|
||||||
|
$this->_tokenValue = ($val == $fVal ? $val : $fVal);
|
||||||
|
|
||||||
|
$this->_token = DATUM;
|
||||||
|
$this->_offset = $start + strlen($datum);
|
||||||
|
}
|
||||||
|
|
||||||
|
return($this->_token);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
@@ -0,0 +1,145 @@
|
|||||||
|
// Brazilian Portuguese
|
||||||
|
// Hilton Perantunes
|
||||||
|
|
||||||
|
Languages.onLoad('brazilian_portuguese', {
|
||||||
|
// Login
|
||||||
|
'signOn': 'Entrar',
|
||||||
|
'incorrectInfo': 'Usuário ou senha incorretos!',
|
||||||
|
'userBanned': 'Você foi banido!',
|
||||||
|
|
||||||
|
// Buddylist
|
||||||
|
'buddyList': 'Lista de contatos',
|
||||||
|
'addBuddyButton': 'Adicionar contato',
|
||||||
|
'joinChatroomButton': 'Entrar em sala de chat',
|
||||||
|
'removeBuddyButton': 'Remover contato',
|
||||||
|
'IMAnyoneButton': 'Converse com alguém',
|
||||||
|
'changePasswordButton': 'Alterar senha',
|
||||||
|
'toggleSoundButton': 'Som',
|
||||||
|
'signOff': 'Sair',
|
||||||
|
'offline': 'Desconectado', // Automatic buddylist group
|
||||||
|
'noSuchGroup': 'O grupo não existe na lista de contatos!',
|
||||||
|
|
||||||
|
// Statuses
|
||||||
|
'available': 'Disponível',
|
||||||
|
|
||||||
|
// Registration
|
||||||
|
'register': 'Registrar',
|
||||||
|
'confirm': 'Confirmar',
|
||||||
|
'registerSuccess': 'Registro efetuado com sucesso!',
|
||||||
|
'registerUsernameTaken': 'O nome de usuário escolhido já está em uso',
|
||||||
|
'registerUsernameBad': 'Nomes de usuário podem conter apenas letras, números, _,<br />e ter de 3 a 16 caracteres.',
|
||||||
|
'registerPasswordShort': 'Senhas precisam ter de 6 a 20 caracteres!',
|
||||||
|
'registerInvalidEmail': 'Endereço de email inválido!',
|
||||||
|
'registerEmailTaken': 'Já há um usuário registrado com este endereço de email!',
|
||||||
|
'registerFailed': 'O registro falhou! Por favor, tente novamente mais tarde.',
|
||||||
|
'registerPasswordsMatch': 'As senhas não conferem!',
|
||||||
|
|
||||||
|
// Chatrooms
|
||||||
|
'hasJoined': 'entrou.',
|
||||||
|
'hasLeft': 'saiu.',
|
||||||
|
|
||||||
|
// IMs
|
||||||
|
'notifySentButOffline': 'Nota: Este usuário está atualmente desconectado, mas irá receber sua mensagem quando conectar novamente.',
|
||||||
|
'errorNotLoggedIn': 'Erro: Sua mensagem não pôde ser enviada porque o contato não está mais conectado.',
|
||||||
|
'errorMsgTooLong': 'Erro: Sua mensagem não pôde ser enviada porque é longa demais.',
|
||||||
|
'errorUnknown': 'Erro: Ocorreu um erro durante o envio de sua mensagem.',
|
||||||
|
'bold': 'Negrito',
|
||||||
|
'italic': 'Itálico',
|
||||||
|
'underline': 'Sublinhado',
|
||||||
|
|
||||||
|
// New IM Dialog
|
||||||
|
'newIM': 'Nova mensagem instantânea...',
|
||||||
|
'newIMPlease': 'Por favor, digite o nome de usuário da pessoa com quem você deseja conversar.',
|
||||||
|
'newIMProper': 'Por favor, digite um nome de usuário válido!',
|
||||||
|
'openIM': 'Iniciar conversa',
|
||||||
|
|
||||||
|
// New Room Dialog
|
||||||
|
'newRoom': 'Entrar em sala de bate-papo...',
|
||||||
|
'newRoomPlease': 'Por favor, digite o nome da sala na qual deseja entrar.',
|
||||||
|
'alreadyInRoom': 'Você já está em "%1"',
|
||||||
|
'invalidRoom': 'O nome de sala escolhido é inválido.',
|
||||||
|
'invalidRoomChars': 'O nome da sala contém caracteres inválidos!',
|
||||||
|
'joinRoom': 'Entrar',
|
||||||
|
'roomname': 'Nome da sala',
|
||||||
|
|
||||||
|
// New Buddy Dialog
|
||||||
|
'newBuddy': 'Adicionar um contato',
|
||||||
|
'newBuddyPlease': 'Por favor, digite o nome de usuário que você deseja adicionar em sua lista de contatos.',
|
||||||
|
'noSuchUser': 'Este usuário não está registrado!',
|
||||||
|
'alreadyOnBuddylist': 'Este usuário já está em sua lista de contatos!',
|
||||||
|
'add': 'Adicionar',
|
||||||
|
'addtogroup': 'Adicionar ao grupo',
|
||||||
|
|
||||||
|
// Remove Buddy Dialog
|
||||||
|
'removeBuddy': 'Remover contato',
|
||||||
|
'removeBuddyAreYouSure': 'Tem certeza que deseja remover o contato "<b>%1</b>" de sua lista?',
|
||||||
|
|
||||||
|
// Block Buddy Dialog
|
||||||
|
'blockBuddy': 'Bloquear contato',
|
||||||
|
'unblockBuddy': 'Desbloquear contato',
|
||||||
|
'blockBuddyAreYouSure': 'Tem certeza que deseja bloquear o contato "<b>%1</b>"?',
|
||||||
|
'unblockBuddyAreYouSure': 'Tem certeza que deseja desbloquear o contato "<b>%1</b>"?',
|
||||||
|
|
||||||
|
// Remove Group Dialog
|
||||||
|
'removeGroup': 'Remover um grupo',
|
||||||
|
'removeGroupAreYouSure': 'Tem certeza que deseja remover o grupo "<b>%1</b>" (e todos os usuários nele) de sua lista?',
|
||||||
|
|
||||||
|
// Change Password Dialog
|
||||||
|
'changePassword': 'Alterar a senha',
|
||||||
|
'changePasswordInstructions': 'Para alterar sua senha digite a atual e, em seguida, sua nova senha.',
|
||||||
|
'currentPassword': 'Senha atual',
|
||||||
|
'newPassword': 'Nova senha',
|
||||||
|
'confirmPassword': 'Confirmar senha',
|
||||||
|
'changeSuccess': "A mudança de senha foi realizada com sucesso!\nPor favor, conecte-se novamente.",
|
||||||
|
'currentPassInvalid': 'A "senha atual" digitada é inválida.',
|
||||||
|
'changePasswordShort': 'Senhas precisam ter de 6 a 20 caracteres!',
|
||||||
|
'changeFailed': 'Ocorreu um problema processando sua alteração de senha. Por favor, tente novamente mais tarde.',
|
||||||
|
'changeNoMatch': 'As senhas não conferem!',
|
||||||
|
'change': 'Alterar',
|
||||||
|
|
||||||
|
// Reset Password
|
||||||
|
'reset': 'Enviar',
|
||||||
|
'forgotPassword': 'Esqueci a senha',
|
||||||
|
'passwordReset': 'Nova senha',
|
||||||
|
'emailAddress': 'Seu Email',
|
||||||
|
'newPasswordEmailed': 'Sua nova senha foi enviada por email para %1',
|
||||||
|
'noEmailOnRecord': 'O endereço de email não está cadastrado por nenhum usuário.',
|
||||||
|
'problemResetting': 'Ocorreu um problema ao solicitar sua nova senha.<br />Por favor, tente novamente mais tarde.',
|
||||||
|
|
||||||
|
// Statuses
|
||||||
|
'available': 'Disponível',
|
||||||
|
'friendsOnly': 'Somente amigos',
|
||||||
|
'busy': 'Ocupado',
|
||||||
|
'beBackLater': 'Volto logo',
|
||||||
|
'away': 'Ausente',
|
||||||
|
'custom': 'Mensagem personalizada...',
|
||||||
|
'invisible': 'Invisível',
|
||||||
|
|
||||||
|
// Miscellaneous
|
||||||
|
'autoreply': 'Auto-resposta',
|
||||||
|
'signedOff': 'Você desconectou!',
|
||||||
|
'reconnect': 'Conectar novamente',
|
||||||
|
'onunload': 'Se esta ação for realizada, você será desconectado do mensageiro instantâneo.',
|
||||||
|
'ok': 'Ok',
|
||||||
|
'cancel': 'Cancelar',
|
||||||
|
'username': 'Usuário',
|
||||||
|
'password': 'Senha',
|
||||||
|
'email': 'Email',
|
||||||
|
'search': 'Buscar',
|
||||||
|
'searchAgain': 'Buscar Novamente',
|
||||||
|
|
||||||
|
// Admin - User Search
|
||||||
|
'admin-userSearch': 'Buscar usuário',
|
||||||
|
'admin-chooseByAndSearch': 'Escolha o tipo de busca e digite as informações apropriadas. Coringas (*) são permitidos.',
|
||||||
|
'admin-searchType': 'Tipo de busca',
|
||||||
|
'admin-lastKnownIP': 'IP mais recente',
|
||||||
|
'admin-lastActive': 'Última atividade',
|
||||||
|
'admin-status': 'Status',
|
||||||
|
'admin-kick': 'Expulsar',
|
||||||
|
'admin-ban': 'Banir',
|
||||||
|
'admin-unban': 'Desbanir',
|
||||||
|
'admin-makeAdmin': 'Tornar admin',
|
||||||
|
'admin-removeAdmin': 'Remover admin',
|
||||||
|
'admin-banned': 'Banido',
|
||||||
|
'admin-admin': 'Admin'
|
||||||
|
});
|
||||||
@@ -0,0 +1,145 @@
|
|||||||
|
// Dutch Language
|
||||||
|
// by JulesJ (http://www.julesj.nl/blog/)
|
||||||
|
|
||||||
|
Languages.onLoad('dutch', {
|
||||||
|
// Login
|
||||||
|
'signOn': 'Inloggen',
|
||||||
|
'incorrectInfo': 'Gebruikersnaam of wachtwoord incorrect!',
|
||||||
|
'userBanned': 'Je bent geband!',
|
||||||
|
|
||||||
|
// Buddylist
|
||||||
|
'buddyList': 'Contactenlijst',
|
||||||
|
'addBuddyButton': 'Voeg contact toe',
|
||||||
|
'joinChatroomButton': 'Ga chatroom in',
|
||||||
|
'removeBuddyButton': 'Verwijder contact',
|
||||||
|
'IMAnyoneButton': 'IM Iedereen',
|
||||||
|
'changePasswordButton': 'Wijzig wachtwoord',
|
||||||
|
'toggleSoundButton': 'Muziek aan/uit',
|
||||||
|
'signOff': 'Uitloggen',
|
||||||
|
'offline': 'Offline', // Automatic buddylist group
|
||||||
|
'noSuchGroup': 'Deze groep bestaat niet in de contactenlijst!',
|
||||||
|
|
||||||
|
// Statuses
|
||||||
|
'available': 'Beschikbaar',
|
||||||
|
|
||||||
|
// Registration
|
||||||
|
'register': 'Registreer',
|
||||||
|
'confirm': 'Bevestig',
|
||||||
|
'registerSuccess': 'Registratie succesvol!',
|
||||||
|
'registerUsernameTaken': 'De gekozen gebruikersnaam is reeds in gebruik',
|
||||||
|
'registerUsernameBad': 'De gebruikersnaam mag alleen letters, nummers en _ bevatten<br/>en moet 3 tot 16 tekens lang zijn.',
|
||||||
|
'registerPasswordShort': 'Het wachtwoord moet 6 tot 20 tekens bevatten!',
|
||||||
|
'registerInvalidEmail': 'Ongeldig email adres!',
|
||||||
|
'registerEmailTaken': 'Er is reeds een gebruiker geregistreerd met dat email adres!',
|
||||||
|
'registerFailed': 'Registratie mislukt! Probeer het later nog eens.',
|
||||||
|
'registerPasswordsMatch': 'De wachtwoorden komen niet overeen!',
|
||||||
|
|
||||||
|
// Chatrooms
|
||||||
|
'hasJoined': 'is ingelogd.',
|
||||||
|
'hasLeft': 'is uitgelogd.',
|
||||||
|
|
||||||
|
// IMs
|
||||||
|
'notifySentButOffline': 'Note: Deze gebruiker is momenteel offline, maar zal de berichten bij inloggen ontvangen.',
|
||||||
|
'errorNotLoggedIn': 'Fout: Je bericht kon niet worden verstuurd omdat de gebruiker offline is.',
|
||||||
|
'errorMsgTooLong': 'Fout: Je bericht kon niet worden verstuurd omdat het te lang is.',
|
||||||
|
'errorUnknown': 'Fout: Er is een onbekende fout opgetreden bij het versturen van je bericht.',
|
||||||
|
'bold': 'Dikgedrukt',
|
||||||
|
'italic': 'Schuingedrukt',
|
||||||
|
'underline': 'Onderstreept',
|
||||||
|
|
||||||
|
// New IM Dialog
|
||||||
|
'newIM': 'Nieuw chatbericht...',
|
||||||
|
'newIMPlease': 'Vul de gebruikersnaam in van diegene die je een bericht wil versturen.',
|
||||||
|
'newIMProper': 'Vul aub een correcte gebruikersnaam in!',
|
||||||
|
'openIM': 'Open IM',
|
||||||
|
|
||||||
|
// New Room Dialog
|
||||||
|
'newRoom': 'Ga een chatroom in...',
|
||||||
|
'newRoomPlease': 'Vul de naam in van de gewenste chatroom.',
|
||||||
|
'alreadyInRoom': 'Je bent reeds in "%1"',
|
||||||
|
'invalidRoom': 'De gekozen naam is ongeldig.',
|
||||||
|
'invalidRoomChars': 'De naam bevat ongeldige tekens!',
|
||||||
|
'joinRoom': 'Ga naar binnen',
|
||||||
|
'roomname': 'Naam chatroom',
|
||||||
|
|
||||||
|
// New Buddy Dialog
|
||||||
|
'newBuddy': 'Voeg een contact toe',
|
||||||
|
'newBuddyPlease': 'Vul de naam in van het contact dat je wil toevoegen.',
|
||||||
|
'noSuchUser': 'Deze gebruiker is niet geregistreerd!',
|
||||||
|
'alreadyOnBuddylist': 'Deze gebruiker staat reeds in je contactlijst!',
|
||||||
|
'add': 'Toevoegen',
|
||||||
|
'addtogroup': 'Toevoegen aan groep',
|
||||||
|
|
||||||
|
// Remove Buddy Dialog
|
||||||
|
'removeBuddy': 'Vewijder contact',
|
||||||
|
'removeBuddyAreYouSure': 'Weet je zeker dat je "<b>%1</b>" wil verwijderen?',
|
||||||
|
|
||||||
|
// Block Buddy Dialog
|
||||||
|
'blockBuddy': 'Blokkeer contact',
|
||||||
|
'unblockBuddy': 'Deblokkeer contact',
|
||||||
|
'blockBuddyAreYouSure': 'Weet je zeker dat je "<b>%1</b>" wil blokkeren?',
|
||||||
|
'unblockBuddyAreYouSure': 'Weet je zeker dat je "<b>%1</b>" wil deblokkeren?',
|
||||||
|
|
||||||
|
// Remove Group Dialog
|
||||||
|
'removeGroup': 'Verwijder een groep',
|
||||||
|
'removeGroupAreYouSure': 'Weet je zeker dat je de groep "<b>%1</b>" (en alle onderliggende contacten) wil verwijderen?',
|
||||||
|
|
||||||
|
// Change Password Dialog
|
||||||
|
'changePassword': 'Wijzig wachtwoord',
|
||||||
|
'changePasswordInstructions': 'Om je wachtwoord te wijzigen vul je oude wachtwoord in en daarna het nieuwe',
|
||||||
|
'currentPassword': 'Huidig wachtwoord',
|
||||||
|
'newPassword': 'Nieuw wachtwoord',
|
||||||
|
'confirmPassword': 'Bevestig wachtwoord',
|
||||||
|
'changeSuccess': "Je wachtwoord is succesvol aangepast!\nLog aub opnieuw in.",
|
||||||
|
'currentPassInvalid': 'Het "huidige wachtwoord" dat je invulde is niet correct.',
|
||||||
|
'changePasswordShort': 'Een wachtwoord moet 6 tot 20 tekens lang zijn!',
|
||||||
|
'changeFailed': 'Het veranderen van je wacthwoord is niet gelukt. Probeer het later nog eens.',
|
||||||
|
'changeNoMatch': 'Je wachtwoorden komen niet overeen!',
|
||||||
|
'change': 'Wijzig',
|
||||||
|
|
||||||
|
// Reset Password
|
||||||
|
'reset': 'Reset',
|
||||||
|
'forgotPassword': 'Wachtwoord vergeten',
|
||||||
|
'passwordReset': 'Wachtwoord herstellen',
|
||||||
|
'emailAddress': 'Email Adres',
|
||||||
|
'newPasswordEmailed': 'Je nieuwe wachtwoord is gemailed naar %1',
|
||||||
|
'noEmailOnRecord': 'Er is geen gebruiker geregistreerd met dat email adres.',
|
||||||
|
'problemResetting': 'Het resetten van je wachtwoord is niet gelukt.<br />Probeer het later nog eens.',
|
||||||
|
|
||||||
|
// Statuses
|
||||||
|
'available': 'Beschikbaar',
|
||||||
|
'friendsOnly': 'Alleen vrienden',
|
||||||
|
'busy': 'Bezig',
|
||||||
|
'beBackLater': 'Ben zo terug',
|
||||||
|
'away': 'Niet in de buurt',
|
||||||
|
'custom':'aangepast bericht...',
|
||||||
|
'invisible': 'Onzichtbaar',
|
||||||
|
|
||||||
|
// Miscellaneous
|
||||||
|
'autoreply': 'Automatisch antwoord',
|
||||||
|
'signedOff': 'Je bent uitgelogd!',
|
||||||
|
'reconnect': 'Verbinding herstellen',
|
||||||
|
'onunload': 'Je logt hiermee uit bij de chat-applicatie.',
|
||||||
|
'ok': 'Ok',
|
||||||
|
'cancel': 'Annuleer',
|
||||||
|
'username': 'Gebruikersnaam',
|
||||||
|
'password': 'Wachtwoord',
|
||||||
|
'email': 'Email',
|
||||||
|
'search': 'Zoeken',
|
||||||
|
'searchAgain': 'Zoek opnieuw',
|
||||||
|
|
||||||
|
// Admin - User Search
|
||||||
|
'admin-userSearch': 'Zoek gebruikers',
|
||||||
|
'admin-chooseByAndSearch': 'Kies de zoekmethode en vul je zoekwoorden in. Jokertekens (*) zijn toegestaan.',
|
||||||
|
'admin-searchType': 'Zoekmethode',
|
||||||
|
'admin-lastKnownIP': 'Laatste bekende IP',
|
||||||
|
'admin-lastActive': 'Laatste activiteit',
|
||||||
|
'admin-status': 'Status',
|
||||||
|
'admin-kick': 'Kick',
|
||||||
|
'admin-ban': 'Bannen',
|
||||||
|
'admin-unban': 'Ban opheffen',
|
||||||
|
'admin-makeAdmin': 'Maak admin',
|
||||||
|
'admin-removeAdmin': 'Verwijder admin',
|
||||||
|
'admin-banned': 'Gebanned',
|
||||||
|
'admin-admin': 'Admin'
|
||||||
|
});
|
||||||
@@ -0,0 +1,184 @@
|
|||||||
|
///////////////////////////////////
|
||||||
|
// ajax im 3.4 //
|
||||||
|
// AJAX Instant Messenger //
|
||||||
|
// Copyright (c) 2006-2008 //
|
||||||
|
// http://www.ajaxim.com/ //
|
||||||
|
// Do not remove this notice //
|
||||||
|
///////////////////////////////////
|
||||||
|
|
||||||
|
Languages.onLoad('english', {
|
||||||
|
// Login
|
||||||
|
'signOn': 'Sign On',
|
||||||
|
'incorrectInfo': 'Username or password incorrect!',
|
||||||
|
'userBanned': 'You have been banned!',
|
||||||
|
|
||||||
|
// Buddylist
|
||||||
|
'buddyList': 'Buddy List',
|
||||||
|
'addBuddyButton': 'Add Buddy',
|
||||||
|
'joinChatroomButton': 'Join Chatroom',
|
||||||
|
'removeBuddyButton': 'Remove Buddy',
|
||||||
|
'IMAnyoneButton': 'IM Anyone',
|
||||||
|
'changeSettingsButton': 'Change Settings',
|
||||||
|
'toggleSoundButton': 'Toggle Sound',
|
||||||
|
'signOff': 'Sign off',
|
||||||
|
'offline': 'Offline', // Automatic buddylist group
|
||||||
|
'noSuchGroup': 'No such group on buddylist!',
|
||||||
|
|
||||||
|
// Context Menu
|
||||||
|
'contextGetInfo': 'Get Info',
|
||||||
|
'contextIM': 'IM',
|
||||||
|
'contextBlock': 'Block',
|
||||||
|
'contextUnblock': 'Unblock',
|
||||||
|
'contextRemove': 'Remove',
|
||||||
|
|
||||||
|
// Registration
|
||||||
|
'register': 'Register',
|
||||||
|
'confirm': 'Confirm',
|
||||||
|
'registerSuccess': 'Registration Successful!',
|
||||||
|
'registerUsernameTaken': 'The username you have chosen is already in use.',
|
||||||
|
'registerUsernameBad': 'Usernames may only contain letters, numbers, _,<br />and be 3 to 16 characters long.',
|
||||||
|
'registerPasswordShort': 'Passwords must be 6 to 20 characters long!',
|
||||||
|
'registerInvalidEmail': 'Invalid Email Address!',
|
||||||
|
'registerEmailTaken': 'A username is already registered with that email address!',
|
||||||
|
'registerFailed': 'Registration Failed! Please try again later.',
|
||||||
|
'registerPasswordsMatch': 'Passwords do not match!',
|
||||||
|
|
||||||
|
// Chatrooms
|
||||||
|
'hasJoined': 'has joined.',
|
||||||
|
'hasLeft': 'has left.',
|
||||||
|
|
||||||
|
// IMs
|
||||||
|
'notifySentButOffline': 'Note: This user is currently offline, but they will receive this message when they log on.',
|
||||||
|
'errorNotLoggedIn': 'Error: Your message could not be sent because the recipient is not logged in.',
|
||||||
|
'errorMsgTooLong': 'Error: Your message could not be sent because it is too long.',
|
||||||
|
'errorUnknown': 'Error: An unknown error occured while sending your message.',
|
||||||
|
'bold': 'Bold',
|
||||||
|
'italic': 'Italic',
|
||||||
|
'underline': 'Underline',
|
||||||
|
|
||||||
|
// New IM Dialog
|
||||||
|
'newIM': 'New Instant Message...',
|
||||||
|
'newIMPlease': 'Please enter the username of the person you would like to IM.',
|
||||||
|
'newIMProper': 'Please enter a proper username!',
|
||||||
|
'openIM': 'Open IM',
|
||||||
|
|
||||||
|
// New Room Dialog
|
||||||
|
'newRoom': 'Join a Chatroom...',
|
||||||
|
'newRoomPlease': 'Please enter the name of the room you would like to join.',
|
||||||
|
'noRoomsExist': 'No existing chatrooms!',
|
||||||
|
'alreadyInRoom': 'You are already in "%1"',
|
||||||
|
'invalidRoom': 'The chosen room name is invalid.',
|
||||||
|
'invalidRoomChars': 'Room name contains invalid characters!',
|
||||||
|
'joinRoom': 'Join',
|
||||||
|
'roomname': 'Room Name',
|
||||||
|
|
||||||
|
// New Buddy Dialog
|
||||||
|
'newBuddy': 'Add a Buddy',
|
||||||
|
'newBuddyPlease': 'Please enter the name of the user you would like to add to your buddylist.',
|
||||||
|
'noSuchUser': 'No such user is registered!',
|
||||||
|
'alreadyOnBuddylist': 'User is already on your buddy list!',
|
||||||
|
'add': 'Add',
|
||||||
|
'addtogroup': 'Add to Group',
|
||||||
|
|
||||||
|
// Remove Buddy Dialog
|
||||||
|
'removeBuddy': 'Remove Buddy',
|
||||||
|
'removeBuddyAreYouSure': 'Are you sure you want to remove buddy "<b>%1</b>" from your buddylist?',
|
||||||
|
|
||||||
|
// Block Buddy Dialog
|
||||||
|
'blockBuddy': 'Block Buddy',
|
||||||
|
'unblockBuddy': 'Unblock Buddy',
|
||||||
|
'blockBuddyAreYouSure': 'Are you sure you want to block buddy "<b>%1</b>"?',
|
||||||
|
'unblockBuddyAreYouSure': 'Are you sure you want to unblock buddy "<b>%1</b>"?',
|
||||||
|
|
||||||
|
// Remove Group Dialog
|
||||||
|
'removeGroup': 'Remove a Group',
|
||||||
|
'removeGroupAreYouSure': 'Are you sure you want to remove group "<b>%1</b>" (and all users in it) from your buddylist?',
|
||||||
|
|
||||||
|
// Change Settings Dialog
|
||||||
|
'changeSettings': 'Change Settings',
|
||||||
|
'changeSettingsInstructions': 'To change your account settings, select the item you\'d like changed.',
|
||||||
|
'changeSettingsPassword': 'Change Password',
|
||||||
|
'changeSettingsProfile': 'Change Profile',
|
||||||
|
'changeSettingsBuddyicon': 'Change Buddy Icon',
|
||||||
|
|
||||||
|
// Change Profile Dialog
|
||||||
|
'changeProfile': 'Change Profile',
|
||||||
|
'changeProfileInstructions': 'To change your buddy profile, just adjust is to how you want it below and then click \'Change\'.',
|
||||||
|
'changeProfileEmpty': 'Please enter a something to have shown.',
|
||||||
|
'changeProfileFailed': 'There was a problem processing your profile change. Please try again later.',
|
||||||
|
'changeProfileSuccess': 'Your profile has been successfully changed.',
|
||||||
|
'hasNoProfile': 'This user has no profile.',
|
||||||
|
|
||||||
|
// Change Buddy Icon Dialog
|
||||||
|
'changeBuddyicon': 'Change Buddy Icon',
|
||||||
|
'changeBuddyiconInstructions': 'To change your buddy icon, select the image you\'d like to use then click \'Change\'.',
|
||||||
|
'changeIconFailed': 'There was a problem proccessing your buddy icon change. Please try again later.',
|
||||||
|
'changeIconSelectFile': 'Please select a file to upload.',
|
||||||
|
'changeIconBadType': 'File type is not allowed.',
|
||||||
|
'changeIconSize': 'File to too large to be uploaded.',
|
||||||
|
'changeIconBadExtension': 'File extension is not allowed.',
|
||||||
|
'changeBuddyiconSuccess': 'Your buddy icon has been successfully changed.',
|
||||||
|
|
||||||
|
// Change Password Dialog
|
||||||
|
'changePassword': 'Change Password',
|
||||||
|
'changePasswordInstructions': 'To change your password, please your current password, then your new password.',
|
||||||
|
'currentPassword': 'Current Password',
|
||||||
|
'newPassword': 'New Password',
|
||||||
|
'confirmPassword': 'Confirm Password',
|
||||||
|
'changeSuccess': "The password change was successful!\nPlease re-login now.",
|
||||||
|
'currentPassInvalid': 'The "Current Password" you entered is invalid.',
|
||||||
|
'changePasswordShort': 'Passwords must be 6 to 20 characters long!',
|
||||||
|
'changeFailed': 'There was a problem processing your password change. Please try again later.',
|
||||||
|
'changeNoMatch': 'Your passwords do not match!',
|
||||||
|
'change': 'Change',
|
||||||
|
|
||||||
|
// Reset Password
|
||||||
|
'reset': 'Reset',
|
||||||
|
'forgotPassword': 'Forgot Pass',
|
||||||
|
'passwordReset': 'Password Reset',
|
||||||
|
'emailAddress': 'Email Address',
|
||||||
|
'newPasswordEmailed': 'Your new password has been emailed to %1',
|
||||||
|
'noEmailOnRecord': 'There is no such email address for any username on record.',
|
||||||
|
'problemResetting': 'There has been a problem resetting your password.<br />Please try again later.',
|
||||||
|
|
||||||
|
// Statuses
|
||||||
|
'available': 'I\'m available',
|
||||||
|
'friendsOnly': 'Friends only',
|
||||||
|
'busy': 'I\'m busy',
|
||||||
|
'beBackLater': 'I\'ll be back later',
|
||||||
|
'away': 'I\'m away from my computer',
|
||||||
|
'custom': 'Customized message...',
|
||||||
|
'invisible': 'Invisible',
|
||||||
|
'cameback': '%1 is now available.',
|
||||||
|
'wentaway': '%1 has gone away.',
|
||||||
|
'signedoff': '%1 has signed off.',
|
||||||
|
|
||||||
|
// Miscellaneous
|
||||||
|
'autoreply': 'Auto-Reply',
|
||||||
|
'signedOff': 'You have signed off!',
|
||||||
|
'reconnect': 'Reconnect',
|
||||||
|
'onunload': 'If you do so, you will be signed out of the instant messenger.',
|
||||||
|
'ok': 'Ok',
|
||||||
|
'cancel': 'Cancel',
|
||||||
|
'update': 'Update',
|
||||||
|
'username': 'Username',
|
||||||
|
'password': 'Password',
|
||||||
|
'email': 'Email',
|
||||||
|
'search': 'Search',
|
||||||
|
'searchAgain': 'Search Again',
|
||||||
|
|
||||||
|
// Admin - User Search
|
||||||
|
'admin-userSearch': 'User Search',
|
||||||
|
'admin-chooseByAndSearch': 'Choose the search type and then enter the appropriate search information. Wildcards (*) are allowed.',
|
||||||
|
'admin-searchType': 'Search Type',
|
||||||
|
'admin-lastKnownIP': 'Last Known IP',
|
||||||
|
'admin-lastActive': 'Last Active',
|
||||||
|
'admin-status': 'Status',
|
||||||
|
'admin-kick': 'Kick',
|
||||||
|
'admin-ban': 'Ban',
|
||||||
|
'admin-unban': 'Unban',
|
||||||
|
'admin-makeAdmin': 'Make Admin',
|
||||||
|
'admin-removeAdmin': 'Remove Admin',
|
||||||
|
'admin-banned': 'Banned',
|
||||||
|
'admin-admin': 'Admin'
|
||||||
|
});
|
||||||
@@ -0,0 +1,145 @@
|
|||||||
|
// French Language
|
||||||
|
// Translated by Léonard Beaud
|
||||||
|
|
||||||
|
Languages.onLoad('french', {
|
||||||
|
// Login
|
||||||
|
'signOn': 'Connexion',
|
||||||
|
'incorrectInfo': 'Nom d\'utilisateur ou mot de passe érroné!',
|
||||||
|
'userBanned': 'Vous avez été banni!',
|
||||||
|
|
||||||
|
// Buddylist
|
||||||
|
'buddyList': 'Liste de contacts',
|
||||||
|
'addBuddyButton': 'Ajouter un contact',
|
||||||
|
'joinChatroomButton': 'Rejoindre un salon de discution',
|
||||||
|
'removeBuddyButton': 'Supprimer le contact',
|
||||||
|
'IMAnyoneButton': 'IM Anyone',
|
||||||
|
'changePasswordButton': 'Changer de mot de passe',
|
||||||
|
'toggleSoundButton': 'Activer/Désactiver le sond',
|
||||||
|
'signOff': 'Déconnexion',
|
||||||
|
'offline': 'Hors Ligne', // Automatic buddylist group
|
||||||
|
'noSuchGroup': 'Pas de groupe dans la liste de contact!',
|
||||||
|
|
||||||
|
// Statuses
|
||||||
|
'available': 'Je suis disponible',
|
||||||
|
|
||||||
|
// Registration
|
||||||
|
'register': 'Enregistrer',
|
||||||
|
'confirm': 'Confirmer',
|
||||||
|
'registerSuccess': 'Enregistrement réussi!',
|
||||||
|
'registerUsernameTaken': 'Le nom d\'utilisateur choisi est déjà utilisé.',
|
||||||
|
'registerUsernameBad': 'Le nom d\'utilisateur ne peut contenir que des lettres, des nombres, _ ou <br/> et doit contenir entre 3 et 16 caractères.',
|
||||||
|
'registerPasswordShort': 'Le mot de passe doit contenir entre 6 et 20 caractères',
|
||||||
|
'registerInvalidEmail': 'L\'adresse de courriel n\'est pas valide!',
|
||||||
|
'registerEmailTaken': 'Un nom d\'utilisateur est déjà enregistré avec cette adresse!',
|
||||||
|
'registerFailed': 'Echec de l\'enregistrement ! Réessayer plus tard.',
|
||||||
|
'registerPasswordsMatch': 'Les mots de passe ne correspondent pas!',
|
||||||
|
|
||||||
|
// Chatrooms
|
||||||
|
'hasJoined': 'est arrivé.',
|
||||||
|
'hasLeft': 'est parti.',
|
||||||
|
|
||||||
|
// IMs
|
||||||
|
'notifySentButOffline': 'Note: Cet utilisateur est actuellement déconnecté, mais il recevra ce message quand il sera connecté.',
|
||||||
|
'errorNotLoggedIn': 'Erreur: Votre message ne peut pas être envoyé car le destinataire n\'est pas connecté.',
|
||||||
|
'errorMsgTooLong': 'Erreur: Votre message ne peut pas être envoyé car il est trop long.',
|
||||||
|
'errorUnknown': 'Erreur: Une erreur inconnue est survenue lors de l\'envoie du message.',
|
||||||
|
'bold': 'Gras',
|
||||||
|
'italic': 'Italique',
|
||||||
|
'underline': 'Souligné',
|
||||||
|
|
||||||
|
// New IM Dialog
|
||||||
|
'newIM': 'Nouveau message instantané...',
|
||||||
|
'newIMPlease': 'Entrez le nom d\'utilisateur de la personne que vous souhaitez contacter.',
|
||||||
|
'newIMProper': 'Merci d\'entrer un nom d\'utilisateur valide!',
|
||||||
|
'openIM': 'Ouverture de la messagerie instantanée',
|
||||||
|
|
||||||
|
// New Room Dialog
|
||||||
|
'newRoom': 'Rejoindre un salon de chat...',
|
||||||
|
'newRoomPlease': 'Entrez le nom du salon de chat que vous souhaitez rejoindre.',
|
||||||
|
'alreadyInRoom': 'Vous êtes déjà dans "%1"',
|
||||||
|
'invalidRoom': 'Le nom du salon choisit est invalide.',
|
||||||
|
'invalidRoomChars': 'Le nom du salon contient des caractères invalides!',
|
||||||
|
'joinRoom': 'Rejoindre',
|
||||||
|
'roomname': 'Nom du salon',
|
||||||
|
|
||||||
|
// New Buddy Dialog
|
||||||
|
'newBuddy': 'Ajouter un contact',
|
||||||
|
'newBuddyPlease': 'Entrer le nom de l\'utilisateur que vous souhaitez ajouter à votre liste de contact.',
|
||||||
|
'noSuchUser': 'Aucun utilisateur n\'est enregistré!',
|
||||||
|
'alreadyOnBuddylist': 'Cet utilisateur est déjà dans votre liste de contact!',
|
||||||
|
'add': 'Ajouter',
|
||||||
|
'addtogroup': 'Ajouter au groupe',
|
||||||
|
|
||||||
|
// Remove Buddy Dialog
|
||||||
|
'removeBuddy': 'Supprimer le contact',
|
||||||
|
'removeBuddyAreYouSure': 'Êtes vous sûr de vouloir supprimer "<b>%1</b>" de votre liste de contact ?',
|
||||||
|
|
||||||
|
// Block Buddy Dialog
|
||||||
|
'blockBuddy': 'Bloquer le contact',
|
||||||
|
'unblockBuddy': 'Débloquer le contact',
|
||||||
|
'blockBuddyAreYouSure': 'Êtes-vous sûr de vouloir bloquer le contact "<b>%1</b>"?',
|
||||||
|
'unblockBuddyAreYouSure': 'Êtes-vous sûr de vouloir débloquer le contact "<b>%1</b>"?',
|
||||||
|
|
||||||
|
// Remove Group Dialog
|
||||||
|
'removeGroup': 'Supprimer le groupe',
|
||||||
|
'removeGroupAreYouSure': 'Êtes-vous sûr de vouloir supprimer le groupe "<b>%1</b>" (et tous les utilisateurs qu\'il contient) de votre liste de contact ?',
|
||||||
|
|
||||||
|
// Change Password Dialog
|
||||||
|
'changePassword': 'Changer de mot de passe',
|
||||||
|
'changePasswordInstructions': 'Pour changer votre mot de passe saisissez votre mot de passe courant puis votre nouveau mot de passe.',
|
||||||
|
'currentPassword': 'Mot de passe courant',
|
||||||
|
'newPassword': 'Nouveau mot de passe',
|
||||||
|
'confirmPassword': 'Confirmation du nouveau mot de passe',
|
||||||
|
'changeSuccess': "Mot de passe modifié avec succès!\nMerci de vous reconnecter.",
|
||||||
|
'currentPassInvalid': 'Le mot de passe courant est invalide.',
|
||||||
|
'changePasswordShort': 'Les mots de passe doivent contenir de 6 à 20 caractères !',
|
||||||
|
'changeFailed': 'Un problème est survenu lors du changement de votre mot de passe. Réessayez plus tard.',
|
||||||
|
'changeNoMatch': 'Vos mots de passe ne correspondent pas!',
|
||||||
|
'change': 'Changer',
|
||||||
|
|
||||||
|
// Reset Password
|
||||||
|
'reset': 'Réinitialiser',
|
||||||
|
'forgotPassword': 'Mot de passe perdu',
|
||||||
|
'passwordReset': 'Réinitialisation du mot de passe',
|
||||||
|
'emailAddress': 'Adresse courriel',
|
||||||
|
'newPasswordEmailed': 'Votre nouveau mot de passe a été envoyé à %1',
|
||||||
|
'noEmailOnRecord': 'Cette adresse courriel n\'est ratachée à aucun compte.',
|
||||||
|
'problemResetting': 'Un problème est survenu lors de la réinitialisation de votre mot de passe. Réessayez plus tard.',
|
||||||
|
|
||||||
|
// Statuses
|
||||||
|
'available': 'Je suis disponible',
|
||||||
|
'friendsOnly': 'Seulement les amis',
|
||||||
|
'busy': 'Je suis occupé',
|
||||||
|
'beBackLater': 'Je reviendrai plus tard',
|
||||||
|
'away': 'Je ne suis pas devant mon ordinateur',
|
||||||
|
'custom': 'Message personnalisé...',
|
||||||
|
'invisible': 'Invisible',
|
||||||
|
|
||||||
|
// Miscellaneous
|
||||||
|
'autoreply': 'Réponse automatique',
|
||||||
|
'signedOff': 'Vous vous êtes déconnecté!',
|
||||||
|
'reconnect': 'Se reconnecter',
|
||||||
|
'onunload': 'Si vous faites celà, vous serez déconnecté de la messagerie instantanée.',
|
||||||
|
'ok': 'Ok',
|
||||||
|
'cancel': 'Annuler',
|
||||||
|
'username': 'Nom d\'utilisateur',
|
||||||
|
'password': 'Mot de passe',
|
||||||
|
'email': 'Courriel',
|
||||||
|
'search': 'Chercher',
|
||||||
|
'searchAgain': 'Chercher à nouveau',
|
||||||
|
|
||||||
|
// Admin - User Search
|
||||||
|
'admin-userSearch': 'Chercher un utilisateur',
|
||||||
|
'admin-chooseByAndSearch': 'Séléctionner le type de recherche et entrez les informations appropriée. Les jockers (*) sont permis.',
|
||||||
|
'admin-searchType': 'Type de recherche',
|
||||||
|
'admin-lastKnownIP': 'Dernière IP connue',
|
||||||
|
'admin-lastActive': 'Dernier actif',
|
||||||
|
'admin-status': 'Status',
|
||||||
|
'admin-kick': 'Kick',
|
||||||
|
'admin-ban': 'Bannir',
|
||||||
|
'admin-unban': 'Débannir',
|
||||||
|
'admin-makeAdmin': 'Créer Admin',
|
||||||
|
'admin-removeAdmin': 'Enlever Admin',
|
||||||
|
'admin-banned': 'Banni',
|
||||||
|
'admin-admin': 'Admin'
|
||||||
|
});
|
||||||
@@ -0,0 +1,146 @@
|
|||||||
|
// German Language
|
||||||
|
// Fery Kondella
|
||||||
|
// http://www.ferykondella.de
|
||||||
|
|
||||||
|
Languages.onLoad('german', {
|
||||||
|
// Login
|
||||||
|
'signOn': 'Anmeldung',
|
||||||
|
'incorrectInfo': 'Dein Benutzername oder Passwort ist falsch!',
|
||||||
|
'userBanned': 'Hoppla, du wurdest Gebannt!',
|
||||||
|
|
||||||
|
// Buddylist
|
||||||
|
'buddyList': 'Freunde',
|
||||||
|
'addBuddyButton': 'Freund hinzufügen',
|
||||||
|
'joinChatroomButton': 'Chatraum Betreten',
|
||||||
|
'removeBuddyButton': 'Freund Entfernen',
|
||||||
|
'IMAnyoneButton': 'Neue Unterhaltung beginnen',
|
||||||
|
'changePasswordButton': 'Passwort Ändern',
|
||||||
|
'toggleSoundButton': 'Ton Einstellung',
|
||||||
|
'signOff': 'Abmelden',
|
||||||
|
'offline': 'Offline', // Automatic buddylist group
|
||||||
|
'noSuchGroup': 'Solch eine Gruppe existiert nicht!',
|
||||||
|
|
||||||
|
// Statuses
|
||||||
|
'available': 'Bin Online',
|
||||||
|
|
||||||
|
// Registration
|
||||||
|
'register': 'Registrieren',
|
||||||
|
'confirm': 'Bestätigen',
|
||||||
|
'registerSuccess': 'Die Anmeldung war erfolgreich!',
|
||||||
|
'registerUsernameTaken': 'Der Benutzername ist bereits in Gebrauch.',
|
||||||
|
'registerUsernameBad': 'Benutzernamen dürfen nur Buchtaben, Zahlen oder diesen Unterstrich _ beinthalten<br />und 3 bis 16 Zeichen lang sein.',
|
||||||
|
'registerPasswordShort': 'Passwörter müssen zwischen 6 bis 20 Zeichen lang sein!',
|
||||||
|
'registerInvalidEmail': 'Ungütige Email Adresse!',
|
||||||
|
'registerEmailTaken': 'Ein Benutzername wurde bereits mit dieser Email-Adresse registriert!',
|
||||||
|
'registerFailed': 'Die Anmeldung war fehlerhaft, Bitte Versuche es später noch einmal.',
|
||||||
|
'registerPasswordsMatch': 'Die Passwort-Wiederholung war Fehlerhaft!',
|
||||||
|
|
||||||
|
// Chatrooms
|
||||||
|
'hasJoined': 'hat den Raum Betreten.',
|
||||||
|
'hasLeft': 'hat den Raum Verlassen.',
|
||||||
|
|
||||||
|
// IMs
|
||||||
|
'notifySentButOffline': 'Meldung: Der Benutzer ist gerade Offline, aber deine Nachricht wird dem Benutzer angezeigt sobald er wieder Online ist.',
|
||||||
|
'errorNotLoggedIn': 'Meldung: Deine Nachricht konnte nicht gesendet werden, da der Empfänger nicht eingeloggt ist.',
|
||||||
|
'errorMsgTooLong': 'Meldung: Hoppla, deine Nachricht ist zu lang!',
|
||||||
|
'errorUnknown': 'Meldung: Ein unbekannter Fehler ist wärend der übertragung aufgetreten.',
|
||||||
|
'bold': 'Fett',
|
||||||
|
'italic': 'Kursiv',
|
||||||
|
'underline': 'Unterstrichen',
|
||||||
|
|
||||||
|
// New IM Dialog
|
||||||
|
'newIM': 'Neue Unterhaltung...',
|
||||||
|
'newIMPlease': 'Bitte gib den Namen eines Benutzers ein mit dem du eine Unterhaltung Beginnen möchtest.',
|
||||||
|
'newIMProper': 'Einen korrekten Benutzernahmen der auch Registriert ist!',
|
||||||
|
'openIM': 'Messenger Öffnen',
|
||||||
|
|
||||||
|
// New Room Dialog
|
||||||
|
'newRoom': 'Einem Chat beitreten...',
|
||||||
|
'newRoomPlease': 'Bitte gib den namen des raumes ein welchen du Betreten möchtest.',
|
||||||
|
'alreadyInRoom': 'Du bist bereits in "%1"',
|
||||||
|
'invalidRoom': 'Der Chatraum-Name ist nicht korrekt.',
|
||||||
|
'invalidRoomChars': 'Der Raumname beinhaltet unzulässige Zeichen!',
|
||||||
|
'joinRoom': 'Betreten',
|
||||||
|
'roomname': 'Raumname',
|
||||||
|
|
||||||
|
// New Buddy Dialog
|
||||||
|
'newBuddy': 'Freund Hinzufügen',
|
||||||
|
'newBuddyPlease': 'Wie lautet der Name den du auf deine Freundesliste setzen möchtest.',
|
||||||
|
'noSuchUser': 'Dieser Name ist leider nicht Registriert!',
|
||||||
|
'alreadyOnBuddylist': 'Der Benutzer ist bereits auf deiner Freundesliste!',
|
||||||
|
'add': 'Hinzufügen',
|
||||||
|
'addtogroup': 'zur Gruppe hinzufügen',
|
||||||
|
|
||||||
|
// Remove Buddy Dialog
|
||||||
|
'removeBuddy': 'Als Freund entfernen',
|
||||||
|
'removeBuddyAreYouSure': 'Möchtest du "<b>%1</b>" wirklich von deiner Freundesliste Streichen?',
|
||||||
|
|
||||||
|
// Block Buddy Dialog
|
||||||
|
'blockBuddy': 'Blocken',
|
||||||
|
'unblockBuddy': 'Blocken Aufheben',
|
||||||
|
'blockBuddyAreYouSure': 'Möchtest du deinen Freund "<b>%1</b>" wirklich Blocken?',
|
||||||
|
'unblockBuddyAreYouSure': 'Soll der Block gegen "<b>%1</b>" wieder aufgehoben werden?',
|
||||||
|
|
||||||
|
// Remove Group Dialog
|
||||||
|
'removeGroup': 'Gruppe entfernen',
|
||||||
|
'removeGroupAreYouSure': 'Möchtest du die Gruppe "<b>%1</b>" und alle darin gespeicherten Freunde Löschen?',
|
||||||
|
|
||||||
|
// Change Password Dialog
|
||||||
|
'changePassword': 'Passwort Ändern',
|
||||||
|
'changePasswordInstructions': 'Um dein Passwort Ändern zu können, musst du zuerst dein altes Passwort Eingeben, und dann das neue.',
|
||||||
|
'currentPassword': 'Bisheriges Passwort',
|
||||||
|
'newPassword': 'Neues Passwort',
|
||||||
|
'confirmPassword': 'Passwort Bestätigen',
|
||||||
|
'changeSuccess': "Dein Passwort wurde geändert!\nBitte Log dich neu ein.",
|
||||||
|
'currentPassInvalid': 'Dein aktuelles Passwort wurde falsch eingetragen.',
|
||||||
|
'changePasswordShort': 'Passwörter müssen zwischen 6 bis 20 Zeichen lang sein!',
|
||||||
|
'changeFailed': 'Ein Fehler hat sich bei der Passwortänderung eingeschlichen, versuche es Bitte später nochmal.',
|
||||||
|
'changeNoMatch': 'Deine Passwörter stimmen nicht überein!',
|
||||||
|
'change': 'Ändern',
|
||||||
|
|
||||||
|
// Reset Password
|
||||||
|
'reset': 'Zurücksetzen',
|
||||||
|
'forgotPassword': 'Passwort Vergessen',
|
||||||
|
'passwordReset': 'Passwort Zurücksetzen',
|
||||||
|
'emailAddress': 'Email-Adresse',
|
||||||
|
'newPasswordEmailed': 'Dein neues Passwort wurde an "<b>%1</b>" gemailt',
|
||||||
|
'noEmailOnRecord': 'Unter dieser Email wurde noch nie ein Benutzername Registriert.',
|
||||||
|
'problemResetting': 'Es gab ein Problem bei der Umstellung deines Passwortes.<br />Versuche es Bitte später noch einmal.',
|
||||||
|
|
||||||
|
// Statuses
|
||||||
|
'available': 'Bin Online',
|
||||||
|
'friendsOnly': 'Nur für Freunde ansprechbar',
|
||||||
|
'busy': 'Beschäftigt',
|
||||||
|
'beBackLater': 'Komme gleich wieder',
|
||||||
|
'away': 'Bin gerade nicht am Computer',
|
||||||
|
'custom': 'Eigene Nachricht Erstellen...',
|
||||||
|
'invisible': 'Unsichtbar',
|
||||||
|
|
||||||
|
// Miscellaneous
|
||||||
|
'autoreply': 'Abwesenheitsnachricht',
|
||||||
|
'signedOff': 'Du hast dich Abgemeldet',
|
||||||
|
'reconnect': 'Verbinden',
|
||||||
|
'onunload': 'Falls du Abmelden wählst werden alle aktiven Unterhaltungen geschlossen .',
|
||||||
|
'ok': 'Ok',
|
||||||
|
'cancel': 'Abbrechen',
|
||||||
|
'username': 'Benutzername',
|
||||||
|
'password': 'Passwort',
|
||||||
|
'email': 'Email',
|
||||||
|
'search': 'Suchen',
|
||||||
|
'searchAgain': 'Erneut Suchen',
|
||||||
|
|
||||||
|
// Admin - User Search
|
||||||
|
'admin-userSearch': 'Benutzersuche',
|
||||||
|
'admin-chooseByAndSearch': 'Wähle zuerst die Suchoption aus und gib dann deinen Suchbegriff ein. (*) Platzhalter sind erlaubt.',
|
||||||
|
'admin-searchType': 'Suchoptionen',
|
||||||
|
'admin-lastKnownIP': 'Letze bekannte IP',
|
||||||
|
'admin-lastActive': 'letzte Aktivität',
|
||||||
|
'admin-status': 'Status',
|
||||||
|
'admin-kick': 'Kick',
|
||||||
|
'admin-ban': 'Sperren',
|
||||||
|
'admin-unban': 'Sperrung aufheben',
|
||||||
|
'admin-makeAdmin': 'zum Admin Berufen',
|
||||||
|
'admin-removeAdmin': 'als Admin entfernen',
|
||||||
|
'admin-banned': 'Gesperrt',
|
||||||
|
'admin-admin': 'Admin'
|
||||||
|
});
|
||||||
@@ -0,0 +1,146 @@
|
|||||||
|
// Italian Translation
|
||||||
|
// Matteo Cisilino
|
||||||
|
// http://www.sitonerd.com
|
||||||
|
|
||||||
|
Languages.onLoad('italian', {
|
||||||
|
// Login
|
||||||
|
'signOn': 'Entra',
|
||||||
|
'incorrectInfo': 'Utente o Password errato!',
|
||||||
|
'userBanned': 'Sei stato bannato!',
|
||||||
|
|
||||||
|
// Buddylist
|
||||||
|
'buddyList': 'Lista contatti',
|
||||||
|
'addBuddyButton': 'Aggiungi contatto',
|
||||||
|
'joinChatroomButton': 'Entra nel Canale',
|
||||||
|
'removeBuddyButton': 'Cancella Contatto',
|
||||||
|
'IMAnyoneButton': 'IM Tutti',
|
||||||
|
'changePasswordButton': 'Cambia password',
|
||||||
|
'toggleSoundButton': 'Invia suono',
|
||||||
|
'signOff': 'Esci',
|
||||||
|
'offline': 'Non in linea', // Automatic buddylist group
|
||||||
|
'noSuchGroup': 'Nessun gruppo nella lista amici!',
|
||||||
|
|
||||||
|
// Statuses
|
||||||
|
'available': 'Disponibile',
|
||||||
|
|
||||||
|
// Registration
|
||||||
|
'register': 'Registrati',
|
||||||
|
'confirm': 'Conferma',
|
||||||
|
'registerSuccess': 'Registrazione avvenuta con successo!',
|
||||||
|
'registerUsernameTaken': 'Nome utente non disponibile.',
|
||||||
|
'registerUsernameBad': 'Il nome utente puú contenere solo lettere e numeri, _,<br />e deve essere lungo da 3 a 16 caratteri.',
|
||||||
|
'registerPasswordShort': 'La Password deve essere lunga da 6 a 20 caratteri!',
|
||||||
|
'registerInvalidEmail': 'Indirizzo di posta non valido!',
|
||||||
|
'registerEmailTaken': 'Indirizzo di posta gia utilizzato!',
|
||||||
|
'registerFailed': 'Errore nella registrazione! riprovare piú tardi.',
|
||||||
|
'registerPasswordsMatch': 'Le password non coincidono!',
|
||||||
|
|
||||||
|
// Chatrooms
|
||||||
|
'hasJoined': 'é entrato.',
|
||||||
|
'hasLeft': 'é uscito.',
|
||||||
|
|
||||||
|
// IMs
|
||||||
|
'notifySentButOffline': 'Nota: Questo utente é attualmente scollegato, ma riceverá il messaggio quanto entrerá.',
|
||||||
|
'errorNotLoggedIn': 'Errore: Il messaggio non puó essere inviato perché il destinatario é scollegato.',
|
||||||
|
'errorMsgTooLong': 'Errore: Il messaggio é troppo lungo.',
|
||||||
|
'errorUnknown': 'Errore: Errore sconosciuto.',
|
||||||
|
'bold': 'Grassetto',
|
||||||
|
'italic': 'Corsivo',
|
||||||
|
'underline': 'Sottolineato',
|
||||||
|
|
||||||
|
// New IM Dialog
|
||||||
|
'newIM': 'Nuovo mesasggio...',
|
||||||
|
'newIMPlease': 'Prego inserire il nome utente della persona da contattare.',
|
||||||
|
'newIMProper': 'Prego inserire nome utente corretto!',
|
||||||
|
'openIM': 'Apri IM',
|
||||||
|
|
||||||
|
// New Room Dialog
|
||||||
|
'newRoom': 'Entra in un canale...',
|
||||||
|
'newRoomPlease': 'Prego inserire il nome del canale in cui entrare.',
|
||||||
|
'alreadyInRoom': 'Sei gia presente in "%1"',
|
||||||
|
'invalidRoom': 'Il nome del canale inserito é invalido.',
|
||||||
|
'invalidRoomChars': 'Il nome canale contiene caratteri non validi!',
|
||||||
|
'joinRoom': 'Entra',
|
||||||
|
'roomname': 'Nome Canale',
|
||||||
|
|
||||||
|
// New Buddy Dialog
|
||||||
|
'newBuddy': 'Aggiungi un contatto',
|
||||||
|
'newBuddyPlease': 'Prego inserire il nome del contatto da inserire nella lista.',
|
||||||
|
'noSuchUser': 'Utente sconosciuto!',
|
||||||
|
'alreadyOnBuddylist': 'Utente gia presente nella propria lista contatti!',
|
||||||
|
'add': 'Aggiungi',
|
||||||
|
'addtogroup': 'Aggiungi al gruppo',
|
||||||
|
|
||||||
|
// Remove Buddy Dialog
|
||||||
|
'removeBuddy': 'Rimuovi contatto',
|
||||||
|
'removeBuddyAreYouSure': 'Sicuro di voler rimuovere "<b>%1</b>" dai propri contatti?',
|
||||||
|
|
||||||
|
// Block Buddy Dialog
|
||||||
|
'blockBuddy': 'Blocca Contatto',
|
||||||
|
'unblockBuddy': 'Sblocca Contatto',
|
||||||
|
'blockBuddyAreYouSure': 'Sicuro di voler bloccare "<b>%1</b>"?',
|
||||||
|
'unblockBuddyAreYouSure': 'Sicuro di voler sbloccare "<b>%1</b>"?',
|
||||||
|
|
||||||
|
// Remove Group Dialog
|
||||||
|
'removeGroup': 'Rimuovi gruppo',
|
||||||
|
'removeGroupAreYouSure': 'Sicuro di voler rimuovere il gruppo "<b>%1</b>" (e tutti i contatti presenti) dalla lista contatti?',
|
||||||
|
|
||||||
|
// Change Password Dialog
|
||||||
|
'changePassword': 'Cambia Password',
|
||||||
|
'changePasswordInstructions': 'Per cambiare la password, inserire la password corrente la nuova password.',
|
||||||
|
'currentPassword': 'Password corrente',
|
||||||
|
'newPassword': 'Nuova Password',
|
||||||
|
'confirmPassword': 'Conferma Password',
|
||||||
|
'changeSuccess': "La password é stata aggiornata con successo!\nPrego effetuare nuovamente il login.",
|
||||||
|
'currentPassInvalid': 'La "Password corrente" inserita é errata.',
|
||||||
|
'changePasswordShort': 'La password deve avere da 6 a 20 caratteri!',
|
||||||
|
'changeFailed': 'Problema durante il cambio della password, riprovare piú tardi.',
|
||||||
|
'changeNoMatch': 'Le passwords non corrispondono!',
|
||||||
|
'change': 'Cambia',
|
||||||
|
|
||||||
|
// Reset Password
|
||||||
|
'reset': 'Reset',
|
||||||
|
'forgotPassword': 'Password dimenticata',
|
||||||
|
'passwordReset': 'Reset password',
|
||||||
|
'emailAddress': 'Indirizzo email',
|
||||||
|
'newPasswordEmailed': 'La nuova password é stata inviata a %1',
|
||||||
|
'noEmailOnRecord': 'Non c\'é nessuna email associata con utente.',
|
||||||
|
'problemResetting': 'Avvenuto un errore durante il reset della password.<br />Riprovare piú tardi.',
|
||||||
|
|
||||||
|
// Statuses
|
||||||
|
'available': 'Sono disponibile',
|
||||||
|
'friendsOnly': 'Solo amici',
|
||||||
|
'busy': 'Sono occupato',
|
||||||
|
'beBackLater': 'Torno più tardi',
|
||||||
|
'away': 'Non sono al computer',
|
||||||
|
'custom': 'Messaggio personalizzato...',
|
||||||
|
'invisible': 'Invisibile',
|
||||||
|
|
||||||
|
// Miscellaneous
|
||||||
|
'autoreply': 'Risposta automatica',
|
||||||
|
'signedOff': 'Sei uscito!',
|
||||||
|
'reconnect': 'Riconetti',
|
||||||
|
'onunload': 'Se continui uscira dal IM.',
|
||||||
|
'ok': 'Ok',
|
||||||
|
'cancel': 'annulla',
|
||||||
|
'username': 'Utente',
|
||||||
|
'password': 'Password',
|
||||||
|
'email': 'Email',
|
||||||
|
'search': 'Cerca',
|
||||||
|
'searchAgain': 'Ripeti ricerca',
|
||||||
|
|
||||||
|
// Admin - User Search
|
||||||
|
'admin-userSearch': 'Ricerca utente',
|
||||||
|
'admin-chooseByAndSearch': 'Scegli il tipo di ricerca ed inserisci le informazioni. Le Wildcards (*) sono consentite.',
|
||||||
|
'admin-searchType': 'Tipo ricerca',
|
||||||
|
'admin-lastKnownIP': 'Ultimo IP usato',
|
||||||
|
'admin-lastActive': 'Ultima attivitá',
|
||||||
|
'admin-status': 'Status',
|
||||||
|
'admin-kick': 'Kick',
|
||||||
|
'admin-ban': 'Ban',
|
||||||
|
'admin-unban': 'Unban',
|
||||||
|
'admin-makeAdmin': 'OP',
|
||||||
|
'admin-removeAdmin': 'deOP',
|
||||||
|
'admin-banned': 'Bannato',
|
||||||
|
'admin-admin': 'Op'
|
||||||
|
});
|
||||||
@@ -0,0 +1,143 @@
|
|||||||
|
// Japanese Language
|
||||||
|
// Mayu Shimizu http://www.myudesign.com
|
||||||
|
|
||||||
|
Languages.onLoad('japanese', {
|
||||||
|
// Login
|
||||||
|
'signOn': 'サインオン',
|
||||||
|
'incorrectInfo': 'ユーザ名またはパスワードが間違っています。',
|
||||||
|
'userBanned': '入室禁止されました',
|
||||||
|
|
||||||
|
// Buddylist
|
||||||
|
'buddyList': '友だちリスト',
|
||||||
|
'addBuddyButton': '友だち追加',
|
||||||
|
'joinChatroomButton': 'チャットルーム参加',
|
||||||
|
'removeBuddyButton': '友だち削除',
|
||||||
|
'IMAnyoneButton': '誰とでもチャット',
|
||||||
|
'changePasswordButton': 'パスワード変更',
|
||||||
|
'toggleSoundButton': 'サウンド切り替え',
|
||||||
|
'signOff': 'サインオフ',
|
||||||
|
'offline': 'オフライン', // 自動友だちリストグループ
|
||||||
|
'noSuchGroup': '友だちリストにそのようなグループはありません。',
|
||||||
|
|
||||||
|
// Statuses
|
||||||
|
'available': 'チャット可能',
|
||||||
|
|
||||||
|
// Registration
|
||||||
|
'register': '登録',
|
||||||
|
'confirm': '確認',
|
||||||
|
'registerSuccess': '正常に登録できました。',
|
||||||
|
'registerUsernameTaken': 'そのユーザ名はすでに登録されています。',
|
||||||
|
'registerUsernameBad': 'ユーザ名は半角英数字とアンダーバー「_」を組み合わせた<br />3-16文字列にしてください。',
|
||||||
|
'registerPasswordShort': 'パスワードは6-20文字列にしてください。',
|
||||||
|
'registerInvalidEmail': 'メールアドレスが無効です。',
|
||||||
|
'registerEmailTaken': 'そのメールアドレスはすでに登録されています。',
|
||||||
|
'registerFailed': '登録できませんでした。後ほど再度お試しください。',
|
||||||
|
'registerPasswordsMatch': 'パスワードが一致しません。',
|
||||||
|
|
||||||
|
// Chatrooms
|
||||||
|
'hasJoined': 'さんが入室しました。',
|
||||||
|
'hasLeft': 'さんが退室しました。',
|
||||||
|
|
||||||
|
// IMs
|
||||||
|
'notifySentButOffline': '注意: このユーザは現在オフラインです。このメッセージは次回相手がログインした際に送信されます。',
|
||||||
|
'errorNotLoggedIn': 'エラー: チャット相手がログインしていないため、メッセージが送信できませんでした。',
|
||||||
|
'errorMsgTooLong': 'エラー: メッセージが長すぎたため、送信できませんでした。',
|
||||||
|
'errorUnknown': 'エラー: メッセージ送信中に不明なエラーが発生しました。',
|
||||||
|
'bold': '太字',
|
||||||
|
'italic': '斜体',
|
||||||
|
'underline': '下線',
|
||||||
|
|
||||||
|
// New IM Dialog
|
||||||
|
'newIM': '新規インスタントメッセージ...',
|
||||||
|
'newIMPlease': 'チャットしたい相手のユーザ名を入力してください。',
|
||||||
|
'newIMProper': '正しいユーザ名を入力してください。',
|
||||||
|
'openIM': 'チャットを開く',
|
||||||
|
|
||||||
|
// New Room Dialog
|
||||||
|
'newRoom': 'チャットルームに入室...',
|
||||||
|
'newRoomPlease': '入室したいルーム名を入力してください。',
|
||||||
|
'alreadyInRoom': '"%1"にはすでに入室しています。',
|
||||||
|
'invalidRoom': '選択したルーム名が無効です。',
|
||||||
|
'invalidRoomChars': 'ルーム名に利用できない文字列が含まれています。',
|
||||||
|
'joinRoom': '入室.',
|
||||||
|
|
||||||
|
// New Buddy Dialog
|
||||||
|
'newBuddy': '友だち追加',
|
||||||
|
'newBuddyPlease': '友だちリストに追加したいユーザ名を入力してください。',
|
||||||
|
'noSuchUser': '指定されたユーザは登録されていません。',
|
||||||
|
'alreadyOnBuddylist': 'そのユーザはすでに友だちリストに登録済みです。',
|
||||||
|
'add': '追加',
|
||||||
|
|
||||||
|
// Remove Buddy Dialog
|
||||||
|
'removeBuddy': '友だち削除',
|
||||||
|
'removeBuddyAreYouSure': '"<b>%1</b>"さんを友だちリストから削除しますか?',
|
||||||
|
|
||||||
|
// Block Buddy Dialog
|
||||||
|
'blockBuddy': '友だちブロック',
|
||||||
|
'unblockBuddy': '友だちブロック解除',
|
||||||
|
'blockBuddyAreYouSure': '"<b>%1</b>"さんをブロックしますか?',
|
||||||
|
'unblockBuddyAreYouSure': '"<b>%1</b>"さんのブロックを解除しますか?',
|
||||||
|
|
||||||
|
// Remove Group Dialog
|
||||||
|
'removeGroup': 'グループ削除',
|
||||||
|
'removeGroupAreYouSure': '"<b>%1</b>" というグループ(とその全参加者)を友だちリストから削除しますか?',
|
||||||
|
|
||||||
|
// Change Password Dialog
|
||||||
|
'changePassword': 'パスワード変更',
|
||||||
|
'changePasswordInstructions': 'パスワードを変更するには、まず現在のパスワード、次に新しいパスワードを入力してください。',
|
||||||
|
'currentPassword': '現在のパスワード',
|
||||||
|
'newPassword': '新規パスワード',
|
||||||
|
'confirmPassword': '確認用パスワード',
|
||||||
|
'changeSuccess': "パスワードが正常に変更されました。\n再ログインしてください。",
|
||||||
|
'currentPassInvalid': '入力された現在のパスワードが無効です。',
|
||||||
|
'changePasswordShort': 'パスワードは6-20文字列にしてください。',
|
||||||
|
'changeFailed': 'パスワード変更処理中、問題が発生しました。後ほど再度お試しください。',
|
||||||
|
'changeNoMatch': 'パスワードが一致しません。',
|
||||||
|
'change': '変更',
|
||||||
|
|
||||||
|
// Reset Password
|
||||||
|
'reset': 'リセット',
|
||||||
|
'forgotPassword': 'パスワード忘れ',
|
||||||
|
'passwordReset': 'パスワードリセット',
|
||||||
|
'emailAddress': 'メールアドレス',
|
||||||
|
'newPasswordEmailed': '新しいパスワードを%1へメールしました。',
|
||||||
|
'noEmailOnRecord': '指定されたメールアドレスの登録されているユーザ名は見つかりませんでした。',
|
||||||
|
'problemResetting': 'パスワードの再設定処理中、問題が発生しました。<br />後ほど再度お試しください。',
|
||||||
|
|
||||||
|
// Statuses
|
||||||
|
'available': 'チャット可能',
|
||||||
|
'friendsOnly': '友人のみ',
|
||||||
|
'busy': '取り込み中',
|
||||||
|
'beBackLater': '後ほど戻ります',
|
||||||
|
'away': 'コンピュータから退席中',
|
||||||
|
'custom': 'カスタムメッセージ...',
|
||||||
|
'invisible': 'ステータスを隠す',
|
||||||
|
|
||||||
|
// Miscellaneous
|
||||||
|
'autoreply': '自動返答',
|
||||||
|
'signedOff': 'サインオフしました。',
|
||||||
|
'reconnect': '再接続',
|
||||||
|
'onunload': 'メッセンジャーからサインアウトします。',
|
||||||
|
'ok': 'OK',
|
||||||
|
'cancel': 'キャンセル',
|
||||||
|
'username': 'ユーザ名',
|
||||||
|
'password': 'パスワード',
|
||||||
|
'email': 'メール',
|
||||||
|
'search': '検索',
|
||||||
|
'searchAgain': '再検索',
|
||||||
|
|
||||||
|
// Admin - User Search
|
||||||
|
'admin-userSearch': 'ユーザ検索',
|
||||||
|
'admin-chooseByAndSearch': '検索種類を選択し、検索情報を入力してください。ワイルドカード検索(*)も利用できます。',
|
||||||
|
'admin-searchType': '検索種類',
|
||||||
|
'admin-lastKnownIP': '最終確認IP',
|
||||||
|
'admin-lastActive': '最終ログイン',
|
||||||
|
'admin-status': 'ステータス',
|
||||||
|
'admin-kick': '追放',
|
||||||
|
'admin-ban': '入室禁止',
|
||||||
|
'admin-unban': '禁止解除',
|
||||||
|
'admin-makeAdmin': '管理者作成',
|
||||||
|
'admin-removeAdmin': '管理者削除',
|
||||||
|
'admin-banned': '入室禁止中',
|
||||||
|
'admin-admin': '管理者'
|
||||||
|
});
|
||||||
@@ -0,0 +1,145 @@
|
|||||||
|
// Korea Language
|
||||||
|
// Translated by TAEKYUNI :: HTTP://WWW.GAERAE.COM
|
||||||
|
|
||||||
|
Languages.onLoad('korean', {
|
||||||
|
// Login
|
||||||
|
'signOn': '로그인',
|
||||||
|
'incorrectInfo': '사용자이름과 비밀번호가 틀립니다!',
|
||||||
|
'userBanned': '접근 금지되어있습니다!',
|
||||||
|
|
||||||
|
// Buddylist
|
||||||
|
'buddyList': '친구 목록',
|
||||||
|
'addBuddyButton': '친구 추가',
|
||||||
|
'joinChatroomButton': '채팅방',
|
||||||
|
'removeBuddyButton': '친구 삭제',
|
||||||
|
'IMAnyoneButton': '1:1 대화',
|
||||||
|
'changePasswordButton': '비밀번호 변경',
|
||||||
|
'toggleSoundButton': '효과음',
|
||||||
|
'signOff': '로그아웃',
|
||||||
|
'offline': '오프라인', // Automatic buddylist group
|
||||||
|
'noSuchGroup': '해당 그룹이 없습니다!',
|
||||||
|
|
||||||
|
// Statuses
|
||||||
|
'available': '온라인',
|
||||||
|
|
||||||
|
// Registration
|
||||||
|
'register': '가입하기',
|
||||||
|
'confirm': '비밀번호 확인',
|
||||||
|
'registerSuccess': '성공적으로 등록하였습니다!',
|
||||||
|
'registerUsernameTaken': '이미 사용중인 이름을 선택하셨습니다.',
|
||||||
|
'registerUsernameBad': '사용자이름은 3~16자의 영문소문자, 숫자, _, 만 가능합니다.',
|
||||||
|
'registerPasswordShort': '비밀번호는 6~20자의 영문소문자, 숫자, 특수문자만 가능합니다!',
|
||||||
|
'registerInvalidEmail': '메일 주소를 입력해주세요!',
|
||||||
|
'registerEmailTaken': '이미 등록되어있는 메일 주소입니다!',
|
||||||
|
'registerFailed': '등록에 실패했습니다! 나중에 다시 시도해주십시오.',
|
||||||
|
'registerPasswordsMatch': '비밀번호가 일치하지 않습니다!',
|
||||||
|
|
||||||
|
// Chatrooms
|
||||||
|
'hasJoined': '님 입장.',
|
||||||
|
'hasLeft': '님 퇴장.',
|
||||||
|
|
||||||
|
// IMs
|
||||||
|
'notifySentButOffline': '참고사항 : 사용자가 현재 오프라인 상태입니다. 하지만 사용자가 로그인시 메시지가 나타납니다.',
|
||||||
|
'errorNotLoggedIn': '오류 : 메시지를 받는 사람이 없어 전송하지 못했습니다.',
|
||||||
|
'errorMsgTooLong': '오류 : 메시지가 너무 길어 보낼 수 없습니다.',
|
||||||
|
'errorUnknown': '오류 : 메시지를 전송하는 동안 알 수 없는 오류가 발생했습니다.',
|
||||||
|
'bold': '굵게',
|
||||||
|
'italic': '기울기',
|
||||||
|
'underline': '밑줄',
|
||||||
|
|
||||||
|
// New IM Dialog
|
||||||
|
'newIM': '1:1 대화',
|
||||||
|
'newIMPlease': '대화할 사용자이름을 입력하세요.',
|
||||||
|
'newIMProper': '사용자 이름을 다시 확인해주세요!',
|
||||||
|
'openIM': '대화하기',
|
||||||
|
|
||||||
|
// New Room Dialog
|
||||||
|
'newRoom': '채팅방',
|
||||||
|
'newRoomPlease': '입장하실 방명을 입력하세요.',
|
||||||
|
'alreadyInRoom': '"%1"에 이미 입장하셨습니다.',
|
||||||
|
'invalidRoom': '선택된 방 이름이 잘못되었습니다.',
|
||||||
|
'invalidRoomChars': '방 이름에 유효하지 않은 문자가 포함되어있습니다!',
|
||||||
|
'joinRoom': '입장',
|
||||||
|
'roomname': '채팅방 이름',
|
||||||
|
|
||||||
|
// New Buddy Dialog
|
||||||
|
'newBuddy': '친구 추가',
|
||||||
|
'newBuddyPlease': '추가할 친구 이름을 입력해주세요.',
|
||||||
|
'noSuchUser': '없는 사용자이름입니다!',
|
||||||
|
'alreadyOnBuddylist': '친구 목록에 이미 있습니다!',
|
||||||
|
'add': '추가',
|
||||||
|
'addtogroup': '그룹 추가',
|
||||||
|
|
||||||
|
// Remove Buddy Dialog
|
||||||
|
'removeBuddy': '친구 삭제',
|
||||||
|
'removeBuddyAreYouSure': '친구 목록에서 "<b>%1</b>" 님을 삭제하시겠습니까?',
|
||||||
|
|
||||||
|
// Block Buddy Dialog
|
||||||
|
'blockBuddy': '친구 차단',
|
||||||
|
'unblockBuddy': '친구 차단 해제',
|
||||||
|
'blockBuddyAreYouSure': '친구 목록에서 "<b>%1</b>" 님을 친구 차단하시겠습니까?',
|
||||||
|
'unblockBuddyAreYouSure': '친구 목록에서 "<b>%1</b>" 님을 친구 차단 해제 하시겠습니까?',
|
||||||
|
|
||||||
|
// Remove Group Dialog
|
||||||
|
'removeGroup': '그룹 삭제',
|
||||||
|
'removeGroupAreYouSure': '친구 목록에서 그룹 "<b>%1</b>" 을 삭제하기겠습니까?(그룹내 친구목록도 같이 삭제됨)',
|
||||||
|
|
||||||
|
// Change Password Dialog
|
||||||
|
'changePassword': '비밀번호 변경',
|
||||||
|
'changePasswordInstructions': '비밀번호를 변경하려면 현재 비밀번호 입력후 새 비밀번호를 입력하세요.',
|
||||||
|
'currentPassword': '현재 비밀번호',
|
||||||
|
'newPassword': '새 비밀번호',
|
||||||
|
'confirmPassword': '새 비밀번호 확인',
|
||||||
|
'changeSuccess': "비밀번호 변경이 성공적으로 완료되었습니다!\n지금 다시 로그인 하세요.",
|
||||||
|
'currentPassInvalid': '"현재 비밀번호" 입력이 잘못되었습니다.',
|
||||||
|
'changePasswordShort': '비밀번호는 6~20자의 영문소문자, 숫자, 특수문자만 가능합니다!',
|
||||||
|
'changeFailed': '비밀번호 변경 중 알 수 없는 오류가 발생했습니다.잠시 후 다시 시도해주십시오.',
|
||||||
|
'changeNoMatch': '비밀번호가 일치하지 않습니다!',
|
||||||
|
'change': '변경',
|
||||||
|
|
||||||
|
// Reset Password
|
||||||
|
'reset': '재설정',
|
||||||
|
'forgotPassword': '비밀번호 찾기',
|
||||||
|
'passwordReset': '비밀번호 재설정',
|
||||||
|
'emailAddress': '메일 주소',
|
||||||
|
'newPasswordEmailed': '새 비밀번호를 "%1" 메일로 전송되었습니다 %1',
|
||||||
|
'noEmailOnRecord': '사용자 중에 해당 메일주소가 없습니다.',
|
||||||
|
'problemResetting': '비밀번호 재설정 중 알 수 없는 오류가 발생했습니다.<br />잠시 후 다시 시도해주십시오.',
|
||||||
|
|
||||||
|
// Statuses
|
||||||
|
'available': '온라인',
|
||||||
|
'friendsOnly': '친구만 보이기',
|
||||||
|
'busy': '지금 바쁨',
|
||||||
|
'beBackLater': '자리비움',
|
||||||
|
'away': '다른 용무 중',
|
||||||
|
'custom': '개인 문자 입력...',
|
||||||
|
'invisible': '오프라인 표시',
|
||||||
|
|
||||||
|
// Miscellaneous
|
||||||
|
'autoreply': '자동 대답',
|
||||||
|
'signedOff': '로그아웃됩니다!',
|
||||||
|
'reconnect': '재연결',
|
||||||
|
'onunload': '인스턴트 메신저를 로그아웃합니다. 다시 로그인해주세요.',
|
||||||
|
'ok': '확인',
|
||||||
|
'cancel': '취소',
|
||||||
|
'username': '사용자이름',
|
||||||
|
'password': '비밀번호',
|
||||||
|
'email': '메일',
|
||||||
|
'search': '검색',
|
||||||
|
'searchAgain': '다시 검색',
|
||||||
|
|
||||||
|
// Admin - User Search
|
||||||
|
'admin-userSearch': '사용자 검색',
|
||||||
|
'admin-chooseByAndSearch': '검색 유형을 선택하고 적절한 검색 정보를 입력하십시오. 전체검색은 " * " 입력해주세요.',
|
||||||
|
'admin-searchType': '검색 유형',
|
||||||
|
'admin-lastKnownIP': '최근 접속 IP',
|
||||||
|
'admin-lastActive': '최근 접속일',
|
||||||
|
'admin-status': '접속상태',
|
||||||
|
'admin-kick': '포기',
|
||||||
|
'admin-ban': '접근 금지',
|
||||||
|
'admin-unban': '접근 금지 해제',
|
||||||
|
'admin-makeAdmin': '관리자 추가',
|
||||||
|
'admin-removeAdmin': '관리자 삭제',
|
||||||
|
'admin-banned': '접근금지',
|
||||||
|
'admin-admin': '관리자'
|
||||||
|
});
|
||||||
@@ -0,0 +1,149 @@
|
|||||||
|
/*
|
||||||
|
* Persian Language (Farsi)
|
||||||
|
* Behrouz Pooladrag
|
||||||
|
* http://www.IFLashLord.Com
|
||||||
|
* Me@IFLashLord.Com
|
||||||
|
*/
|
||||||
|
|
||||||
|
Languages.onLoad('persian_farsi', {
|
||||||
|
// Login
|
||||||
|
'signOn': 'ورود',
|
||||||
|
'incorrectInfo': '! نام کاربری یا رمز عبور اشتباه است',
|
||||||
|
'userBanned': '!شما برای ورود اجازه ندارید',
|
||||||
|
|
||||||
|
// Buddylist
|
||||||
|
'buddyList': 'لیست دوستان',
|
||||||
|
'addBuddyButton': 'افرودن دوستان',
|
||||||
|
'joinChatroomButton': 'پیوستن به اتاق چت',
|
||||||
|
'removeBuddyButton': 'حذف کاربر انتخاب شده',
|
||||||
|
'IMAnyoneButton': 'چت با هر کس',
|
||||||
|
'changePasswordButton': 'تغییر رمز عبور',
|
||||||
|
'toggleSoundButton': 'قطع و وصل صدا',
|
||||||
|
'signOff': 'خروج',
|
||||||
|
'offline': 'آفلاین', // Automatic buddylist group
|
||||||
|
'noSuchGroup': '!هیچ گروهی در لیست دوستان وجود ندارد',
|
||||||
|
|
||||||
|
// Statuses
|
||||||
|
'available': 'I\'m available',
|
||||||
|
|
||||||
|
// Registration
|
||||||
|
'register': 'ثبت نام',
|
||||||
|
'confirm': 'تایید',
|
||||||
|
'registerSuccess': 'عضویت با موفقیت انجام شد',
|
||||||
|
'registerUsernameTaken': '! نام کاربری که شما انتخاب کرده اید قبلا ثبت شده',
|
||||||
|
'registerUsernameBad': 'نام کاربری می بایست با حروف انگلیسی بوده و اعداد و _ نیز مجاز <br />می باشد و طول آن نیز بین 3 تا 16 کاراکتر باشد',
|
||||||
|
'registerPasswordShort': '! طول رمز عبور می بایست بین 6 تا 20 کاراکتر باشد',
|
||||||
|
'registerInvalidEmail': '! آدرس ایمیل نادرست می باشد',
|
||||||
|
'registerEmailTaken': '! یک نام کاربری قبلا با این آدرس ایمیل ثبت شده است',
|
||||||
|
'registerFailed': '. ثبت نام نا موفق بود! لطفا بعدا دوباره سعی نمایید',
|
||||||
|
'registerPasswordsMatch': '! رمزهای عبور با هم برابر نیستند',
|
||||||
|
|
||||||
|
// Chatrooms
|
||||||
|
'hasJoined': 'وارد شد',
|
||||||
|
'hasLeft': 'خارج شد',
|
||||||
|
|
||||||
|
// IMs
|
||||||
|
'notifySentButOffline': '. توجه : این کاربر هم اکنون آفلاین است اما وقتی که آنلاین شود پیغام شما را دریافت می کند',
|
||||||
|
'errorNotLoggedIn': '<div dir="rtl">خطا : پیغام شما ارسال نمی شود زیرا دریافت کننده هم اکنون آنلاین نمی باشد.</div>',
|
||||||
|
'errorMsgTooLong': '<div dir="rtl">خطا : پیغام شما ارسال نشد زیرا طول آن بیش از حد زیاد می باشد.</div>',
|
||||||
|
'errorUnknown': '<div dir="rtl">خطا : مشکلی نا شناس در ارسال پیغام پیش آمده.</div>',
|
||||||
|
'bold': 'Bold',
|
||||||
|
'italic': 'Italic',
|
||||||
|
'underline': 'Underline',
|
||||||
|
|
||||||
|
// New IM Dialog
|
||||||
|
'newIM': '...چت با کاربر جدید',
|
||||||
|
'newIMPlease': '<div dir="rtl">لطفا نام کاربری فردی را می خواهید با آن چت کنید را وارد نمایید</div>',
|
||||||
|
'newIMProper': '! لطفا یک نام کاربری وارد نمایید',
|
||||||
|
'openIM': 'شروع چت',
|
||||||
|
|
||||||
|
// New Room Dialog
|
||||||
|
'newRoom': 'پیوستن به اتاق چت',
|
||||||
|
'newRoomPlease': '<div dir="rtl">لطفا نام اتاق گفتوگویی را که می خواهید به آن بپیوندید را بنویسید یا بر روی نام آن در پایین کلیک کنید</div>',
|
||||||
|
'alreadyInRoom': '<div dir="rtl">"%1"شما قبلا وارد شده اید </div>',
|
||||||
|
'invalidRoom': '<div dir="rtl">نام اتاقی انتخاب کرده اید نادرست می باشد</div>',
|
||||||
|
'invalidRoomChars': '<div dir="rtl">در نام اتاق از کاراکترهای نادرست استفاده شده!</div>',
|
||||||
|
'joinRoom': 'پيوستن',
|
||||||
|
'roomname': 'نـــــام اتـــــاق چــــــت',
|
||||||
|
|
||||||
|
// New Buddy Dialog
|
||||||
|
'newBuddy': 'افزودن کاربران',
|
||||||
|
'newBuddyPlease': '<p dir="rtl">لطفا نام کاربری که می خواهید به لیست شما اضافه شود را وارد نمایید</p>',
|
||||||
|
'noSuchUser': '!هیچ کس با این نام کاربری ثبت نام نکرده است',
|
||||||
|
'alreadyOnBuddylist': '!این کاربر قبلا در لیست شما افزوده شده',
|
||||||
|
'add': 'افزودن',
|
||||||
|
'addtogroup': 'افزودن به گروه',
|
||||||
|
|
||||||
|
// Remove Buddy Dialog
|
||||||
|
'removeBuddy': 'حذف کاربر انتخاب شده از لیست',
|
||||||
|
'removeBuddyAreYouSure': '<div dir="rtl">آیا شما واقعا می خواهید "<b>%1</b>"را حذف نمایید؟ </div>',
|
||||||
|
|
||||||
|
// Block Buddy Dialog
|
||||||
|
'blockBuddy': 'قفل کردن کاربر',
|
||||||
|
'unblockBuddy': 'باز کردن قفل کاربر',
|
||||||
|
'blockBuddyAreYouSure': '<div dir="rtl">آیا شما واقعا می خواهید"<b>%1</b>"را قفل نمایید؟ </div>',
|
||||||
|
'unblockBuddyAreYouSure': '<div dir="rtl">آیا شما واقعا می خواهید فقل"<b>%1</b>"را باز نمایید؟</div>',
|
||||||
|
|
||||||
|
// Remove Group Dialog
|
||||||
|
'removeGroup': 'حذف گروه',
|
||||||
|
'removeGroupAreYouSure': '<div dir="rtl">آیا شما واقعا می خواهید گروه"<b>%1</b>"را به همراه تمامی کاربران درون آن حذف نمایید؟</div>',
|
||||||
|
|
||||||
|
// Change Password Dialog
|
||||||
|
'changePassword': 'تغییر رمز عبور',
|
||||||
|
'changePasswordInstructions': '<div dir="rtl">برای تغییر رمز عبور ، رمز عبور خود را به همراه رمز عبور جدید و تکرار رمز عبور جدید را وارد نمایید.</div>',
|
||||||
|
'currentPassword': 'رمز عبور جاری',
|
||||||
|
'newPassword': 'رمز عبور جدید',
|
||||||
|
'confirmPassword': 'تکرار رمز عبور جدید',
|
||||||
|
'changeSuccess': "! رمز عبور با موفقیت تغییر یافت\nلطفا دوباره وارد سایت شوید.",
|
||||||
|
'currentPassInvalid': '! رمز عبور جاری نادرست می باشد',
|
||||||
|
'changePasswordShort': '! طول رمز عبور می بایست بین 6 تا 20 کاراکتر باشد',
|
||||||
|
'changeFailed': 'در تغییر رمز عبور شما مشکلی پیش آمده لطفا بعدا دوباره سعی نمایید',
|
||||||
|
'changeNoMatch': '!رمزهای عبور با هم برابر نیستند',
|
||||||
|
'change': 'تغییر رمز عبور',
|
||||||
|
|
||||||
|
// Reset Password
|
||||||
|
'reset': 'ریست',
|
||||||
|
'forgotPassword': 'بازیابی رمز عبور',
|
||||||
|
'passwordReset': 'باز نشانی رمز عبور',
|
||||||
|
'emailAddress': 'آدرس ایمیل',
|
||||||
|
'newPasswordEmailed': '<div dir="rtl">رمز عبور شما به ایمیل [%1] ارسال شد</div>',
|
||||||
|
'noEmailOnRecord': '<div dir="rtl">این آدرس ایمیل برای هیچ یک از کابران قرار داده نشده است</div>',
|
||||||
|
'problemResetting': '<div dir="rtl">! مشکلی در باز نشانی رمز عبور پیش آمده<br />لطفا بعدا دوباره سعی نمایید</div>',
|
||||||
|
|
||||||
|
// Statuses
|
||||||
|
'available': 'من فعالم',
|
||||||
|
'friendsOnly': 'فقط دوستان',
|
||||||
|
'busy': 'من مشغولم',
|
||||||
|
'beBackLater': 'من بعدا بر می گردم',
|
||||||
|
'away': 'من پشت رایانه ام نیستم',
|
||||||
|
'custom': '... نوشتن متن',
|
||||||
|
'invisible': 'مخفی',
|
||||||
|
|
||||||
|
// Miscellaneous
|
||||||
|
'autoreply': 'جواب خودکار',
|
||||||
|
'signedOff': '! شما با موفقیت خارج شدید',
|
||||||
|
'reconnect': 'اتصال دوباره',
|
||||||
|
'onunload': '! در صورت تایید این گذینه شما از سایت خارج خواهید شد',
|
||||||
|
'ok': 'تایید',
|
||||||
|
'cancel': 'انصراف',
|
||||||
|
'username': 'نام کاربری',
|
||||||
|
'password': 'رمز عبور',
|
||||||
|
'email': 'ایمیل',
|
||||||
|
'search': 'جستجو',
|
||||||
|
'searchAgain': 'جستجوی دوباره',
|
||||||
|
|
||||||
|
// Admin - User Search
|
||||||
|
'admin-userSearch': 'جستجوی در بین کاربران',
|
||||||
|
'admin-chooseByAndSearch': '<div dir="rtl">یکی از روش های جستجو را انتخاب نمایید و فیلد مربوطه را پر نمایید استغاده از (*) نیز مجار می باشد.</div>',
|
||||||
|
'admin-searchType': 'نوع جستجو',
|
||||||
|
'admin-lastKnownIP': 'آي پی آخرین ورود',
|
||||||
|
'admin-lastActive': 'آخرین فعالیت',
|
||||||
|
'admin-status': 'وضعیت',
|
||||||
|
'admin-kick': 'Kick',
|
||||||
|
'admin-ban': 'محدود کردن',
|
||||||
|
'admin-unban': 'جذف محدودیت',
|
||||||
|
'admin-makeAdmin': 'ایجاد مدیر',
|
||||||
|
'admin-removeAdmin': 'حذف مدیر',
|
||||||
|
'admin-banned': 'محدود شده',
|
||||||
|
'admin-admin': 'مدیریت'
|
||||||
|
});
|
||||||
@@ -0,0 +1,143 @@
|
|||||||
|
// Russian Language
|
||||||
|
// Translated by Grigoriy Korolev
|
||||||
|
|
||||||
|
Languages.onLoad('russian', {
|
||||||
|
// Login
|
||||||
|
'signOn': 'Войти',
|
||||||
|
'incorrectInfo': 'Неверный пароль или имя пользователя!',
|
||||||
|
'userBanned': 'Вас заблокировали!',
|
||||||
|
|
||||||
|
// Buddylist
|
||||||
|
'buddyList': 'Список знакомых',
|
||||||
|
'addBuddyButton': 'Добавить знакомого',
|
||||||
|
'joinChatroomButton': 'Присоединиться к беседе',
|
||||||
|
'removeBuddyButton': 'Удалить знакомого',
|
||||||
|
'IMAnyoneButton': 'Поговорить с кем-нибудь',
|
||||||
|
'changePasswordButton': 'Сменить Пароль',
|
||||||
|
'toggleSoundButton': 'Вкл/Выкл Звук',
|
||||||
|
'signOff': 'Выйти',
|
||||||
|
'offline': 'Не в сети', // Automatic buddylist group
|
||||||
|
'noSuchGroup': 'В списке знакомых нет такой группы!',
|
||||||
|
|
||||||
|
// Statuses
|
||||||
|
'available': 'Я здесь',
|
||||||
|
|
||||||
|
// Registration
|
||||||
|
'register': 'Регистрация',
|
||||||
|
'confirm': 'подтвердить пароль',
|
||||||
|
'registerSuccess': 'Регистрация прошла успешно!',
|
||||||
|
'registerUsernameTaken': 'Такое имя пользователя уже занято.',
|
||||||
|
'registerUsernameBad': 'В имени пользователя могут быть только буквы, цифры, _,<br />а длинной оно должно быть от 3 до 16 символов.',
|
||||||
|
'registerPasswordShort': 'Пароль должен быть длинной от 6 до 20 символов!',
|
||||||
|
'registerInvalidEmail': 'Некорректный е-мейл адрес!',
|
||||||
|
'registerEmailTaken': 'Пользователь с таким е-мейл адресом уже зарегистрирован!',
|
||||||
|
'registerFailed': 'Регистрация не удалась! Попробуйте снова.',
|
||||||
|
'registerPasswordsMatch': 'Пароль и его подтверждение не совпадают!',
|
||||||
|
|
||||||
|
// Chatrooms
|
||||||
|
'hasJoined': 'присоединился.',
|
||||||
|
'hasLeft': 'ушел.',
|
||||||
|
|
||||||
|
// IMs
|
||||||
|
'notifySentButOffline': 'Заметьте: Этот пользователь сейчас не в сети, но он получит Ваше сообщение когда войдёт.',
|
||||||
|
'errorNotLoggedIn': 'Ошибка: Ваше сообщение не может быть отправлено, так как получатель не авторизован.',
|
||||||
|
'errorMsgTooLong': 'Ошибка: Ваше сообщение не может быть отправлено, поскольку оно слишком длинное.',
|
||||||
|
'errorUnknown': 'Ошибка: В процессе отправки Вашего сообщения возникла неизвестная ошибка.',
|
||||||
|
'bold': 'Жирный',
|
||||||
|
'italic': 'Курсив',
|
||||||
|
'underline': 'Подчеркнутый',
|
||||||
|
|
||||||
|
// New IM Dialog
|
||||||
|
'newIM': 'Новое сообщение...',
|
||||||
|
'newIMPlease': 'Пожалуйста, введите имя пользователя, которому вы хотите отправить сообщение.',
|
||||||
|
'newIMProper': 'Пожалуйста, введите корректное имя пользователя!',
|
||||||
|
'openIM': 'Начать разговор',
|
||||||
|
|
||||||
|
// New Room Dialog
|
||||||
|
'newRoom': 'Присоединиться к беседе...',
|
||||||
|
'newRoomPlease': 'Как называется дискуссия, к которой Вы хотите присоединиться?.',
|
||||||
|
'alreadyInRoom': 'Вы уже присоединились к обсуждению "%1"',
|
||||||
|
'invalidRoom': 'Некорректное название дискуссии.',
|
||||||
|
'invalidRoomChars': 'В название дискуссии есть запрещенные символы!',
|
||||||
|
'joinRoom': 'Присоединиться',
|
||||||
|
|
||||||
|
// New Buddy Dialog
|
||||||
|
'newBuddy': 'Добавить знакомого',
|
||||||
|
'newBuddyPlease': 'Пожалуйста, напишите имя пользователя которого Вы хотите добавить в список знакомых.',
|
||||||
|
'noSuchUser': 'Такой пользователь не зарегистрирован!',
|
||||||
|
'alreadyOnBuddylist': 'Пользователь уже в списке Ваших знакомых!',
|
||||||
|
'add': 'Добавить',
|
||||||
|
|
||||||
|
// Remove Buddy Dialog
|
||||||
|
'removeBuddy': 'Удалить знакомого',
|
||||||
|
'removeBuddyAreYouSure': 'Вы уверены, что хотите удалить знакомого "<b>%1</b>" из своего списка?',
|
||||||
|
|
||||||
|
// Block Buddy Dialog
|
||||||
|
'blockBuddy': 'Заблокировать Знакомого',
|
||||||
|
'unblockBuddy': 'Разблокировать Знакомого',
|
||||||
|
'blockBuddyAreYouSure': 'Вы уверены, что хотите заблокировать знакомого "<b>%1</b>"?',
|
||||||
|
'unblockBuddyAreYouSure': 'Вы уверены, что хотите разблокировать знакомого "<b>%1</b>"?',
|
||||||
|
|
||||||
|
// Remove Group Dialog
|
||||||
|
'removeGroup': 'Удалить группу',
|
||||||
|
'removeGroupAreYouSure': 'Вы уверены, что хотите удалить группу "<b>%1</b>" (и всех её пользователей) из списка знакомых?',
|
||||||
|
|
||||||
|
// Change Password Dialog
|
||||||
|
'changePassword': 'Изменить пароль',
|
||||||
|
'changePasswordInstructions': 'Для смены пароля, пожалуйста, сначала введите свой текущий пароль, а затем новый пароль.',
|
||||||
|
'currentPassword': 'Текущий Пароль',
|
||||||
|
'newPassword': 'Новый Пароль',
|
||||||
|
'confirmPassword': 'Подтвердить Пароль',
|
||||||
|
'changeSuccess': "Пароль успешно изменен!\nПожалуйста теперь заново войдите в систему.",
|
||||||
|
'currentPassInvalid': 'Вы ввели неправильный "Текущий Пароль".',
|
||||||
|
'changePasswordShort': 'Пароль должен быть длинной от 6 до 20 символов!',
|
||||||
|
'changeFailed': 'Возникли проблемы при смене Вашего пароля. Попробуйте снова.',
|
||||||
|
'changeNoMatch': 'Пароль и его подтверждение не совпадают!',
|
||||||
|
'change': 'Измнеить',
|
||||||
|
|
||||||
|
// Reset Password
|
||||||
|
'reset': 'Сбросить',
|
||||||
|
'forgotPassword': 'Я забыл пароль',
|
||||||
|
'passwordReset': 'Сбросить пароль',
|
||||||
|
'emailAddress': 'Е-мейл адрес',
|
||||||
|
'newPasswordEmailed': 'Ваш новый пароль отправлен по е-мейл на %1',
|
||||||
|
'noEmailOnRecord': 'В системе не зарегистрирован пользователь с таким е-мейл адресом.',
|
||||||
|
'problemResetting': 'Возникли проблемы при сбросе Вашего пароля.<br />Пожалуйста, попробуйте снова.',
|
||||||
|
|
||||||
|
// Statuses
|
||||||
|
'available': 'Я здесь',
|
||||||
|
'friendsOnly': 'Только для друзей',
|
||||||
|
'busy': 'Я занят',
|
||||||
|
'beBackLater': 'Скоро вернусь',
|
||||||
|
'away': 'Я не за компьютером',
|
||||||
|
'custom': 'Свой вариант...',
|
||||||
|
'invisible': 'Невидимый',
|
||||||
|
|
||||||
|
// Miscellaneous
|
||||||
|
'autoreply': 'Авто-ответ',
|
||||||
|
'signedOff': 'Вы вышли!',
|
||||||
|
'reconnect': 'Войти снова',
|
||||||
|
'onunload': 'В результате этих действий Вы выйдите из приложения.',
|
||||||
|
'ok': 'Ok',
|
||||||
|
'cancel': 'Отмена',
|
||||||
|
'username': 'Имя пользователя',
|
||||||
|
'password': 'пароль',
|
||||||
|
'email': 'Е-мейл',
|
||||||
|
'search': 'Поиск',
|
||||||
|
'searchAgain': 'Искать снова',
|
||||||
|
|
||||||
|
// Admin - User Search
|
||||||
|
'admin-userSearch': 'Поиск пользователей',
|
||||||
|
'admin-chooseByAndSearch': 'Выберите тип поиска, а затем введите поисковый запрос. Возможен поиск по маске (*).',
|
||||||
|
'admin-searchType': 'Тип поиска',
|
||||||
|
'admin-lastKnownIP': 'IP адрес последнего входа',
|
||||||
|
'admin-lastActive': 'Дата последнего входа',
|
||||||
|
'admin-status': 'Статус',
|
||||||
|
'admin-kick': 'Выгнать',
|
||||||
|
'admin-ban': 'Заблокировать',
|
||||||
|
'admin-unban': 'Разблокировать',
|
||||||
|
'admin-makeAdmin': 'Дать права администратора',
|
||||||
|
'admin-removeAdmin': 'Снять права администратора',
|
||||||
|
'admin-banned': 'Заблокирован',
|
||||||
|
'admin-admin': 'Администратор'
|
||||||
|
});
|
||||||
@@ -0,0 +1,144 @@
|
|||||||
|
// Simplified Chinese Language
|
||||||
|
|
||||||
|
Languages.onLoad('simplified_chinese', {
|
||||||
|
// Login
|
||||||
|
'signOn': '登陆',
|
||||||
|
'incorrectInfo': '用户名或密码不正确!',
|
||||||
|
'userBanned': '你已经被锁定!',
|
||||||
|
|
||||||
|
// Buddylist
|
||||||
|
'buddyList': '好友列表',
|
||||||
|
'addBuddyButton': '添加好友',
|
||||||
|
'joinChatroomButton': '加入聊天室',
|
||||||
|
'removeBuddyButton': '删除好友',
|
||||||
|
'IMAnyoneButton': '即时通讯人',
|
||||||
|
'changePasswordButton': '修改密码',
|
||||||
|
'toggleSoundButton': '切换声音',
|
||||||
|
'signOff': '在线',
|
||||||
|
'offline': '离线', // Automatic buddylist group
|
||||||
|
'noSuchGroup': '没有这个列表组!',
|
||||||
|
|
||||||
|
// Statuses
|
||||||
|
'available': '我有空',
|
||||||
|
|
||||||
|
// Registration
|
||||||
|
'register': '注册',
|
||||||
|
'confirm': '确认',
|
||||||
|
'registerSuccess': '注册成功!',
|
||||||
|
'registerUsernameTaken': '你选择的用户名已经在使用中...',
|
||||||
|
'registerUsernameBad': '用户名只能包含字母,数字,_,<br />并切不能小于三位.',
|
||||||
|
'registerPasswordShort': '密码必须在6到20个字符长!',
|
||||||
|
'registerInvalidEmail': '无效的电子邮件地址!',
|
||||||
|
'registerEmailTaken': '此电子邮件已经被注册,请检查更换!',
|
||||||
|
'registerFailed': '注册失败,请稍后...',
|
||||||
|
'registerPasswordsMatch': '密码不匹配!',
|
||||||
|
|
||||||
|
// Chatrooms
|
||||||
|
'hasJoined': '已加入.',
|
||||||
|
'hasLeft': '已离开.',
|
||||||
|
|
||||||
|
// IMs
|
||||||
|
'notifySentButOffline': '警告: 此用户目前离线,但他们将在登录是分别获得这个讯息时.',
|
||||||
|
'errorNotLoggedIn': '错误: 你的讯息,无法发送,因为收件人是尚未登录.',
|
||||||
|
'errorMsgTooLong': '错误: 你的讯息,无法发送,因为它是太长.',
|
||||||
|
'errorUnknown': '错误: 未知错误.',
|
||||||
|
'bold': '粗体',
|
||||||
|
'italic': '斜体',
|
||||||
|
'underline': '下划线',
|
||||||
|
|
||||||
|
// New IM Dialog
|
||||||
|
'newIM': '新的消息...',
|
||||||
|
'newIMPlease': '请输入你想发送消息的用户名.',
|
||||||
|
'newIMProper': '请输入正确的用户名!',
|
||||||
|
'openIM': '开放的IM',
|
||||||
|
|
||||||
|
// New Room Dialog
|
||||||
|
'newRoom': '加入聊天室...',
|
||||||
|
'newRoomPlease': '请输入你想加入的聊天室名称.',
|
||||||
|
'alreadyInRoom': '你已经存在 "%1"',
|
||||||
|
'invalidRoom': '所选房间名称无效.',
|
||||||
|
'invalidRoomChars': '房间名称中含有无效字符!',
|
||||||
|
'joinRoom': '加入',
|
||||||
|
'roomname': '房间名',
|
||||||
|
|
||||||
|
// New Buddy Dialog
|
||||||
|
'newBuddy': '添加好友',
|
||||||
|
'newBuddyPlease': '请输入好友名称添加到你的好友列表.',
|
||||||
|
'noSuchUser': '没有这样的用户,请注册!',
|
||||||
|
'alreadyOnBuddylist': '用户已经存在你的好友列表!',
|
||||||
|
'add': '加入',
|
||||||
|
'addtogroup': '加入小组',
|
||||||
|
|
||||||
|
// Remove Buddy Dialog
|
||||||
|
'removeBuddy': '删除好友',
|
||||||
|
'removeBuddyAreYouSure': '你确定要从列表删除你的好友"<b>%1</b>"?',
|
||||||
|
|
||||||
|
// Block Buddy Dialog
|
||||||
|
'blockBuddy': '好友',
|
||||||
|
'unblockBuddy': '一般好友',
|
||||||
|
'blockBuddyAreYouSure': '你确定要阻止好友 "<b>%1</b>"?',
|
||||||
|
'unblockBuddyAreYouSure': '你确定要加入好友 "<b>%1</b>"?',
|
||||||
|
|
||||||
|
// Remove Group Dialog
|
||||||
|
'removeGroup': '删除这个组',
|
||||||
|
'removeGroupAreYouSure': '你确定要删除组 "<b>%1</b>",这将删除它下面的所有用户?',
|
||||||
|
|
||||||
|
// Change Password Dialog
|
||||||
|
'changePassword': '修改密码',
|
||||||
|
'changePasswordInstructions': '要修改密码请输入旧密码.然后输入新的密码.',
|
||||||
|
'currentPassword': '当前密码',
|
||||||
|
'newPassword': '新密码',
|
||||||
|
'confirmPassword': '确认密码',
|
||||||
|
'changeSuccess': "密码修改成功!\n请重新登陆.",
|
||||||
|
'currentPassInvalid': '"当前密码"无效.',
|
||||||
|
'changePasswordShort': '密码必须在6到20个字符长!',
|
||||||
|
'changeFailed': '修改失败,请稍后再试.',
|
||||||
|
'changeNoMatch': '你的密码不匹配!',
|
||||||
|
'change': '修改',
|
||||||
|
|
||||||
|
// Reset Password
|
||||||
|
'reset': '重置',
|
||||||
|
'forgotPassword': '忘了通行证',
|
||||||
|
'passwordReset': '密码重置',
|
||||||
|
'emailAddress': '邮箱地址',
|
||||||
|
'newPasswordEmailed': '你的新密码已经发送到 %1',
|
||||||
|
'noEmailOnRecord': '没有这样的邮件地址,请重检查.',
|
||||||
|
'problemResetting': '重置密码错误.<br />请稍后再试.',
|
||||||
|
|
||||||
|
// Statuses
|
||||||
|
'available': '我有空',
|
||||||
|
'friendsOnly': '朋友只',
|
||||||
|
'busy': '忙碌中',
|
||||||
|
'beBackLater': '稍后回来',
|
||||||
|
'away': '现在不在电脑前',
|
||||||
|
'custom': '请输入定制信息...',
|
||||||
|
'invisible': '离线',
|
||||||
|
|
||||||
|
// Miscellaneous
|
||||||
|
'autoreply': '自动答复',
|
||||||
|
'signedOff': '你已经推出!',
|
||||||
|
'reconnect': '重新连接',
|
||||||
|
'onunload': '如果这样你就会推出通讯状态.',
|
||||||
|
'ok': '确定',
|
||||||
|
'cancel': '取消',
|
||||||
|
'username': '用户名',
|
||||||
|
'password': '密码',
|
||||||
|
'email': '邮箱',
|
||||||
|
'search': '搜索',
|
||||||
|
'searchAgain': '再次搜索',
|
||||||
|
|
||||||
|
// Admin - User Search
|
||||||
|
'admin-userSearch': '用户搜索',
|
||||||
|
'admin-chooseByAndSearch': '选择搜索类型,然后再输入你要搜索的信息(可以使用*).',
|
||||||
|
'admin-searchType': '搜索类型',
|
||||||
|
'admin-lastKnownIP': '最后登陆IP',
|
||||||
|
'admin-lastActive': '最活跃用户',
|
||||||
|
'admin-status': '地位',
|
||||||
|
'admin-kick': '排序',
|
||||||
|
'admin-ban': '禁止',
|
||||||
|
'admin-unban': 'Unban',
|
||||||
|
'admin-makeAdmin': '管理管理员',
|
||||||
|
'admin-removeAdmin': '删除管理员',
|
||||||
|
'admin-banned': 'Banned',
|
||||||
|
'admin-admin': '管理员'
|
||||||
|
});
|
||||||
@@ -0,0 +1,145 @@
|
|||||||
|
// Spanish Language
|
||||||
|
// Victor Ortega
|
||||||
|
|
||||||
|
Languages.onLoad('spanish', {
|
||||||
|
// Login
|
||||||
|
'signOn': 'Registrese',
|
||||||
|
'incorrectInfo': '!Usuario o contraseña incorrectos!',
|
||||||
|
'userBanned': '!No eres admitido!',
|
||||||
|
|
||||||
|
// Buddylist
|
||||||
|
'buddyList': 'Lista de contactos',
|
||||||
|
'addBuddyButton': 'Agregar un contacto',
|
||||||
|
'joinChatroomButton': 'Entrar a la sala de chat',
|
||||||
|
'removeBuddyButton': 'Eliminar un contacto',
|
||||||
|
'IMAnyoneButton': 'Disponible para todos',
|
||||||
|
'changePasswordButton': 'Cambiar contraseña',
|
||||||
|
'toggleSoundButton': 'Activar/Desactivar sonido',
|
||||||
|
'signOff': 'Salir',
|
||||||
|
'offline': 'No conectado', // Automatic buddylist group
|
||||||
|
'noSuchGroup': '!No existe ese grupo de contactos!',
|
||||||
|
|
||||||
|
// Statuses
|
||||||
|
'available': 'Estoy disponible',
|
||||||
|
|
||||||
|
// Registration
|
||||||
|
'register': 'Registrarme',
|
||||||
|
'confirm': 'Confirmar',
|
||||||
|
'registerSuccess': '!Registracion exitosa!',
|
||||||
|
'registerUsernameTaken': 'El nombre de usuario que elegiste ya esta ocupado.',
|
||||||
|
'registerUsernameBad': 'El nombre de usuario solo puede contener letras, numeros, _,<br />y tener 3 a 16 caracteres.',
|
||||||
|
'registerPasswordShort': '!La contraseña debe tener 6 a 20 caracteres!',
|
||||||
|
'registerInvalidEmail': '!Direcci$otilde;n de email no valida!',
|
||||||
|
'registerEmailTaken': '!Ya existe un usuario con esa direccion de email!',
|
||||||
|
'registerFailed': '!La registraciõn fallõ! Intente luego.',
|
||||||
|
'registerPasswordsMatch': '!Las contraseñas no coinciden!',
|
||||||
|
|
||||||
|
// Chatrooms
|
||||||
|
'hasJoined': 'entrõ.',
|
||||||
|
'hasLeft': 'saliõ.',
|
||||||
|
|
||||||
|
// IMs
|
||||||
|
'notifySentButOffline': 'Nota: Este usuario no esta actualmente conectado, pero recibirã este mensaje cuando se conecte.',
|
||||||
|
'errorNotLoggedIn': 'Error: El mensaje no fue enviado porque el destinatario no esta conectado.',
|
||||||
|
'errorMsgTooLong': 'Error: El mensaje no puede ser enviado porque es muy largo.',
|
||||||
|
'errorUnknown': 'Error: Un error desconocido ocurrio mientras se enviaba tu mensaje.',
|
||||||
|
'bold': 'Negrita',
|
||||||
|
'italic': 'Cursiva',
|
||||||
|
'underline': 'Subrayada',
|
||||||
|
|
||||||
|
// New IM Dialog
|
||||||
|
'newIM': 'Nuevo mensaje...',
|
||||||
|
'newIMPlease': 'Por favor ingrese el usuario con el que quiere comunicarse.',
|
||||||
|
'newIMProper': '!Por favor ingrese un nombre de usuario apropiado!',
|
||||||
|
'openIM': 'Abrir IM',
|
||||||
|
|
||||||
|
// New Room Dialog
|
||||||
|
'newRoom': 'Entrar a la sala de chat...',
|
||||||
|
'newRoomPlease': 'Por favor ingrese el nombre de la sala de chat a la cual quiere entrar.',
|
||||||
|
'alreadyInRoom': 'Ya esta adentro "%1"',
|
||||||
|
'invalidRoom': 'La sala de chat no existe.',
|
||||||
|
'invalidRoomChars': 'El nombre de la sala contiene caracteres invalidos!',
|
||||||
|
'joinRoom': 'Join',
|
||||||
|
'roomname': 'Nombre de Sala',
|
||||||
|
|
||||||
|
// New Buddy Dialog
|
||||||
|
'newBuddy': 'Agregar contacto.',
|
||||||
|
'newBuddyPlease': 'Por favor ingrese el nombre del usuario que quiere agregar a sus contactos.',
|
||||||
|
'noSuchUser': '!Usuario no esta registrado!',
|
||||||
|
'alreadyOnBuddylist': '!El usuario ya esta en la lista de contactos!',
|
||||||
|
'add': 'Agregar',
|
||||||
|
'addtogroup': 'Agregar al grupo',
|
||||||
|
|
||||||
|
// Remove Buddy Dialog
|
||||||
|
'removeBuddy': 'Eliminar contacto',
|
||||||
|
'removeBuddyAreYouSure': '¿Esta seguro de eliminar el usuario "<b>%1</b>" de la lista de contactos?',
|
||||||
|
|
||||||
|
// Block Buddy Dialog
|
||||||
|
'blockBuddy': 'Bloquear contacto',
|
||||||
|
'unblockBuddy': 'Desbloquear contacto',
|
||||||
|
'blockBuddyAreYouSure': '¿Esta seguro de bloquear el usuario "<b>%1</b>"?',
|
||||||
|
'unblockBuddyAreYouSure': '¿Esta seguro de desbloquear el usuario "<b>%1</b>"?',
|
||||||
|
|
||||||
|
// Remove Group Dialog
|
||||||
|
'removeGroup': 'Eliminar un grupo',
|
||||||
|
'removeGroupAreYouSure': '¿Esta seguro de eliminar el grupo "<b>%1</b>" (y todos los usuarios en &etilde;l) de su lista de contactos?',
|
||||||
|
|
||||||
|
// Change Password Dialog
|
||||||
|
'changePassword': 'Cambiar contraseña',
|
||||||
|
'changePasswordInstructions': 'Para cambiar su contraseña, ingrese su contraña actual, despu&etilde;s la nueva.',
|
||||||
|
'currentPassword': 'Contraseña actual',
|
||||||
|
'newPassword': 'Contraseña nueva',
|
||||||
|
'confirmPassword': 'Confirmar contraseña',
|
||||||
|
'changeSuccess': "La contraseña se cambio!\nPor favor reingrese ahora.",
|
||||||
|
'currentPassInvalid': 'La "Contraseña actual" que ingreso no es correcta.',
|
||||||
|
'changePasswordShort': '!La contraseña debe tener de 6 a 20 caracteres!',
|
||||||
|
'changeFailed': 'Hubo un problema procesando el cambio de contraseña. Por favor intente mas tarde.',
|
||||||
|
'changeNoMatch': '!Las contraseñas no coinciden!',
|
||||||
|
'change': 'Cambiar',
|
||||||
|
|
||||||
|
// Reset Password
|
||||||
|
'reset': 'Restablecer',
|
||||||
|
'forgotPassword': 'Olvide mi contraseña',
|
||||||
|
'passwordReset': 'Restablecer contraseña',
|
||||||
|
'emailAddress': 'Direccion de Email',
|
||||||
|
'newPasswordEmailed': 'Su nueva contraseña fue enviada a %1',
|
||||||
|
'noEmailOnRecord': 'No existe ningũn usuario con esa direcciõn de email.',
|
||||||
|
'problemResetting': 'Hubo un problema restableciendo su contraseña.<br />Por favor intente mas tarde.',
|
||||||
|
|
||||||
|
// Statuses
|
||||||
|
'available': 'Estoy disponible',
|
||||||
|
'friendsOnly': 'Solo amigos',
|
||||||
|
'busy': 'Estoy ocupado',
|
||||||
|
'beBackLater': 'Vuelvo enseguida',
|
||||||
|
'away': 'No disponible',
|
||||||
|
'custom': 'Mensaje personalizado...',
|
||||||
|
'invisible': 'Invisible',
|
||||||
|
|
||||||
|
// Miscellaneous
|
||||||
|
'autoreply': 'Auto-Respuesta',
|
||||||
|
'signedOff': '!Te desconectaste!',
|
||||||
|
'reconnect': 'Reconectar',
|
||||||
|
'onunload': 'Si continua, se desconectara del mensajero.',
|
||||||
|
'ok': 'Ok',
|
||||||
|
'cancel': 'Cancelar',
|
||||||
|
'username': 'Usuario',
|
||||||
|
'password': 'Contraseña',
|
||||||
|
'email': 'Email',
|
||||||
|
'search': 'Buscar',
|
||||||
|
'searchAgain': 'Buscar otra vez',
|
||||||
|
|
||||||
|
// Admin - User Search
|
||||||
|
'admin-userSearch': 'Buscar usuario',
|
||||||
|
'admin-chooseByAndSearch': 'Seleccione el tipo de busqueda e ingrese la informaciõn apropiada. Los comodines (*) estan permitidos.',
|
||||||
|
'admin-searchType': 'Tipo de busqueda',
|
||||||
|
'admin-lastKnownIP': 'Ultimo IP conocido',
|
||||||
|
'admin-lastActive': 'Ultima actividad',
|
||||||
|
'admin-status': 'Estado',
|
||||||
|
'admin-kick': 'Expulsar',
|
||||||
|
'admin-ban': 'No admitir',
|
||||||
|
'admin-unban': 'Admitir',
|
||||||
|
'admin-makeAdmin': 'Dar permiso de Administrador',
|
||||||
|
'admin-removeAdmin': 'Quitar permiso de Administrador',
|
||||||
|
'admin-banned': 'Prohibido',
|
||||||
|
'admin-admin': 'Administrador'
|
||||||
|
});
|
||||||
@@ -0,0 +1,144 @@
|
|||||||
|
// Vietnamese Language
|
||||||
|
|
||||||
|
Languages.onLoad('vietnamese', {
|
||||||
|
// Login
|
||||||
|
'signOn': 'Đăng Nhập',
|
||||||
|
'incorrectInfo': 'Tên đăng nhập hoặc mật khẩu chưa chính xác!',
|
||||||
|
'userBanned': 'Bạn đã bị ban!',
|
||||||
|
|
||||||
|
// Buddylist
|
||||||
|
'buddyList': 'Danh sách bạn',
|
||||||
|
'addBuddyButton': 'Thêm bạn',
|
||||||
|
'joinChatroomButton': 'Tham gia phòng chát',
|
||||||
|
'removeBuddyButton': 'Xóa bạn',
|
||||||
|
'IMAnyoneButton': 'Nhắn tin (đến bất cứ ai)!',
|
||||||
|
'changePasswordButton': 'Thay đổi mật khẩu',
|
||||||
|
'toggleSoundButton': 'Tắt âm thanh',
|
||||||
|
'signOff': 'Thoát khỏi',
|
||||||
|
'offline': 'Offline', // Automatic buddylist group
|
||||||
|
'noSuchGroup': 'Không có nhóm nào trong danh sách bạn!',
|
||||||
|
|
||||||
|
// Statuses
|
||||||
|
'available': 'Tôi có trên mạng',
|
||||||
|
|
||||||
|
// Registration
|
||||||
|
'register': 'Đăng Ký',
|
||||||
|
'confirm': 'Xác nhận',
|
||||||
|
'registerSuccess': 'Đăng ký thành công!',
|
||||||
|
'registerUsernameTaken': 'Tên đăng nhập này đã có người sử dụng.',
|
||||||
|
'registerUsernameBad': 'Tên đăng nhập chỉ có thể bao gồm ký tự, số, _,<br />và có chiều dài từ 3 đến 16 ký tự.',
|
||||||
|
'registerPasswordShort': 'Mật khẩu phải có chiều dài từ 6 đến 20 ký tự!',
|
||||||
|
'registerInvalidEmail': 'Địa chỉ email không có thật!',
|
||||||
|
'registerEmailTaken': 'Địa chỉ email này đã được đăng ký bởi một nick khác!',
|
||||||
|
'registerFailed': 'Đăng ký không thành công. Vui lòng thử lại sau!',
|
||||||
|
'registerPasswordsMatch': 'Mật khẩu chưa khớp!',
|
||||||
|
|
||||||
|
// Chatrooms
|
||||||
|
'hasJoined': 'đã vào phòng.',
|
||||||
|
'hasLeft': 'đã rời khỏi.',
|
||||||
|
|
||||||
|
// IMs
|
||||||
|
'notifySentButOffline': 'Chú ý: Nick này đã offline, nhưng bạn ấy sẽ nhận tin nhắn khi đăng nhập lại.',
|
||||||
|
'errorNotLoggedIn': 'Lỗi: Tin nhắn của bạn không thể gửi được do người nhận chưa đăng nhập.',
|
||||||
|
'errorMsgTooLong': 'Lỗi: Tin nhắn của bạn quá dài. Chúng tôi không thể gửi.',
|
||||||
|
'errorUnknown': 'Lỗi: Xuất hiện lỗi trong quá trình gửi tin nhắn của bạn..',
|
||||||
|
'bold': 'In đậm',
|
||||||
|
'italic': 'In nghiêng',
|
||||||
|
'underline': 'Gạch dưới',
|
||||||
|
|
||||||
|
// New IM Dialog
|
||||||
|
'newIM': 'Tin nhắn mới...',
|
||||||
|
'newIMPlease': 'Nhập tên đăng nhập của người bạn cần nhắn.',
|
||||||
|
'newIMProper': 'Vui lòng nhập chính xác tên đăng nhập!',
|
||||||
|
'openIM': 'Mở tin nhắn',
|
||||||
|
|
||||||
|
// New Room Dialog
|
||||||
|
'newRoom': 'Tham gia vào phòng...',
|
||||||
|
'newRoomPlease': 'Vui lòng nhập tên phòng bạn muốn tham gia.',
|
||||||
|
'alreadyInRoom': 'Bạn đã ở trong "%1"',
|
||||||
|
'invalidRoom': 'Phòng bạn chọn không có thật.',
|
||||||
|
'invalidRoomChars': 'Tên phòng có ký tự lạ!',
|
||||||
|
'joinRoom': 'Tham Gia',
|
||||||
|
'roomname': 'Tên Phòng',
|
||||||
|
|
||||||
|
// New Buddy Dialog
|
||||||
|
'newBuddy': 'Thêm bạn',
|
||||||
|
'newBuddyPlease': 'Nhập nick của người mà bạn muốn thêm vào danh sách bạn.',
|
||||||
|
'noSuchUser': 'Nick này chưa có ai đăng ký!',
|
||||||
|
'alreadyOnBuddylist': 'Nick này có trong danh sách bạn của bạn rồi mà!',
|
||||||
|
'add': 'Thêm',
|
||||||
|
'addtogroup': 'Thêm vào nhóm',
|
||||||
|
|
||||||
|
// Remove Buddy Dialog
|
||||||
|
'removeBuddy': 'Xóa bạn',
|
||||||
|
'removeBuddyAreYouSure': 'Bạn có chắc là xóa nick "<b>%1</b>" trong danh sách bạn ko?',
|
||||||
|
|
||||||
|
// Block Buddy Dialog
|
||||||
|
'blockBuddy': 'Khóa Nick',
|
||||||
|
'unblockBuddy': 'Mở khóa Nick',
|
||||||
|
'blockBuddyAreYouSure': 'Bạn có chắc là muốn khóa nick "<b>%1</b>"?',
|
||||||
|
'unblockBuddyAreYouSure': 'Bạn có chắc là muốn mở khóa nick "<b>%1</b>"?',
|
||||||
|
|
||||||
|
// Remove Group Dialog
|
||||||
|
'removeGroup': 'Xóa một nhóm',
|
||||||
|
'removeGroupAreYouSure': 'Bạn có chắc là muốn xóa nhóm "<b>%1</b>" (và tất cả nick trong đó) từ danh sách bạn?',
|
||||||
|
|
||||||
|
// Change Password Dialog
|
||||||
|
'changePassword': 'Thay đổi mật khẩu',
|
||||||
|
'changePasswordInstructions': 'Để thay đổi mật khẩu, bạn vui lòng gõ mật khẩu cũ và mật khẩu mới.',
|
||||||
|
'currentPassword': 'Mật khẩu cũ',
|
||||||
|
'newPassword': 'Mật khẩu mới',
|
||||||
|
'confirmPassword': 'Xác nhận lại',
|
||||||
|
'changeSuccess': "Mật khẩu thay đổi thành công!\nVui lòng đăng nhập lại.",
|
||||||
|
'currentPassInvalid': 'Bạn nhập sai Mật khẩu cũ.',
|
||||||
|
'changePasswordShort': 'Mật khẩu phải có chiều dài từ 6 đến 20 ký tự!',
|
||||||
|
'changeFailed': 'Có lỗi trong quá trình thay đổi mật khảu. Bạn vui lòng thử lại sau.',
|
||||||
|
'changeNoMatch': 'Mật khẩu không khớp!',
|
||||||
|
'change': 'Thay đổi',
|
||||||
|
|
||||||
|
// Reset Password
|
||||||
|
'reset': 'Phục hồi',
|
||||||
|
'forgotPassword': 'Quên mật khẩu',
|
||||||
|
'passwordReset': 'Phục hồi mật khẩu',
|
||||||
|
'emailAddress': 'địa chỉ Email',
|
||||||
|
'newPasswordEmailed': 'Mật khẩu mới của bạn đã được gửi tới email %1',
|
||||||
|
'noEmailOnRecord': 'Không thấy tên đăng nhập nào dăng ký bằng email này.',
|
||||||
|
'problemResetting': 'Có lỗi trong quá trình phục hồi mật khẩu.<br />Vui lòng thử lại sau.',
|
||||||
|
|
||||||
|
// Statuses
|
||||||
|
'available': 'Tôi có trên mạng',
|
||||||
|
'friendsOnly': 'Chỉ cho bạn thấy',
|
||||||
|
'busy': 'Tôi Đang bận',
|
||||||
|
'beBackLater': 'Sẽ quay lại sau',
|
||||||
|
'away': 'Tôi đã rời khỏi',
|
||||||
|
'custom': 'Customized message...',
|
||||||
|
'invisible': 'Tôi đang Ẩn nick',
|
||||||
|
|
||||||
|
// Miscellaneous
|
||||||
|
'autoreply': 'Tự động trả lời',
|
||||||
|
'signedOff': 'bạn đã thoát!',
|
||||||
|
'reconnect': 'Kết nối lại',
|
||||||
|
'onunload': 'nếu bạn thoát khỏi trang này, tất cả tin nhắn của bạn sẽ không được lưu trữ.',
|
||||||
|
'ok': 'Đồng Ý',
|
||||||
|
'cancel': 'Hủy Bỏ',
|
||||||
|
'username': 'Tên đăng nhập',
|
||||||
|
'password': 'Mật khẩu',
|
||||||
|
'email': 'Email',
|
||||||
|
'search': 'Tìm',
|
||||||
|
'searchAgain': 'Tìm lại',
|
||||||
|
|
||||||
|
// Admin - User Search
|
||||||
|
'admin-userSearch': 'Tìm nick',
|
||||||
|
'admin-chooseByAndSearch': 'Chọn kiểu tìm kiếm và sau đó nhập thông tin thích hợp. Có thể sử dụng ký tự đại diện (*).',
|
||||||
|
'admin-searchType': 'Kiểu tìm kiếm',
|
||||||
|
'admin-lastKnownIP': 'IP Cuối cùng',
|
||||||
|
'admin-lastActive': 'Lần online cuối',
|
||||||
|
'admin-status': 'Trạng thái',
|
||||||
|
'admin-kick': 'Kick',
|
||||||
|
'admin-ban': 'Ban',
|
||||||
|
'admin-unban': 'Unban',
|
||||||
|
'admin-makeAdmin': 'Trở thành Admin',
|
||||||
|
'admin-removeAdmin': 'không cho làm Admin',
|
||||||
|
'admin-banned': 'Banned',
|
||||||
|
'admin-admin': 'Admin'
|
||||||
|
});
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
#################################
|
||||||
|
# ajax im 3.4 #
|
||||||
|
# AJAX Instant Messenger #
|
||||||
|
# Copyright (c) 2006-2008 #
|
||||||
|
# http://www.ajaxim.com/ #
|
||||||
|
# Do not remove this notice #
|
||||||
|
#################################
|
||||||
|
|
||||||
|
# This is a sample php.ini file
|
||||||
|
# If you are having problems with file uploads
|
||||||
|
# try renaming this file to 'php.ini' and it might
|
||||||
|
# help, assuming your host did not disable php.ini files.
|
||||||
|
|
||||||
|
file_uploads = On
|
||||||
|
upload_max_filesize = 10M
|
||||||
|
post_max_size = 10M
|
||||||
@@ -0,0 +1,207 @@
|
|||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||||
|
<title></title>
|
||||||
|
<script src="js/prototype.js" type="text/javascript"></script>
|
||||||
|
<script src="js/utils.js" type="text/javascript"></script>
|
||||||
|
<script src="js/window.js" type="text/javascript"></script>
|
||||||
|
<script src="js/im.basic.js" type="text/javascript"></script>
|
||||||
|
<script src="js/popup.js" type="text/javascript"></script>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
///////////////////////////////////
|
||||||
|
// ajax im 3.4 //
|
||||||
|
// AJAX Instant Messenger //
|
||||||
|
// Copyright (c) 2006-2008 //
|
||||||
|
// http://www.ajaxim.com/ //
|
||||||
|
// Do not remove this notice //
|
||||||
|
///////////////////////////////////
|
||||||
|
|
||||||
|
document.title = self.opener.newWin;
|
||||||
|
|
||||||
|
var name;
|
||||||
|
var winName;
|
||||||
|
var defaultTitle = document.title;
|
||||||
|
var blinkerTimer;
|
||||||
|
var titlebarBlinker;
|
||||||
|
var IM;
|
||||||
|
var IMWindow;
|
||||||
|
|
||||||
|
function trim(text) {
|
||||||
|
if(text == null) return null;
|
||||||
|
return text.replace(/^[ \t]+|[ \t]+$/g, "");
|
||||||
|
}
|
||||||
|
|
||||||
|
function create() {
|
||||||
|
var ref = ['audioNotify', 'soundManager', 'pingTo', 'user', 'pass', 'smilies', 'buttonHover', 'buttonDown', 'buttonNormal', 'scrollToBottom', 'theme', 'Languages', 'Status', 'useLingo', 'lingoPunction', 'timestamp'];
|
||||||
|
|
||||||
|
for(var i=0; i<ref.length; i++) {
|
||||||
|
window[ref[i]] = window.opener[ref[i]];
|
||||||
|
}
|
||||||
|
|
||||||
|
name = self.opener.newWin;
|
||||||
|
winName = self.opener.IM.windows[self.opener.newWin].getId();
|
||||||
|
if(trim(name).length == 0)
|
||||||
|
self.close();
|
||||||
|
|
||||||
|
var loadCSS = document.createElement("link");
|
||||||
|
loadCSS.setAttribute("rel", "stylesheet")
|
||||||
|
loadCSS.setAttribute("type", "text/css")
|
||||||
|
loadCSS.setAttribute("href", 'themes/' + theme + '/style.css')
|
||||||
|
if (typeof loadCSS != "undefined")
|
||||||
|
document.getElementsByTagName("head")[0].appendChild(loadCSS);
|
||||||
|
|
||||||
|
var getEmoteHTML = new XHConn();
|
||||||
|
getEmoteHTML.connect('themes/' + theme +'/emoticons/emoticons.html', 'GET', '', function(xh) {
|
||||||
|
document.body.innerHTML += xh.responseText;
|
||||||
|
});
|
||||||
|
|
||||||
|
Object.extend(IM, {
|
||||||
|
windows: {},
|
||||||
|
create: function(name, imTitle) {
|
||||||
|
this.windows[name] = new IMWindow(winName, {className: "dialog", width: 320, height: 335});
|
||||||
|
|
||||||
|
this.windows[name].getId = function() { return winName; };
|
||||||
|
|
||||||
|
this.windows[name].setUsername(name);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
IM.create(name, name);
|
||||||
|
|
||||||
|
var win = document.createElement('div');
|
||||||
|
win.id = winName;
|
||||||
|
document.body.appendChild(win);
|
||||||
|
|
||||||
|
win.innerHTML += self.opener.IM.windows[name].getContent().innerHTML;
|
||||||
|
|
||||||
|
if ($(winName+'_userFuncs'))
|
||||||
|
$(winName+'_userFuncs').remove();
|
||||||
|
|
||||||
|
self.opener.newWin = '';
|
||||||
|
self.opener.newWinRcvd = '';
|
||||||
|
window.onresize = IM.handleResize;
|
||||||
|
IM.handleResize(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
function titlebarBlink(name, message, alter) {
|
||||||
|
if(titlebarBlinker == false) {
|
||||||
|
document.title = defaultTitle;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(alter == 0) {
|
||||||
|
document.title = name + '!';
|
||||||
|
blinkerTimer = setTimeout("titlebarBlink('"+name+"', '"+message+"', 1)", 1000);
|
||||||
|
} else if(alter == 1) {
|
||||||
|
document.title = '"' + message.substring(0, 10) + (message.length > 10 ? '...' : '') + '"';
|
||||||
|
blinkerTimer = setTimeout("titlebarBlink('"+name+"', '"+message+"', 2)", 1000);
|
||||||
|
} else if(alter == 2) {
|
||||||
|
document.title = defaultTitle;
|
||||||
|
blinkerTimer = setTimeout("titlebarBlink('"+name+"', '"+message+"', 0)", 1000);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function blinkerOn(onoff) {
|
||||||
|
if(onoff == true)
|
||||||
|
titlebarBlinker = true;
|
||||||
|
else
|
||||||
|
titlebarBlinker = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
function browserWidth() {
|
||||||
|
if (self.innerWidth) {
|
||||||
|
return self.innerWidth;
|
||||||
|
} else if (document.documentElement && document.documentElement.clientWidth) {
|
||||||
|
return document.documentElement.clientWidth;
|
||||||
|
} else if (document.body) {
|
||||||
|
return document.body.clientWidth;
|
||||||
|
}
|
||||||
|
return 630;
|
||||||
|
}
|
||||||
|
|
||||||
|
function browserHeight() {
|
||||||
|
if (self.innerWidth) {
|
||||||
|
return self.innerHeight;
|
||||||
|
} else if (document.documentElement && document.documentElement.clientWidth) {
|
||||||
|
return document.documentElement.clientHeight;
|
||||||
|
} else if (document.body) {
|
||||||
|
return document.body.clientHeight;
|
||||||
|
}
|
||||||
|
return 470;
|
||||||
|
}
|
||||||
|
|
||||||
|
window.onunload = function() {
|
||||||
|
self.opener.IM.windows[name].detached = false;
|
||||||
|
self.opener.$(self.opener.IM.windows[name].getId() + '_rcvd').innerHTML = $(IM.windows[name].getId() + '_rcvd').innerHTML;
|
||||||
|
self.opener.IM.windows[name].show();
|
||||||
|
}
|
||||||
|
|
||||||
|
window.onload = function() {
|
||||||
|
create();
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style type="text/css">
|
||||||
|
body {
|
||||||
|
overflow:hidden;
|
||||||
|
color: #000;
|
||||||
|
font-family: Tahoma, Arial, sans-serif;
|
||||||
|
font-size: 10px;
|
||||||
|
background-color:#ebe6e1;
|
||||||
|
background-image: none;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body class="dialog_content">
|
||||||
|
<div class="itemList" id="fontsList">
|
||||||
|
<a href="#" onclick="IM.active.setFont('Tahoma');return false;">Tahoma</a>
|
||||||
|
<a href="#" onclick="IM.active.setFont('Verdana');return false;">Verdana</a>
|
||||||
|
<a href="#" onclick="IM.active.setFont('Georgia');return false;">Georgia</a>
|
||||||
|
<a href="#" onclick="IM.active.setFont('Garamond');return false;">Garamond</a>
|
||||||
|
<a href="#" onclick="IM.active.setFont('Arial');return false;">Arial</a>
|
||||||
|
<a href="#" onclick="IM.active.setFont('Times New Roman');return false;">Times New Roman</a>
|
||||||
|
<a href="#" onclick="IM.active.setFont('Courier New');return false;">Courier News</a>
|
||||||
|
</div>
|
||||||
|
<div class="itemList" id="fontSizeList">
|
||||||
|
<a href="#" onclick="IM.active.setFontSize(8);return false;">8</a>
|
||||||
|
<a href="#" onclick="IM.active.setFontSize(10);return false;">10</a>
|
||||||
|
<a href="#" onclick="IM.active.setFontSize(12);return false;">12</a>
|
||||||
|
<a href="#" onclick="IM.active.setFontSize(14);return false;">14</a>
|
||||||
|
<a href="#" onclick="IM.active.setFontSize(16);return false;">16</a>
|
||||||
|
<a href="#" onclick="IM.active.setFontSize(18);return false;">18</a>
|
||||||
|
<a href="#" onclick="IM.active.setFontSize(20);return false;">20</a>
|
||||||
|
<a href="#" onclick="IM.active.setFontSize(22);return false;">22</a>
|
||||||
|
<a href="#" onclick="IM.active.setFontSize(24);return false;">24</a>
|
||||||
|
</div>
|
||||||
|
<div class="itemList" id="fontColorList">
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td class="colorItem" style="width:13px;height:13px;border:1px solid #000;background-color:#000000;" onclick="IM.active.setFontColor('#000000');"></td>
|
||||||
|
<td class="colorItem" style="width:13px;height:13px;border:1px solid #000;background-color:#b8b8b8;" onclick="IM.active.setFontColor('#b8b8b8');"></td>
|
||||||
|
<td class="colorItem" style="width:13px;height:13px;border:1px solid #000;background-color:#b4ad3b;" onclick="IM.active.setFontColor('#b4ad3b');"></td>
|
||||||
|
<td class="colorItem" style="width:13px;height:13px;border:1px solid #000;background-color:#bb5c54;" onclick="IM.active.setFontColor('#bb5c54');"></td>
|
||||||
|
<td class="colorItem" style="width:13px;height:13px;border:1px solid #000;background-color:#755a5c;" onclick="IM.active.setFontColor('#755a5c');"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="colorItem" style="width:13px;height:13px;border:1px solid #000;background-color:#a9b5ef;" onclick="IM.active.setFontColor('#a9b5ef');"></td>
|
||||||
|
<td class="colorItem" style="width:13px;height:13px;border:1px solid #000;background-color:#d65a20;" onclick="IM.active.setFontColor('#d65a20');"></td>
|
||||||
|
<td class="colorItem" style="width:13px;height:13px;border:1px solid #000;background-color:#e39230;" onclick="IM.active.setFontColor('#e39230');"></td>
|
||||||
|
<td class="colorItem" style="width:13px;height:13px;border:1px solid #000;background-color:#a71334;" onclick="IM.active.setFontColor('#a71334');"></td>
|
||||||
|
<td class="colorItem" style="width:13px;height:13px;border:1px solid #000;background-color:#a68978;" onclick="IM.active.setFontColor('#a68978');"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="colorItem" style="width:13px;height:13px;border:1px solid #000;background-color:#600c1f;" onclick="IM.active.setFontColor('#600c1f');"></td>
|
||||||
|
<td class="colorItem" style="width:13px;height:13px;border:1px solid #000;background-color:#491130;" onclick="IM.active.setFontColor('#491130');"></td>
|
||||||
|
<td class="colorItem" style="width:13px;height:13px;border:1px solid #000;background-color:#676f11;" onclick="IM.active.setFontColor('#676f11');"></td>
|
||||||
|
<td class="colorItem" style="width:13px;height:13px;border:1px solid #000;background-color:#769321;" onclick="IM.active.setFontColor('#769321');"></td>
|
||||||
|
<td class="colorItem" style="width:13px;height:13px;border:1px solid #000;background-color:#3966fe;" onclick="IM.active.setFontColor('#3966fe');"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,85 @@
|
|||||||
|
<?php
|
||||||
|
///////////////////////////////////
|
||||||
|
// ajax im 3.41 //
|
||||||
|
// AJAX Instant Messenger //
|
||||||
|
// Copyright (c) 2006-2008 //
|
||||||
|
// http://www.ajaxim.com/ //
|
||||||
|
// Do not remove this notice //
|
||||||
|
///////////////////////////////////
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Stupid tab-space fix
|
||||||
|
*
|
||||||
|
* @author Benjamin Hutchins
|
||||||
|
* @return $str with spaces appended to make the length of $len
|
||||||
|
*/
|
||||||
|
function space_fix ($str, $len) {
|
||||||
|
for ($i = strlen($str); $i<$len; $i++) {
|
||||||
|
$str .= " ";
|
||||||
|
}
|
||||||
|
return $str;
|
||||||
|
}
|
||||||
|
|
||||||
|
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||||
|
<title>ajax im - test upload max size</title>
|
||||||
|
<style type="text/css" media="screen">body{background:#101010}a{color:#fff}h1{font:160px Arial,Verdana,Tahoma,sans-serif;color:#fff;margin:0 auto 40px;padding:0;text-align:center;width:80%}h2{font:28px tahoma,verdana,arial,sans-serif;font-weight:bold;color:#84e03a;margin:0;padding:0 0 10px 0}div{border:2px solid #1d1d1d;padding:10px;font:12px Verdana,Tahoma,Arial,sans-serif;width:400px;margin:10px auto;color:#fff}pre,code{display:block;margin:5px;padding:0px;line-height:normal;color:#84e03a;width:100%;}</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<h1>ajax im</h1>
|
||||||
|
<div>
|
||||||
|
<h2>uploads not working?</h2>
|
||||||
|
<p>If your uploads aren't working, try looking at the below reasons?</p>
|
||||||
|
<?php
|
||||||
|
require('config.php');
|
||||||
|
if (!isset($maxBuddyIconSize)) {
|
||||||
|
print "You have an outdated config.php, please rename config-sample.php to config.php and modify the database information.";
|
||||||
|
} else if ($maxBuddyIconSize == 0) {
|
||||||
|
print "Currently <b>\$maxBuddyIconSize</b> is set to 0 (zero), please set it to a higher value.";
|
||||||
|
} else if (trim(substr(sprintf('%o', fileperms('buddyicons/')), -4)) != 777) {
|
||||||
|
print "The directory <b>buddyicons/</b> is not writeable, please CHMOD it to 0777.";
|
||||||
|
} else if (ini_get('file_uploads') == 0) {
|
||||||
|
if (file_exists('php.ini')) {
|
||||||
|
print "File uploads are not supported on your server.";
|
||||||
|
} else {
|
||||||
|
@ini_set('file_uploads', 'On');
|
||||||
|
if (ini_get('file_uploads') == 0) {
|
||||||
|
print "PHP cannot use <b>ini_set</b> to allow file uploads. Try creating a file called <b>php.ini</b> in the parent directory with the following contents:<br/><br/><pre><code>file_uploads = On\nupload_max_filesize = {$maxBuddyIconSize}M\npost_max_size = {$maxBuddyIconSize}M</code></pre>";
|
||||||
|
} else {
|
||||||
|
$continue = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$continue = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($continue)) {
|
||||||
|
$upload_max_filesize = substr(ini_get('upload_max_filesize'), 0, -1);
|
||||||
|
$post_max_size = substr(ini_get('post_max_size'), 0, -1);
|
||||||
|
|
||||||
|
if ($upload_max_filesize == 0 || $post_max_size == 0) {
|
||||||
|
print "Your max upload size is 0 (zero), please increase it.";
|
||||||
|
} else {
|
||||||
|
if ($upload_max_filesize >= ini_get('post_max_size')) {
|
||||||
|
$max = 'upload_max_filesize';
|
||||||
|
} else {
|
||||||
|
$max = 'post_max_size';
|
||||||
|
}
|
||||||
|
|
||||||
|
print "Things look good on your server, your max upload size is: <pre><code>" . ini_get('post_max_size') . "</code></pre><br/>If this value to too low, say, below 2MBs, then most images will be to large to be uploaded. Please keep that in mind.";
|
||||||
|
print "<br/><br/>Other misc. information:<pre><code>+-------------------------------+---------------------|
|
||||||
|
| PHP Configuration Variable | Suggested value |
|
||||||
|
+-------------------------------+---------------------|
|
||||||
|
| max_execution_time = " . space_fix(ini_get('max_execution_time'), 8) . " | >= 30 |
|
||||||
|
| max_input_time = " . space_fix(ini_get('max_input_time'), 12) . " | ~ 60 |
|
||||||
|
+-------------------------------+---------------------|
|
||||||
|
</code></pre>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
Depois Largura: | Altura: | Tamanho: 60 B |
|
Depois Largura: | Altura: | Tamanho: 50 B |
|
Depois Largura: | Altura: | Tamanho: 61 B |
|
Depois Largura: | Altura: | Tamanho: 699 B |
|
Depois Largura: | Altura: | Tamanho: 765 B |
|
Depois Largura: | Altura: | Tamanho: 472 B |
|
Depois Largura: | Altura: | Tamanho: 64 B |
|
Depois Largura: | Altura: | Tamanho: 64 B |
|
Depois Largura: | Altura: | Tamanho: 171 B |
|
Depois Largura: | Altura: | Tamanho: 168 B |
|
Depois Largura: | Altura: | Tamanho: 97 B |
|
Depois Largura: | Altura: | Tamanho: 146 B |
|
Depois Largura: | Altura: | Tamanho: 928 B |
|
Depois Largura: | Altura: | Tamanho: 319 B |
|
Depois Largura: | Altura: | Tamanho: 383 B |
|
Depois Largura: | Altura: | Tamanho: 426 B |
|
Depois Largura: | Altura: | Tamanho: 373 B |
|
Depois Largura: | Altura: | Tamanho: 522 B |
|
Depois Largura: | Altura: | Tamanho: 345 B |
|
Depois Largura: | Altura: | Tamanho: 397 B |
|
Depois Largura: | Altura: | Tamanho: 264 B |
@@ -0,0 +1,3 @@
|
|||||||
|
These emoticons were created by and are Copyrighted (c) MazeNL77
|
||||||
|
|
||||||
|
http://mazenl77.deviantart.com/
|
||||||
|
Depois Largura: | Altura: | Tamanho: 370 B |
|
Depois Largura: | Altura: | Tamanho: 362 B |
|
Depois Largura: | Altura: | Tamanho: 458 B |
|
Depois Largura: | Altura: | Tamanho: 400 B |
@@ -0,0 +1,21 @@
|
|||||||
|
<div class="itemList" id="emoticonList">
|
||||||
|
<table class="tTable">
|
||||||
|
<tr>
|
||||||
|
<td><a href="#" onmousedown="return false;"><img class="emotIcon" src="themes/dark/emoticons/smile.png" width="19" height="19" style="border:0;" onclick="IM.active.insertText(':)');return false;" /></a></td>
|
||||||
|
<td><a href="#" onmousedown="return false;"><img class="emotIcon" src="themes/dark/emoticons/grin.png" width="19" height="19" style="border:0;" onclick="IM.active.insertText(':D');return false;" /></a></td>
|
||||||
|
<td><a href="#" onmousedown="return false;"><img class="emotIcon" src="themes/dark/emoticons/wink.png" width="19" height="19" style="border:0;" onclick="IM.active.insertText(';)');return false;" /></a></td>
|
||||||
|
<td><a href="#" onmousedown="return false;"><img class="emotIcon" src="themes/dark/emoticons/embarassed.png" width="19" height="19" style="border:0;" onclick="IM.active.insertText(':[');return false;" /></a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a href="#" onmousedown="return false;"><img class="emotIcon" src="themes/dark/emoticons/sad.png" width="19" height="19" style="border:0;" onclick="IM.active.insertText(':(');return false;" /></a></td>
|
||||||
|
<td><a href="#" onmousedown="return false;"><img class="emotIcon" src="themes/dark/emoticons/cry.png" width="19" height="19" style="border:0;" onclick="IM.active.insertText(':\'(');return false;" /></a></td>
|
||||||
|
<td><a href="#" onmousedown="return false;"><img class="emotIcon" src="themes/dark/emoticons/cool.png" width="19" height="19" style="border:0;" onclick="IM.active.insertText('8-)');return false;" /></a></td>
|
||||||
|
<td><a href="#" onmousedown="return false;"><img class="emotIcon" src="themes/dark/emoticons/angry.png" width="19" height="19" style="border:0;" onclick="IM.active.insertText(':angry:');return false;" /></a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a href="#" onmousedown="return false;"><img class="emotIcon" src="themes/dark/emoticons/serious.png" width="19" height="19" style="border:0;" onclick="IM.active.insertText(':|');return false;" /></a></td>
|
||||||
|
<td><a href="#" onmousedown="return false;"><img class="emotIcon" src="themes/dark/emoticons/tongue.png" width="19" height="19" style="border:0;" onclick="IM.active.insertText(':P');return false;" /></a></td>
|
||||||
|
<td><a href="#" onmousedown="return false;"><img class="emotIcon" src="themes/dark/emoticons/heart.png" width="19" height="19" style="border:0;" onclick="IM.active.insertText(':heart:');return false;" /></a></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{":)": "smile.png", ":-)": "smile.png", ":D": "grin.png", ":-D": "grin.png", ";)": "wink.png", ";-)": "wink.png", ":[": "embarassed.png", ":-[": "embarassed.png", ":(": "sad.png", ":-(": "sad.png", ":'(": "cry.png", ":'-(": "cry.png", "8-)": "cool.png", ":angry:": "angry.png", ":|": "serious.png", ":-|": "serious.png", ":P": "tongue.png", ":-P": "tongue.png", ":heart:": "heart.png"}
|
||||||
|
Depois Largura: | Altura: | Tamanho: 383 B |
|
Depois Largura: | Altura: | Tamanho: 316 B |
|
Depois Largura: | Altura: | Tamanho: 882 B |
|
Depois Largura: | Altura: | Tamanho: 370 B |
|
Depois Largura: | Altura: | Tamanho: 339 B |
|
Depois Largura: | Altura: | Tamanho: 409 B |
|
Depois Largura: | Altura: | Tamanho: 363 B |
|
Depois Largura: | Altura: | Tamanho: 415 B |
|
Depois Largura: | Altura: | Tamanho: 367 B |
|
Depois Largura: | Altura: | Tamanho: 4.0 KiB |
|
Depois Largura: | Altura: | Tamanho: 679 B |
|
Depois Largura: | Altura: | Tamanho: 1.4 KiB |
|
Depois Largura: | Altura: | Tamanho: 146 B |