├── wordpress-chat.php ├── audio ├── ping.mp3 └── ping.wav ├── images ├── mask.png ├── wheel.png ├── marker.png ├── 16-square-green-add.png └── 16-square-blue-remove.png ├── screenshot-1.jpg ├── screenshot-2.jpg ├── swf ├── soundmanager2.swf ├── soundmanager2_debug.swf ├── soundmanager2_flash9.swf └── soundmanager2_flash9_debug.swf ├── tinymce ├── images │ ├── chat.png │ ├── mask.png │ ├── wheel.png │ └── marker.png ├── langs │ ├── langs.php │ └── en_dlg.js ├── js │ └── colorpicker.js ├── css │ └── colorpicker.css ├── editor_plugin.js └── options.html ├── js ├── chat-admin.js ├── jquery-cookie.js ├── base64-min.js ├── farbtastic.js ├── jquery.blockUI.js ├── chat.js └── soundmanager2-nodebug-jsmin.js ├── readme.txt ├── css ├── style.css └── wp_admin.css └── languages └── chat.pot /wordpress-chat.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /audio/ping.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmudev/chat/master/audio/ping.mp3 -------------------------------------------------------------------------------- /audio/ping.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmudev/chat/master/audio/ping.wav -------------------------------------------------------------------------------- /images/mask.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmudev/chat/master/images/mask.png -------------------------------------------------------------------------------- /images/wheel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmudev/chat/master/images/wheel.png -------------------------------------------------------------------------------- /screenshot-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmudev/chat/master/screenshot-1.jpg -------------------------------------------------------------------------------- /screenshot-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmudev/chat/master/screenshot-2.jpg -------------------------------------------------------------------------------- /images/marker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmudev/chat/master/images/marker.png -------------------------------------------------------------------------------- /swf/soundmanager2.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmudev/chat/master/swf/soundmanager2.swf -------------------------------------------------------------------------------- /tinymce/images/chat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmudev/chat/master/tinymce/images/chat.png -------------------------------------------------------------------------------- /tinymce/images/mask.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmudev/chat/master/tinymce/images/mask.png -------------------------------------------------------------------------------- /tinymce/images/wheel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmudev/chat/master/tinymce/images/wheel.png -------------------------------------------------------------------------------- /tinymce/images/marker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmudev/chat/master/tinymce/images/marker.png -------------------------------------------------------------------------------- /swf/soundmanager2_debug.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmudev/chat/master/swf/soundmanager2_debug.swf -------------------------------------------------------------------------------- /swf/soundmanager2_flash9.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmudev/chat/master/swf/soundmanager2_flash9.swf -------------------------------------------------------------------------------- /images/16-square-green-add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmudev/chat/master/images/16-square-green-add.png -------------------------------------------------------------------------------- /images/16-square-blue-remove.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmudev/chat/master/images/16-square-blue-remove.png -------------------------------------------------------------------------------- /swf/soundmanager2_flash9_debug.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmudev/chat/master/swf/soundmanager2_flash9_debug.swf -------------------------------------------------------------------------------- /tinymce/langs/langs.php: -------------------------------------------------------------------------------- 1 | 5 | * @since 1.0.1 6 | */ 7 | 8 | (function ($) { 9 | $(document).ready(function () { 10 | $('#chat_tab_pane').tabs({cookie: { name: 'chat_tab_pane', expires: 30 } }); 11 | 12 | $('#chat_background_color_panel').farbtastic('#chat_background_color').hide(); 13 | $('#chat_date_color_panel').farbtastic('#chat_date_color').hide(); 14 | $('#chat_name_color_panel').farbtastic('#chat_name_color').hide(); 15 | $('#chat_moderator_name_color_panel').farbtastic('#chat_moderator_name_color').hide(); 16 | $('#chat_text_color_panel').farbtastic('#chat_text_color').hide(); 17 | 18 | $('#chat_border_color_1_panel').farbtastic('#chat_border_color_1').hide(); 19 | $('#chat_background_color_1_panel').farbtastic('#chat_background_color_1').hide(); 20 | $('#chat_date_color_1_panel').farbtastic('#chat_date_color_1').hide(); 21 | $('#chat_name_color_1_panel').farbtastic('#chat_name_color_1').hide(); 22 | $('#chat_moderator_name_color_1_panel').farbtastic('#chat_moderator_name_color_1').hide(); 23 | $('#chat_text_color_1_panel').farbtastic('#chat_text_color_1').hide(); 24 | 25 | $("input.color").focus(function() { 26 | $("#"+$(this).attr('id')+"_panel").slideDown(); 27 | }); 28 | 29 | $("input.color").blur(function() { 30 | $("#"+$(this).attr('id')+"_panel").slideUp(); 31 | }); 32 | }); 33 | })(jQuery); 34 | -------------------------------------------------------------------------------- /tinymce/editor_plugin.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | // Load plugin specific language pack 3 | tinymce.PluginManager.requireLangPack('chat'); 4 | 5 | tinymce.create('tinymce.plugins.ChatPlugin', { 6 | /** 7 | * Initializes the plugin, this will be executed after the plugin has been created. 8 | * This call is done before the editor instance has finished it's initialization so use the onInit event 9 | * of the editor instance to intercept that event. 10 | * 11 | * @param {tinymce.Editor} ed Editor instance that the plugin is initialized in. 12 | * @param {string} url Absolute URL to where the plugin is located. 13 | */ 14 | init : function(ed, url) { 15 | // Register the command so that it can be invoked by using tinyMCE.activeEditor.execCommand('mceChat'); 16 | ed.addCommand('mceChat', function() { 17 | ed.windowManager.open({ 18 | file : url + "../../../../../wp-admin/admin-ajax.php?action=chatTinymceOptions", 19 | width : 450 + ed.getLang('chat.delta_width', 0), 20 | height : 380 + ed.getLang('chat.delta_height', 0), 21 | inline : 1 22 | }, { 23 | plugin_url : url // Plugin absolute URL 24 | }); 25 | }); 26 | 27 | // Register chat button 28 | ed.addButton('chat', { 29 | title : 'Insert chat', 30 | cmd : 'mceChat', 31 | image : url + '/images/chat.png' 32 | }); 33 | 34 | // Add a node change handler, selects the button in the UI when a image is selected 35 | ed.onNodeChange.add(function(ed, cm, n) { 36 | cm.setActive('chat', n.nodeName == 'IMG'); 37 | }); 38 | }, 39 | 40 | /** 41 | * Creates control instances based in the incomming name. This method is normally not 42 | * needed since the addButton method of the tinymce.Editor class is a more easy way of adding buttons 43 | * but you sometimes need to create more complex controls like listboxes, split buttons etc then this 44 | * method can be used to create those. 45 | * 46 | * @param {String} n Name of the control to create. 47 | * @param {tinymce.ControlManager} cm Control manager to use inorder to create new control. 48 | * @return {tinymce.ui.Control} New control instance or null if no control was created. 49 | */ 50 | createControl : function(n, cm) { 51 | return null; 52 | }, 53 | 54 | /** 55 | * Returns information about the plugin as a name/value array. 56 | * The current keys are longname, author, authorurl, infourl and version. 57 | * 58 | * @return {Object} Name/value array containing information about the plugin. 59 | */ 60 | getInfo : function() { 61 | return { 62 | longname : 'Chat plugin', 63 | author : 'S H Mohanjith', 64 | authorurl : 'http://mohanjith.com', 65 | infourl : 'http://mohanjith.com/wordpress/chat', 66 | version : "1.0.1" 67 | }; 68 | } 69 | }); 70 | 71 | // Register plugin 72 | tinymce.PluginManager.add('chat', tinymce.plugins.ChatPlugin); 73 | })(); 74 | -------------------------------------------------------------------------------- /readme.txt: -------------------------------------------------------------------------------- 1 | === Chat === 2 | Contributors: WPMUDEV 3 | Author: WPMUDEV, WPMUDEV-Support1, WPMUDEV-Support2, WPMUDEV-Support4, WPMUDEV-Support6 4 | Tags: Chat Tool, Chat Widget, Customer Support, Free Live Chat, Group Chat, Live Chat, Online Live Chat, Online Support, Plugin Chat, Private Message, Web Chat, BuddyPress chat 5 | Requires at least: 3.5 6 | Tested up to: 4.3 7 | Stable tag: 1.1 8 | 9 | Add chat to your blog. Chat with your readers and let them chat with each other. 10 | 11 | == Description == 12 | 13 | Start communicating! Bring live, two-way chat to your site. 14 | Host your own live chat sessions, interact with your visitors and boost your 15 | sales without needing any third party javascript or other code - works great 16 | with BuddyPress and Multisite too. 17 | 18 | [youtube https://www.youtube.com/watch?v=jbfXpzFmzKk] 19 | 20 | = You can use Chat lite to... = 21 | * Add a site-wide chat window in the bottom corner of your site 22 | * Add chat to any blog post or page 23 | * Answer support questions 24 | * Promote web services or products 25 | * Increase the ability for members of your social network to connect 26 | 27 | = Get Started Quickly = 28 | Separate chat windows are added to any post or page in WordPress through a new button added to the built-in editor. 29 | 30 | = Integrate With Your Theme = 31 | The Chat Lite Plugin gives you full control over the colors and sizes of your chats. Get exactly the look and feel you want! 32 | 33 | = Chat Pro = 34 | Chat lite is a fully functional but limited version of our full Chat plugin. 35 | 36 | Our full version includes many more features: 37 | 38 | * **Allow any Twitter user to join the chat** 39 | * **Allow any Facebook user to join the chat** 40 | * **Allow any Google+ user to join the chat** 41 | * **BuddyPress Group Chat and Friend integration** 42 | * **Private chats between WP users** 43 | * **Select which roles are moderators** 44 | * **Easily change chat colors** 45 | * **Disable avatars** 46 | * **Change chat update interval** 47 | * **Archive every chat** - You'll always have a record with timestamps on hand to refer back to when needed. 48 | * **Chat polling** - Change the frequency to check for new messages, handy for shared hosting environments. 49 | 50 | **Upgrade to the full version now »** 51 | 52 | == Screenshots == 53 | 54 | 1. In post chat 55 | 2. Chat widget 56 | 57 | == Upgrade Notice == 58 | Up the version to work with update plugin. 59 | 60 | == ChangeLog == 61 | = 1.1 = 62 | * Fixed: Fatal error for Customizer 63 | * Fixed: Show default avatar for public authentication without email and name 64 | 65 | = 1.0.8.5 = 66 | * Security: Escape $_POST variables 67 | * Fixed: Decode Umlaut in user name 68 | 69 | == ChangeLog == 70 | = 1.0.8.4 = 71 | * Fixed emoticons not appearing 72 | 73 | = 1.0.8.3 = 74 | * Fixed emoticons settings 75 | 76 | = 1.0.8.2 = 77 | * Fixed http links being broken in chat 78 | 79 | = 1.0.8.1 = 80 | * Update for XSS vulnerability 81 | * Fixed issue with chat not scrolling on new message 82 | * Tested for WordPress 3.6 83 | 84 | = 1.0.8 = 85 | * Update for WordPress 3.5.2 86 | 87 | = 1.0.7 = 88 | * Adding update code 89 | 90 | = 1.0.6 = 91 | * Allow multiple links to be in the chat message 92 | 93 | = 1.0.5 = 94 | * Removing update notification 95 | 96 | = 1.0.4 = 97 | * New WPIDs 98 | 99 | = 1.0.3 = 100 | * Up the version to work with update plugin 101 | 102 | = 1.0.0 = 103 | 104 | * Initial release 105 | -------------------------------------------------------------------------------- /js/jquery-cookie.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Cookie plugin 3 | * 4 | * Copyright (c) 2006 Klaus Hartl (stilbuero.de) 5 | * Dual licensed under the MIT and GPL licenses: 6 | * http://www.opensource.org/licenses/mit-license.php 7 | * http://www.gnu.org/licenses/gpl.html 8 | * 9 | */ 10 | 11 | /** 12 | * Create a cookie with the given name and value and other optional parameters. 13 | * 14 | * @example $.cookie('the_cookie', 'the_value'); 15 | * @desc Set the value of a cookie. 16 | * @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true }); 17 | * @desc Create a cookie with all available options. 18 | * @example $.cookie('the_cookie', 'the_value'); 19 | * @desc Create a session cookie. 20 | * @example $.cookie('the_cookie', null); 21 | * @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain 22 | * used when the cookie was set. 23 | * 24 | * @param String name The name of the cookie. 25 | * @param String value The value of the cookie. 26 | * @param Object options An object literal containing key/value pairs to provide optional cookie attributes. 27 | * @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object. 28 | * If a negative value is specified (e.g. a date in the past), the cookie will be deleted. 29 | * If set to null or omitted, the cookie will be a session cookie and will not be retained 30 | * when the the browser exits. 31 | * @option String path The value of the path atribute of the cookie (default: path of page that created the cookie). 32 | * @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie). 33 | * @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will 34 | * require a secure protocol (like HTTPS). 35 | * @type undefined 36 | * 37 | * @name $.cookie 38 | * @cat Plugins/Cookie 39 | * @author Klaus Hartl/klaus.hartl@stilbuero.de 40 | */ 41 | 42 | /** 43 | * Get the value of a cookie with the given name. 44 | * 45 | * @example $.cookie('the_cookie'); 46 | * @desc Get the value of a cookie. 47 | * 48 | * @param String name The name of the cookie. 49 | * @return The value of the cookie. 50 | * @type String 51 | * 52 | * @name $.cookie 53 | * @cat Plugins/Cookie 54 | * @author Klaus Hartl/klaus.hartl@stilbuero.de 55 | */ 56 | (function ($) { 57 | jQuery.cookie = function(name, value, options) { 58 | if (typeof value != 'undefined') { // name and value given, set cookie 59 | options = options || {}; 60 | if (value === null) { 61 | value = ''; 62 | options = $.extend({}, options); // clone object since it's unexpected behavior if the expired property were changed 63 | options.expires = -1; 64 | } 65 | var expires = ''; 66 | if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) { 67 | var date; 68 | if (typeof options.expires == 'number') { 69 | date = new Date(); 70 | date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000)); 71 | } else { 72 | date = options.expires; 73 | } 74 | expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE 75 | } 76 | // NOTE Needed to parenthesize options.path and options.domain 77 | // in the following expressions, otherwise they evaluate to undefined 78 | // in the packed version for some reason... 79 | var path = options.path ? '; path=' + (options.path) : ''; 80 | var domain = options.domain ? '; domain=' + (options.domain) : ''; 81 | var secure = options.secure ? '; secure' : ''; 82 | document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join(''); 83 | } else { // only name given, get cookie 84 | var cookieValue = null; 85 | if (document.cookie && document.cookie != '') { 86 | var cookies = document.cookie.split(';'); 87 | for (var i = 0; i < cookies.length; i++) { 88 | var cookie = jQuery.trim(cookies[i]); 89 | // Does this cookie string begin with the name we want? 90 | if (cookie.substring(0, name.length + 1) == (name + '=')) { 91 | cookieValue = decodeURIComponent(cookie.substring(name.length + 1)); 92 | break; 93 | } 94 | } 95 | } 96 | return cookieValue; 97 | } 98 | }; 99 | })(jQuery); 100 | -------------------------------------------------------------------------------- /css/style.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Chat WordPress, WordPress Multisite, BuddyPress plugin 3 | * 4 | * Front end styles 5 | */ 6 | 7 | div.chat-box { 8 | overflow: auto !important; 9 | text-align: left !important; 10 | padding-top: 5px; 11 | padding-bottom: 5px; 12 | } 13 | div.chat-box p { 14 | margin-bottom: 5px !important; 15 | } 16 | div.chat-box embed { 17 | width: 0 !important; 18 | height: 0 !important; 19 | } 20 | .chat-wrap { 21 | margin: 0 0 15px 0 !important; 22 | } 23 | .chat-area { 24 | height: 300px !important; 25 | overflow: auto !important; 26 | border: 1px solid #666 !important; 27 | padding: 5px !important; 28 | padding-top: 0px !important; 29 | border: 1px solid #CCC !important; 30 | -moz-border-radius: 5px !important; 31 | -webkit-border-radius: 5px !important; 32 | margin: 0 auto !important; 33 | margin-left: 5px !important; 34 | margin-right: 5px !important; 35 | background: #F9F9F9 !important; 36 | } 37 | .chat-area span { 38 | padding: 4px !important; 39 | -moz-border-radius: 5px !important; 40 | -webkit-border-radius: 5px !important; 41 | margin: 0 5px 0 0 !important; 42 | } 43 | .chat-area p { 44 | padding: 0 !important; 45 | margin-bottom: 2px !important; 46 | display: block; 47 | } 48 | .chat-log-area span { 49 | padding: 4px !important; 50 | -moz-border-radius: 5px !important; 51 | -webkit-border-radius: 5px !important; 52 | margin: 0 5px 0 0 !important; 53 | } 54 | .chat-log-area p { 55 | padding: 5px 0 !important; 56 | border-bottom: 1px solid #ccc !important; 57 | } 58 | .send-message-area { 59 | width: 100% !important; 60 | } 61 | .chat-send { 62 | border: 1px solid #CCC !important; 63 | -moz-border-radius: 5px !important; 64 | -webkit-border-radius: 5px !important; 65 | -moz-box-shadow:1px 1px 1px rgba(0, 0, 0, 0.1) inset !important; 66 | -webkit-box-shadow:1px 1px 1px rgba(0, 0, 0, 0.1) inset !important; 67 | padding: 5px !important; 68 | font: 12px "Lucida Grande", Sans-Serif !important; 69 | color:#000000 !important; 70 | } 71 | .chat-send-wrap { 72 | margin: 0 auto !important; 73 | margin-left: 5px !important; 74 | margin-right: 5px !important; 75 | text-align: center; 76 | } 77 | .chat-auth-button { 78 | margin-right: 5px !important; 79 | } 80 | div.chat-wrap.avatar-disabled img.avatar { 81 | display: none !important; 82 | } 83 | div.chat-wrap.avatar-enabled img.avatar, 84 | div.chat-wrap span.date, 85 | div.chat-wrap span.time, 86 | div.chat-wrap span.name { 87 | vertical-align: top !important; 88 | color: white !important; 89 | float: left !important; 90 | margin-right: 4px !important; 91 | margin-bottom: 0px !important; 92 | line-height: 1em !important; 93 | } 94 | div.chat-wrap.avatar-enabled img.avatar { 95 | -moz-box-shadow:1px 1px 1px rgba(0, 0, 0, 0.1) !important; 96 | -webkit-box-shadow:1px 1px 1px rgba(0, 0, 0, 0.1) !important; 97 | border: none !important; 98 | } 99 | div.chat-wrap span.name { 100 | margin-right: 0px; 101 | } 102 | div.chat-wrap span.message { 103 | line-height: 1.7em !important; 104 | display:block; 105 | vertical-align: middle !important; 106 | margin-top: 0 !important; 107 | padding-top: 0 !important; 108 | min-height: 20px !important; 109 | } 110 | div.chat-emoticons-list img { 111 | cursor: pointer !important; 112 | } 113 | div.chat-log-actions input { 114 | margin: 0 !important; 115 | } 116 | div.chat-emoticons-list { 117 | line-height: 20px !important; 118 | } 119 | div.chat-tool-bar { 120 | vertical-align: middle !important; 121 | } 122 | div.chat-clear { 123 | clear: both !important; 124 | } 125 | div.chat-note { 126 | margin: 2px 5px; 127 | } 128 | #chat-block-site { 129 | padding: 2px 3px 0 3px !important; 130 | position: fixed !important; 131 | right: 0 !important; 132 | bottom: 0 !important; 133 | overflow: auto !important; 134 | -moz-border-radius-topright: 5px !important; 135 | -moz-border-radius-topleft: 5px !important; 136 | -webkit-border-top-right-radius: 5px !important; 137 | -webkit-border-top-left-radius: 5px !important; 138 | font-size: 12px !important; 139 | z-index: 9999; 140 | } 141 | #chat-block-site.closed { 142 | width: 150px; 143 | } 144 | #chat-block-site .chat-block-header { 145 | color: white; 146 | line-height: 20px; 147 | font-weight: bold; 148 | vertical-align: middle; 149 | padding-left: 5px; 150 | } 151 | #chat-block-site .chat-block-header img { 152 | float: right; 153 | cursor: pointer; 154 | } 155 | #chat-block-site.closed #chat-block-inner { 156 | display: none; 157 | } 158 | .chat-area div.row { 159 | display: block !important; 160 | padding: 4px !important; 161 | border: 1px solid #ccc !important; 162 | -moz-box-shadow:1px 1px 1px rgba(0, 0, 0, 0.1) !important; 163 | -webkit-box-shadow:1px 1px 1px rgba(0, 0, 0, 0.1) !important; 164 | -moz-border-radius: 5px !important; 165 | -webkit-border-radius: 5px !important; 166 | background: white !important; 167 | } 168 | .chat-area span.name { 169 | float: left !important; 170 | } 171 | #chat-block-inner { 172 | overflow-y: auto !important; 173 | overflow-x: hidden !important; 174 | } 175 | span.chat-prompt-text { 176 | cursor: pointer !important; 177 | } 178 | #chat-block-site span.chat-prompt-text, #chat-block-site.closed span.chat-title-text { 179 | display: none !important; 180 | } 181 | #chat-block-site.closed span.chat-prompt-text, #chat-block-site span.chat-title-text { 182 | display: inline !important; 183 | } 184 | #chat-block-inner { 185 | -moz-border-radius-topleft: 5px !important; 186 | -moz-border-radius-topright: 5px !important; 187 | -webkit-border-top-left-radius: 5px !important; 188 | -webkit-border-top-right-radius: 5px !important; 189 | border: 1px solid transparent !important; 190 | padding-top: 5px !important; 191 | } 192 | .chat-twitter-signin-btn { 193 | min-height: 26px !important; 194 | display: inline !important; 195 | float: left; 196 | } 197 | .chat-facebook-signin-btn { 198 | min-height: 16px !important; 199 | display: inline !important; 200 | float: left; 201 | } 202 | .chat-box input { 203 | margin-bottom: 2px !important; 204 | } 205 | .chat-login-wrap { 206 | margin-left: 5px !important; 207 | margin-right: 5px !important; 208 | } 209 | .login-message { 210 | margin-left: 5px !important; 211 | margin-right: 5px !important; 212 | } 213 | .chat-send[disabled] { 214 | background-color: #eee; 215 | } -------------------------------------------------------------------------------- /tinymce/options.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | {#chat_dlg.title} 13 | 14 | 15 |
16 |
17 | 23 |
24 | 25 |
26 |
27 |
28 | {#chat_dlg.general} 29 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 50 | 51 | 52 | 53 | 54 | 60 | 61 | 62 | 63 | 64 | 67 | 68 |
34 | 38 |
45 | 49 |
55 | 59 |
65 | x 66 |
69 |
70 |
71 | 72 |
73 |
74 | {#chat_dlg.colors} 75 | 76 | 77 | 78 | 79 | 82 | 83 | 84 | 85 | 86 | 89 | 90 | 91 | 92 | 93 | 96 | 97 |
80 | 81 |
87 | 88 |
94 | 95 |
98 |
99 | 100 |
101 | {#chat_dlg.fonts} 102 | 103 | 104 | 105 | 106 | 107 | 110 | 111 | 112 | 113 | 114 | 117 | 118 |
108 | 109 |
115 | 116 |
119 |
120 |
121 | 122 |
123 |
124 | {#chat_dlg.logs} 125 | 126 | 127 | 128 | 129 | 135 | 136 | 137 | 138 | 139 | 145 | 146 |
130 | 134 |
140 | 144 |
147 |
148 |
149 | 150 |
151 |
152 | {#chat_dlg.authentication} 153 | 154 | 155 | 156 | 157 | 166 | 167 |
158 | 165 |
168 |
169 |
170 |
171 | 172 |
173 |
174 | 175 |
176 | 177 |
178 | 179 | 180 |
181 |
182 |
183 | 184 | -------------------------------------------------------------------------------- /css/wp_admin.css: -------------------------------------------------------------------------------- 1 | @CHARSET "UTF-8"; 2 | /** 3 | * Chat WordPress, WordPress Multisite, BuddyPress plugin 4 | * 5 | * wp-admin styles (admin dashboard) 6 | * 7 | * @author S H Mohanjith 8 | * @since 1.0.1 9 | */ 10 | 11 | /* Component containers 12 | ----------------------------------*/ 13 | .ui-widget { } 14 | .ui-widget .ui-widget { } 15 | .ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { } 16 | .ui-widget-content { z-index: 1; } 17 | .ui-widget-header { border: 1px solid #aaaaaa; background: #cccccc 50% 50% repeat-x; color: #222222; font-weight: bold; font-size: 1.1em; } 18 | .ui-widget-header a { color: #222222; } 19 | 20 | /* Interaction states 21 | ----------------------------------*/ 22 | .ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #d3d3d3; background: #e6e6e6 50% 50% repeat-x; font-weight: normal; color: #555555; } 23 | .ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #555555; text-decoration: none; } 24 | .ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #999999; background: #dadada 50% 50% repeat-x; font-weight: normal; color: #212121; } 25 | .ui-state-hover a, .ui-state-hover a:hover { color: #212121; text-decoration: none; } 26 | .ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #aaaaaa; background: #ffffff 50% 50% repeat-x; font-weight: normal; color: #212121; } 27 | .ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #212121; text-decoration: none; } 28 | .ui-widget :active { outline: none; } 29 | 30 | /* Interaction Cues 31 | ----------------------------------*/ 32 | .ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fcefa1; background: #fbf9ee 50% 50% repeat-x; color: #363636; } 33 | .ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; } 34 | .ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #fef1ec 50% 50% repeat-x; color: #cd0a0a; } 35 | .ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a; } 36 | .ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a; } 37 | .ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; } 38 | .ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; } 39 | .ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; } 40 | 41 | /* Tabs */ 42 | .ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ 43 | .ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; } 44 | .ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; } 45 | .ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; } 46 | .ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; } 47 | .ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; } 48 | .ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */ 49 | .ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; } 50 | .ui-tabs .ui-tabs-hide { display: none !important; } 51 | 52 | .ui-tabs { 53 | padding: .2em; 54 | zoom: 1; 55 | } 56 | 57 | .ui-tabs .ui-tabs-nav { 58 | list-style: none; 59 | position: relative; 60 | padding: .2em .2em 0; 61 | } 62 | 63 | .ui-tabs .ui-tabs-nav li { 64 | position: relative; 65 | float: left; 66 | margin: 0 .2em -1px 0; 67 | padding: 0; 68 | -moz-border-radius-topleft: 2px; 69 | -moz-border-radius-topright: 2px; 70 | } 71 | 72 | .ui-tabs .ui-tabs-nav li a { 73 | float: left; 74 | text-decoration: none; 75 | padding: .5em 1em; 76 | } 77 | 78 | .ui-tabs .ui-tabs-nav li.ui-tabs-selected { 79 | padding-bottom: 1px; 80 | } 81 | 82 | .ui-tabs .ui-tabs-nav li.ui-tabs-selected a,.ui-tabs .ui-tabs-nav li.ui-state-disabled a,.ui-tabs .ui-tabs-nav li.ui-state-processing a 83 | { 84 | cursor: text; 85 | } 86 | 87 | .ui-tabs .ui-tabs-nav li a,.ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a 88 | { 89 | cursor: pointer; 90 | } 91 | 92 | /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */ 93 | .ui-tabs .ui-tabs-panel { 94 | padding: 1em 1.4em; 95 | display: block; 96 | background: none; 97 | } 98 | 99 | .ui-tabs .ui-tabs-hide { 100 | display: none !important; 101 | } 102 | 103 | .ui-widget-header { 104 | background: none; 105 | border: none; 106 | } 107 | 108 | .ui-widget-content { 109 | } 110 | 111 | .ui-tabs-panel.ui-widget-content { 112 | border: 1px solid #DDDDDD; 113 | -moz-border-radius: 5px; 114 | -moz-border-radius-topleft: 2px; 115 | -moz-border-radius-topright: 2px; 116 | background-color: #FDFDFD; 117 | padding-bottom: 10px; 118 | margin-top: 2.1em; 119 | } 120 | 121 | .ui-tabs .ui-tabs-nav li.ui-tabs-selected a { 122 | background-color: #FDFDFD; 123 | } 124 | 125 | .ui-tabs .ui-tabs-nav li a { 126 | outline: none; 127 | padding:0.2em 1em; 128 | } 129 | 130 | /** Color picker **/ 131 | .farbtastic { 132 | position: relative; 133 | } 134 | .farbtastic * { 135 | position: absolute; 136 | cursor: crosshair; 137 | } 138 | .farbtastic, .farbtastic .wheel { 139 | width: 195px; 140 | height: 195px; 141 | } 142 | .farbtastic .color, .farbtastic .overlay { 143 | top: 47px; 144 | left: 47px; 145 | width: 101px; 146 | height: 101px; 147 | } 148 | .farbtastic .wheel { 149 | background: url(../images/wheel.png) no-repeat; 150 | width: 195px; 151 | height: 195px; 152 | } 153 | .farbtastic .overlay { 154 | background: url(../images/mask.png) no-repeat; 155 | } 156 | .farbtastic .marker { 157 | width: 17px; 158 | height: 17px; 159 | margin: -8px 0 0 -8px; 160 | overflow: hidden; 161 | background: url(../images/marker.png) no-repeat; 162 | } 163 | 164 | fieldset { 165 | border: 1px solid #DFDFDF; 166 | padding: 3px 5px; 167 | width: 500px; 168 | } 169 | 170 | fieldset legend { 171 | padding: 0px 5px; 172 | } 173 | 174 | fieldset table td, .chat_auth_panel table td, .chat_advanced_panel table td { 175 | padding: 2px 5px; 176 | vertical-align: top; 177 | } 178 | 179 | #wpcontent select.chat_login_options { 180 | height: 70px; 181 | } 182 | 183 | div.color { 184 | position: absolute; 185 | background-color: #fff; 186 | border: 1px solid #DFDFDF; 187 | -moz-border-radius:4px 4px 4px 4px; 188 | } 189 | 190 | td.instructions { 191 | color: #777; 192 | } 193 | 194 | td.instructions ul, td.instructions p { 195 | font-size: 0.9em; 196 | } 197 | 198 | .chat_auth_panel ul { 199 | margin-left: 10px; 200 | } 201 | 202 | .chat_auth_panel li { 203 | margin-left: 10px; 204 | margin-bottom: 2px; 205 | } 206 | 207 | td.info { 208 | vertical-align: top; 209 | color: #777; 210 | border-left: 1px dotted #ccc; 211 | } 212 | 213 | p.info { 214 | vertical-align: top; 215 | color: #777; 216 | } 217 | 218 | .chat_lite_disabled { 219 | opacity: 0.2; 220 | -moz-opacity:.20; 221 | } 222 | 223 | .chat_lite_disabled_tab { 224 | opacity: 0.2; 225 | -moz-opacity:.20; 226 | } 227 | 228 | div.blockMsg { 229 | width: 100%; 230 | top: 0%; 231 | left: 0%; 232 | text-align: center; 233 | background-color: #ddd; 234 | border: 1px solid #000; 235 | -moz-border-radius: 10px; 236 | -webkit-border-radius: 10px; 237 | -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"; 238 | filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=50); 239 | -moz-opacity:.70; 240 | opacity:.70; 241 | padding: 15px; 242 | color: #fff; 243 | } 244 | 245 | -------------------------------------------------------------------------------- /js/base64-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | * More info at: http://phpjs.org 3 | * 4 | * This is version: 3.19 5 | * php.js is copyright 2010 Kevin van Zonneveld. 6 | * 7 | * Portions copyright Brett Zamir (http://brett-zamir.me), Kevin van Zonneveld 8 | * (http://kevin.vanzonneveld.net), Onno Marsman, Theriault, Michael White 9 | * (http://getsprink.com), Waldo Malqui Silva, Paulo Freitas, Jack, Jonas 10 | * Raoni Soares Silva (http://www.jsfromhell.com), Philip Peterson, Legaev 11 | * Andrey, Ates Goral (http://magnetiq.com), Alex, Ratheous, Martijn Wieringa, 12 | * lmeyrick (https://sourceforge.net/projects/bcmath-js/), Nate, Philippe 13 | * Baumann, Enrique Gonzalez, Webtoolkit.info (http://www.webtoolkit.info/), 14 | * Ole Vrijenhoek, Ash Searle (http://hexmen.com/blog/), travc, Jani 15 | * Hartikainen, Carlos R. L. Rodrigues (http://www.jsfromhell.com), WebDevHobo 16 | * (http://webdevhobo.blogspot.com/), stag019, Rafał Kukawski 17 | * (http://blog.kukawski.pl), GeekFG (http://geekfg.blogspot.com), pilus, 18 | * Rafał Kukawski (http://blog.kukawski.pl/), T.Wild, Erkekjetter, 19 | * http://stackoverflow.com/questions/57803/how-to-convert-decimal-to-hex-in-javascript, 20 | * Johnny Mast (http://www.phpvrouwen.nl), Michael Grier, marrtins, Andrea 21 | * Giammarchi (http://webreflection.blogspot.com), d3x, AJ, Joris, Steven 22 | * Levithan (http://blog.stevenlevithan.com), Paul Smith, Arpad Ray 23 | * (mailto:arpad@php.net), Tim de Koning (http://www.kingsquare.nl), 24 | * gettimeofday, majak, mdsjack (http://www.mdsjack.bo.it), Felix 25 | * Geisendoerfer (http://www.debuggable.com/felix), Kevin van Zonneveld 26 | * (http://kevin.vanzonneveld.net/), Martin (http://www.erlenwiese.de/), 27 | * KELAN, Oleg Eremeev, Public Domain (http://www.json.org/json2.js), Karol 28 | * Kowalski, David, Imgen Tata (http://www.myipdf.com/), Robin, Michael White, 29 | * felix, Breaking Par Consulting Inc 30 | * (http://www.breakingpar.com/bkp/home.nsf/0/87256B280015193F87256CFB006C45F7), 31 | * Josh Fraser 32 | * (http://onlineaspect.com/2007/06/08/auto-detect-a-time-zone-with-javascript/), 33 | * Marc Palau, Chris, Mailfaker (http://www.weedem.fr/), Mirek Slugen, Lars 34 | * Fischer, Tyler Akins (http://rumkin.com), Alfonso Jimenez 35 | * (http://www.alfonsojimenez.com), Thunder.m, Caio Ariede 36 | * (http://caioariede.com), Pellentesque Malesuada, Kankrelune 37 | * (http://www.webfaktory.info/), saulius, Aman Gupta, Steve Hilder, Diplom@t 38 | * (http://difane.com/), gorthaur, Sakimori, Nick Kolosov (http://sammy.ru), 39 | * ger, marc andreu, Fox, nobbler, Frank Forte, duncan, djmix, Douglas 40 | * Crockford (http://javascript.crockford.com), mktime, john 41 | * (http://www.jd-tech.net), Linuxworld, Lincoln Ramsay, lmeyrick 42 | * (https://sourceforge.net/projects/bcmath-js/this.), Arno, jmweb, date, Adam 43 | * Wallner (http://web2.bitbaro.hu/), paulo kuong, Itsacon 44 | * (http://www.itsacon.net/), Billy, vlado houba, Jalal Berrami, Francois, 45 | * Scott Cariss, sankai, Denny Wardhana, Nathan, Bayron Guevara, Oskar Larsson 46 | * Högfeldt (http://oskar-lh.name/), Slawomir Kaniecki, ReverseSyntax, 47 | * Mateusz "loonquawl" Zalega, noname, madipta, XoraX (http://www.xorax.info), 48 | * Soren Hansen, Ozh, 0m3r, echo is bad, merabi, Eugene Bulkin 49 | * (http://doubleaw.com/), Der Simon (http://innerdom.sourceforge.net/), 50 | * nord_ua, Subhasis Deb, David Randall, Bryan Elliott, Tim Wiel, Thomas 51 | * Beaucourt (http://www.webapp.fr), JT, T0bsn, Peter-Paul Koch 52 | * (http://www.quirksmode.org/js/beat.html), MeEtc (http://yass.meetcweb.com), 53 | * josh, JB, LH, Steve Clay, Jon Hohle, T. Wild, Thiago Mata 54 | * (http://thiagomata.blog.com), David James, Marco, Brad Touesnard, 55 | * class_exists, Ole Vrijenhoek (http://www.nervous.nl/), Raphael (Ao RUDLER), 56 | * Marc Jansen, Francesco, Stoyan Kyosev (http://www.svest.org/), J A R, 57 | * Sanjoy Roy, Shingo, Pyerre, Gilbert, kenneth, FremyCompany, stensi, Devan 58 | * Penner-Woelk, Saulo Vallory, Kristof Coomans (SCK-CEN Belgian Nucleair 59 | * Research Centre), Pierre-Luc Paour, Kirk Strobeck, Martin Pool, Christoph, 60 | * Daniel Esteban, Artur Tchernychev, uestla, Wagner B. Soares, Valentina De 61 | * Rosa, strftime, Jason Wong (http://carrot.org/), Brant Messenger 62 | * (http://www.brantmessenger.com/), Rick Waldron, Bug?, Blues 63 | * (http://tech.bluesmoon.info/), Bjorn Roesbeke 64 | * (http://www.bjornroesbeke.be/), Anton Ongson, Gabriel Paderni, Simon 65 | * Willison (http://simonwillison.net), Luke Godfrey, Pul, rezna, Mick@el, 66 | * Tomasz Wesolowski, Eric Nagel, Bobby Drake, Evertjan Garretsen, Alan C, 67 | * Taras Bogach, Ulrich, Zahlii, Yves Sucaet, sowberry, Norman "zEh" Fuchs, 68 | * hitwork, johnrembo, Brian Tafoya (http://www.premasolutions.com/), Nick 69 | * Callen, Steven Levithan (stevenlevithan.com), ejsanders, Scott Baker, 70 | * Philippe Jausions (http://pear.php.net/user/jausions), Aidan Lister 71 | * (http://aidanlister.com/), Rob, e-mike, ChaosNo1, Alexander Ermolaev 72 | * (http://snippets.dzone.com/user/AlexanderErmolaev), HKM, metjay, jpfle, 73 | * strcasecmp, strcmp, DxGx, James (http://www.james-bell.co.uk/), kilops, 74 | * Orlando, dptr1988, Le Torbi, Pedro Tainha (http://www.pedrotainha.com), 75 | * James, Marco van Oort, Philipp Lenssen, jakes, 3D-GRAF, Yannoo, gabriel 76 | * paderni, baris ozdil, FGFEmperor, daniel airton wermann 77 | * (http://wermann.com.br), Atli Þór, Howard Yeend, Diogo Resende, Allan 78 | * Jensen (http://www.winternet.no), Benjamin Lupton, Maximusya, davook, Greg 79 | * Frazier, Tod Gentille, Manish, Matt Bradley, Cord, fearphage 80 | * (http://http/my.opera.com/fearphage/), Matteo, Victor, taith, Tim de 81 | * Koning, Alexander M Beedie, Ryan W Tenney (http://ryan.10e.us), Riddler 82 | * (http://www.frontierwebdev.com/), T.J. Leahy, Luis Salazar 83 | * (http://www.freaky-media.com/), Rafał Kukawski, Rival, Luke Smith 84 | * (http://lucassmith.name), Russell Walker (http://www.nbill.co.uk/), Jamie 85 | * Beck (http://www.terabit.ca/), Garagoth, Andrej Pavlovic, Dino, Le Torbi 86 | * (http://www.letorbi.de/), DtTvB 87 | * (http://dt.in.th/2008-09-16.string-length-in-bytes.html), Andreas, Arnout 88 | * Kazemier (http://www.3rd-Eden.com), penutbutterjelly, Michael, setcookie, 89 | * Blues at http://hacks.bluesmoon.info/strftime/strftime.js, YUI Library: 90 | * http://developer.yahoo.com/yui/docs/YAHOO.util.DateLocale.html, rem, Josep 91 | * Sanz (http://www.ws3.es/), Cagri Ekin, Dreamer, Amirouche, Amir Habibi 92 | * (http://www.residence-mixte.com/), Kheang Hok Chin 93 | * (http://www.distantia.ca/), Jay Klehr, booeyOH, Ben Bryan, meo, William, 94 | * Greenseed, Yen-Wei Liu, Leslie Hoare, mk.keck 95 | * 96 | * Dual licensed under the MIT (MIT-LICENSE.txt) 97 | * and GPL (GPL-LICENSE.txt) licenses. 98 | * 99 | * Permission is hereby granted, free of charge, to any person obtaining a 100 | * copy of this software and associated documentation files (the 101 | * "Software"), to deal in the Software without restriction, including 102 | * without limitation the rights to use, copy, modify, merge, publish, 103 | * distribute, sublicense, and/or sell copies of the Software, and to 104 | * permit persons to whom the Software is furnished to do so, subject to 105 | * the following conditions: 106 | * 107 | * The above copyright notice and this permission notice shall be included 108 | * in all copies or substantial portions of the Software. 109 | * 110 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 111 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 112 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 113 | * IN NO EVENT SHALL KEVIN VAN ZONNEVELD BE LIABLE FOR ANY CLAIM, DAMAGES 114 | * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 115 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 116 | * OTHER DEALINGS IN THE SOFTWARE. 117 | */ 118 | 119 | 120 | // Compression: minified 121 | 122 | 123 | function base64_decode(data){var b64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";var o1,o2,o3,h1,h2,h3,h4,bits,i=0,ac=0,dec="",tmp_arr=[];if(!data){return data;} 124 | data+='';do{h1=b64.indexOf(data.charAt(i++));h2=b64.indexOf(data.charAt(i++));h3=b64.indexOf(data.charAt(i++));h4=b64.indexOf(data.charAt(i++));bits=h1<<18|h2<<12|h3<<6|h4;o1=bits>>16&0xff;o2=bits>>8&0xff;o3=bits&0xff;if(h3==64){tmp_arr[ac++]=String.fromCharCode(o1);}else if(h4==64){tmp_arr[ac++]=String.fromCharCode(o1,o2);}else{tmp_arr[ac++]=String.fromCharCode(o1,o2,o3);}}while(i>18&0x3f;h2=bits>>12&0x3f;h3=bits>>6&0x3f;h4=bits&0x3f;tmp_arr[ac++]=b64.charAt(h1)+b64.charAt(h2)+b64.charAt(h3)+b64.charAt(h4);}while(i191)&&(c1<224)){c2=str_data.charCodeAt(i+1);tmp_arr[ac++]=String.fromCharCode(((c1&31)<<6)|(c2&63));i+=2;}else{c2=str_data.charCodeAt(i+1);c3=str_data.charCodeAt(i+2);tmp_arr[ac++]=String.fromCharCode(((c1&15)<<12)|((c2&63)<<6)|(c3&63));i+=3;}} 129 | return tmp_arr.join('');} 130 | function utf8_encode(argString){var string=(argString+'');var utftext="";var start,end;var stringl=0;start=end=0;stringl=string.length;for(var n=0;n127&&c1<2048){enc=String.fromCharCode((c1>>6)|192)+String.fromCharCode((c1&63)|128);}else{enc=String.fromCharCode((c1>>12)|224)+String.fromCharCode(((c1>>6)&63)|128)+String.fromCharCode((c1&63)|128);} 131 | if(enc!==null){if(end>start){utftext+=string.substring(start,end);} 132 | utftext+=enc;start=end=n+1;}} 133 | if(end>start){utftext+=string.substring(start,string.length);} 134 | return utftext;} -------------------------------------------------------------------------------- /languages/chat.pot: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2015 Chat Lite 2 | # This file is distributed under the same license as the Chat Lite package. 3 | msgid "" 4 | msgstr "" 5 | "Project-Id-Version: Chat Lite 1.0.8.5\n" 6 | "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/chat\n" 7 | "POT-Creation-Date: 2015-07-17 09:59:06+00:00\n" 8 | "MIME-Version: 1.0\n" 9 | "Content-Type: text/plain; charset=UTF-8\n" 10 | "Content-Transfer-Encoding: 8bit\n" 11 | "PO-Revision-Date: 2015-MO-DA HO:MI+ZONE\n" 12 | "Last-Translator: FULL NAME \n" 13 | "Language-Team: LANGUAGE \n" 14 | 15 | #: chat.php:421 16 | msgid "Chat Plugin Options" 17 | msgstr "" 18 | 19 | #: chat.php:421 chat.php:1956 20 | msgid "Chat" 21 | msgstr "" 22 | 23 | #: chat.php:639 chat.php:985 chat.php:1279 24 | msgid "Play sound when a new message is received?" 25 | msgstr "" 26 | 27 | #: chat.php:655 chat.php:998 chat.php:1292 28 | msgid "Display the user's avatar with the message?" 29 | msgstr "" 30 | 31 | #: chat.php:672 chat.php:1013 chat.php:1307 32 | msgid "Display emoticons bar?" 33 | msgstr "" 34 | 35 | #: chat.php:687 chat.php:1026 chat.php:1320 36 | msgid "Display date the message was sent?" 37 | msgstr "" 38 | 39 | #: chat.php:702 chat.php:1039 chat.php:1333 40 | msgid "Display the time the message was sent?" 41 | msgstr "" 42 | 43 | #: chat.php:712 chat.php:1051 chat.php:1345 44 | msgid "Dimensions of the chat box" 45 | msgstr "" 46 | 47 | #: chat.php:730 chat.php:1069 chat.php:1375 48 | msgid "Chat box background color" 49 | msgstr "" 50 | 51 | #: chat.php:740 52 | msgid "Date background color" 53 | msgstr "" 54 | 55 | #: chat.php:750 chat.php:1093 chat.php:1399 56 | msgid "Name background color" 57 | msgstr "" 58 | 59 | #: chat.php:760 chat.php:1105 chat.php:1411 60 | msgid "Moderator Name background color" 61 | msgstr "" 62 | 63 | #: chat.php:770 chat.php:1117 chat.php:1423 64 | msgid "Text color" 65 | msgstr "" 66 | 67 | #: chat.php:789 chat.php:1137 chat.php:1443 68 | msgid "Chat box font" 69 | msgstr "" 70 | 71 | #: chat.php:801 chat.php:1151 chat.php:1456 72 | msgid "Chat box font size" 73 | msgstr "" 74 | 75 | #: chat.php:824 chat.php:1170 chat.php:1475 76 | msgid "Log chat messages?" 77 | msgstr "" 78 | 79 | #: chat.php:839 chat.php:1183 chat.php:1488 80 | msgid "Display chat logs?" 81 | msgstr "" 82 | 83 | #: chat.php:854 chat.php:1197 chat.php:1502 84 | msgid "Current user" 85 | msgstr "" 86 | 87 | #: chat.php:857 chat.php:1200 chat.php:1505 88 | msgid "Network user" 89 | msgstr "" 90 | 91 | #: chat.php:860 chat.php:1203 chat.php:1508 92 | msgid "Public user" 93 | msgstr "" 94 | 95 | #: chat.php:863 chat.php:1205 chat.php:1510 96 | msgid "Twitter" 97 | msgstr "" 98 | 99 | #: chat.php:867 chat.php:1207 chat.php:1512 100 | msgid "Facebook" 101 | msgstr "" 102 | 103 | #: chat.php:871 chat.php:1210 chat.php:1515 104 | msgid "Authentication methods users can use" 105 | msgstr "" 106 | 107 | #: chat.php:891 chat.php:1232 chat.php:1537 108 | msgid "Select which roles are moderators" 109 | msgstr "" 110 | 111 | #: chat.php:940 chat.php:1800 112 | msgid "Chat Settings" 113 | msgstr "" 114 | 115 | #: chat.php:948 116 | msgid "In post chat options" 117 | msgstr "" 118 | 119 | #: chat.php:951 120 | msgid "Bottom corner chat" 121 | msgstr "" 122 | 123 | #: chat.php:954 124 | msgid "Twitter API" 125 | msgstr "" 126 | 127 | #: chat.php:957 128 | msgid "Facebook API" 129 | msgstr "" 130 | 131 | #: chat.php:960 132 | msgid "Advanced" 133 | msgstr "" 134 | 135 | #: chat.php:966 chat.php:1240 136 | msgid "" 137 | "Grayed out options available in the full version. **Upgrade to the full version now »**" 139 | msgstr "" 140 | 141 | #: chat.php:969 142 | msgid "Default options for in post chat boxes" 143 | msgstr "" 144 | 145 | #: chat.php:972 chat.php:1265 146 | msgid "General" 147 | msgstr "" 148 | 149 | #: chat.php:977 chat.php:1271 150 | msgid "Sound" 151 | msgstr "" 152 | 153 | #: chat.php:981 chat.php:994 chat.php:1009 chat.php:1022 chat.php:1035 154 | #: chat.php:1166 chat.php:1179 chat.php:1255 chat.php:1275 chat.php:1288 155 | #: chat.php:1303 chat.php:1316 chat.php:1329 chat.php:1471 chat.php:1484 156 | #: chat.php:1809 157 | msgid "Enabled" 158 | msgstr "" 159 | 160 | #: chat.php:982 chat.php:995 chat.php:1010 chat.php:1023 chat.php:1036 161 | #: chat.php:1167 chat.php:1180 chat.php:1256 chat.php:1276 chat.php:1289 162 | #: chat.php:1304 chat.php:1317 chat.php:1330 chat.php:1472 chat.php:1485 163 | #: chat.php:1812 164 | msgid "Disabled" 165 | msgstr "" 166 | 167 | #: chat.php:990 chat.php:1284 168 | msgid "Avatar" 169 | msgstr "" 170 | 171 | #: chat.php:1003 chat.php:1297 172 | msgid "Emoticons" 173 | msgstr "" 174 | 175 | #: chat.php:1018 chat.php:1312 176 | msgid "Show date" 177 | msgstr "" 178 | 179 | #: chat.php:1031 chat.php:1325 180 | msgid "Show time" 181 | msgstr "" 182 | 183 | #: chat.php:1044 chat.php:1338 184 | msgid "Dimensions" 185 | msgstr "" 186 | 187 | #: chat.php:1057 chat.php:1351 188 | msgid "Colors" 189 | msgstr "" 190 | 191 | #: chat.php:1062 chat.php:1368 192 | msgid "Background" 193 | msgstr "" 194 | 195 | #: chat.php:1074 chat.php:1380 196 | msgid "Date" 197 | msgstr "" 198 | 199 | #: chat.php:1081 chat.php:1387 200 | msgid "Date and time background color" 201 | msgstr "" 202 | 203 | #: chat.php:1086 chat.php:1392 chat.php:2103 204 | msgid "Name" 205 | msgstr "" 206 | 207 | #: chat.php:1098 chat.php:1404 208 | msgid "Moderator Name" 209 | msgstr "" 210 | 211 | #: chat.php:1110 chat.php:1416 212 | msgid "Text" 213 | msgstr "" 214 | 215 | #: chat.php:1123 chat.php:1429 216 | msgid "Fonts" 217 | msgstr "" 218 | 219 | #: chat.php:1128 chat.php:1434 220 | msgid "Font" 221 | msgstr "" 222 | 223 | #: chat.php:1142 chat.php:1448 224 | msgid "Font size" 225 | msgstr "" 226 | 227 | #: chat.php:1157 chat.php:1462 228 | msgid "Logs" 229 | msgstr "" 230 | 231 | #: chat.php:1162 chat.php:1467 232 | msgid "Creation" 233 | msgstr "" 234 | 235 | #: chat.php:1175 chat.php:1480 236 | msgid "Display" 237 | msgstr "" 238 | 239 | #: chat.php:1189 chat.php:1494 240 | msgid "Authentication" 241 | msgstr "" 242 | 243 | #: chat.php:1194 chat.php:1499 244 | msgid "Login options" 245 | msgstr "" 246 | 247 | #: chat.php:1215 chat.php:1520 248 | msgid "Moderator roles" 249 | msgstr "" 250 | 251 | #: chat.php:1243 252 | msgid "Options for the bottom corner chat" 253 | msgstr "" 254 | 255 | #: chat.php:1246 256 | msgid "Main" 257 | msgstr "" 258 | 259 | #: chat.php:1251 260 | msgid "Show" 261 | msgstr "" 262 | 263 | #: chat.php:1259 264 | msgid "Display bottom corner chat?" 265 | msgstr "" 266 | 267 | #: chat.php:1356 268 | msgid "Border" 269 | msgstr "" 270 | 271 | #: chat.php:1363 272 | msgid "Chat box border color" 273 | msgstr "" 274 | 275 | #: chat.php:1547 chat.php:1577 chat.php:1614 276 | msgid "" 277 | "Only available in the full version. **Upgrade to the full version now »**" 279 | msgstr "" 280 | 281 | #: chat.php:1552 282 | msgid "@Anywhere API key" 283 | msgstr "" 284 | 285 | #: chat.php:1559 286 | msgid "" 287 | "Register this site as an application on Twitter's app registration page" 289 | msgstr "" 290 | 291 | #: chat.php:1560 292 | msgid "If you're not logged in, you can use your Twitter username and password" 293 | msgstr "" 294 | 295 | #: chat.php:1561 296 | msgid "" 297 | "Your Application's Name will be what shows up after \"via\" in your twitter " 298 | "stream" 299 | msgstr "" 300 | 301 | #: chat.php:1562 302 | msgid "Application Type should be set on Browser" 303 | msgstr "" 304 | 305 | #: chat.php:1563 306 | msgid "The callback URL should be" 307 | msgstr "" 308 | 309 | #: chat.php:1565 310 | msgid "" 311 | "Once you have registered your site as an application, you will be provided " 312 | "with @Anywhere API key." 313 | msgstr "" 314 | 315 | #: chat.php:1566 chat.php:1594 316 | msgid "Copy and paste them to the fields on the left" 317 | msgstr "" 318 | 319 | #: chat.php:1582 320 | msgid "Application id" 321 | msgstr "" 322 | 323 | #: chat.php:1589 324 | msgid "" 325 | "Register this site as an application on Facebook's app registration page" 327 | msgstr "" 328 | 329 | #: chat.php:1590 330 | msgid "" 331 | "If you're not logged in, you can use your Facebook username and password" 332 | msgstr "" 333 | 334 | #: chat.php:1591 335 | msgid "The site URL should be" 336 | msgstr "" 337 | 338 | #: chat.php:1593 339 | msgid "" 340 | "Once you have registered your site as an application, you will be provided " 341 | "with a Application ID and a Application secret." 342 | msgstr "" 343 | 344 | #: chat.php:1601 345 | msgid "Application secret" 346 | msgstr "" 347 | 348 | #: chat.php:1619 349 | msgid "Interval" 350 | msgstr "" 351 | 352 | #: chat.php:1635 353 | msgid "Save Changes" 354 | msgstr "" 355 | 356 | #: chat.php:1674 357 | msgid "Sign out of Facebook" 358 | msgstr "" 359 | 360 | #: chat.php:1675 361 | msgid "Sign out of Twitter" 362 | msgstr "" 363 | 364 | #: chat.php:1676 365 | msgid "Please wait..." 366 | msgstr "" 367 | 368 | #: chat.php:1678 369 | msgid "Minimize" 370 | msgstr "" 371 | 372 | #: chat.php:1680 chat.php:1957 373 | msgid "Maximize" 374 | msgstr "" 375 | 376 | #: chat.php:1804 377 | msgid "Chat sounds" 378 | msgstr "" 379 | 380 | #: chat.php:1956 381 | msgid "Click here to chat!" 382 | msgstr "" 383 | 384 | #: chat.php:2069 385 | msgid "Message" 386 | msgstr "" 387 | 388 | #: chat.php:2088 389 | msgid "\"Enter\" to send" 390 | msgstr "" 391 | 392 | #: chat.php:2088 393 | msgid "Place code in between code tags" 394 | msgstr "" 395 | 396 | #: chat.php:2090 397 | msgid "Logout" 398 | msgstr "" 399 | 400 | #: chat.php:2100 401 | msgid "To get started just enter your email address and desired username" 402 | msgstr "" 403 | 404 | #: chat.php:2104 405 | msgid "E-mail" 406 | msgstr "" 407 | 408 | #: chat.php:2105 409 | msgid "Login" 410 | msgstr "" 411 | 412 | #: chat.php:2121 413 | msgid "You must be logged in to participate in chats" 414 | msgstr "" 415 | 416 | #: chat.php:2134 417 | msgid "Chat Logs" 418 | msgstr "" 419 | 420 | #. Plugin Name of the plugin/theme 421 | msgid "Chat Lite" 422 | msgstr "" 423 | 424 | #. Plugin URI of the plugin/theme 425 | msgid "http://premium.wpmudev.org/project/wordpress-chat-plugin" 426 | msgstr "" 427 | 428 | #. Description of the plugin/theme 429 | msgid "" 430 | "Provides you with a fully featured chat area either in a post, page or " 431 | "bottom corner of your site - once activated configure here and drop into a post or page by clicking on " 433 | "the new chat icon in your post/page editor." 434 | msgstr "" 435 | 436 | #. Author of the plugin/theme 437 | msgid "WPMUDev" 438 | msgstr "" 439 | 440 | #. Author URI of the plugin/theme 441 | msgid "http://premium.wpmudev.org" 442 | msgstr "" -------------------------------------------------------------------------------- /js/farbtastic.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Farbtastic Color Picker 1.2 3 | * © 2008 Steven Wittens 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | */ 19 | 20 | (function ($) { 21 | jQuery.fn.farbtastic = function (callback) { 22 | $.farbtastic(this, callback); 23 | return this; 24 | }; 25 | 26 | jQuery.farbtastic = function (container, callback) { 27 | var container = $(container).get(0); 28 | return container.farbtastic || (container.farbtastic = new jQuery._farbtastic(container, callback)); 29 | } 30 | 31 | jQuery._farbtastic = function (container, callback) { 32 | // Store farbtastic object 33 | var fb = this; 34 | 35 | // Insert markup 36 | $(container).html('
'); 37 | var e = $('.farbtastic', container); 38 | fb.wheel = $('.wheel', container).get(0); 39 | // Dimensions 40 | fb.radius = 84; 41 | fb.square = 100; 42 | fb.width = 194; 43 | 44 | // Fix background PNGs in IE6 45 | if (navigator.appVersion.match(/MSIE [0-6]\./)) { 46 | $('*', e).each(function () { 47 | if (this.currentStyle.backgroundImage != 'none') { 48 | var image = this.currentStyle.backgroundImage; 49 | image = this.currentStyle.backgroundImage.substring(5, image.length - 2); 50 | $(this).css({ 51 | 'backgroundImage': 'none', 52 | 'filter': "progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop, src='" + image + "')" 53 | }); 54 | } 55 | }); 56 | } 57 | 58 | /** 59 | * Link to the given element(s) or callback. 60 | */ 61 | fb.linkTo = function (callback) { 62 | // Unbind previous nodes 63 | if (typeof fb.callback == 'object') { 64 | $(fb.callback).unbind('keyup', fb.updateValue); 65 | } 66 | 67 | // Reset color 68 | fb.color = null; 69 | 70 | // Bind callback or elements 71 | if (typeof callback == 'function') { 72 | fb.callback = callback; 73 | } 74 | else if (typeof callback == 'object' || typeof callback == 'string') { 75 | fb.callback = $(callback); 76 | fb.callback.bind('keyup', fb.updateValue); 77 | if (fb.callback.get(0).value) { 78 | fb.setColor(fb.callback.get(0).value); 79 | } 80 | } 81 | return this; 82 | } 83 | fb.updateValue = function (event) { 84 | if (this.value && this.value != fb.color) { 85 | fb.setColor(this.value); 86 | } 87 | } 88 | 89 | /** 90 | * Change color with HTML syntax #123456 91 | */ 92 | fb.setColor = function (color) { 93 | var unpack = fb.unpack(color); 94 | if (fb.color != color && unpack) { 95 | fb.color = color; 96 | fb.rgb = unpack; 97 | fb.hsl = fb.RGBToHSL(fb.rgb); 98 | fb.updateDisplay(); 99 | } 100 | return this; 101 | } 102 | 103 | /** 104 | * Change color with HSL triplet [0..1, 0..1, 0..1] 105 | */ 106 | fb.setHSL = function (hsl) { 107 | fb.hsl = hsl; 108 | fb.rgb = fb.HSLToRGB(hsl); 109 | fb.color = fb.pack(fb.rgb); 110 | fb.updateDisplay(); 111 | return this; 112 | } 113 | 114 | ///////////////////////////////////////////////////// 115 | 116 | /** 117 | * Retrieve the coordinates of the given event relative to the center 118 | * of the widget. 119 | */ 120 | fb.widgetCoords = function (event) { 121 | var x, y; 122 | var el = event.target || event.srcElement; 123 | var reference = fb.wheel; 124 | 125 | if (typeof event.offsetX != 'undefined') { 126 | // Use offset coordinates and find common offsetParent 127 | var pos = { x: event.offsetX, y: event.offsetY }; 128 | 129 | // Send the coordinates upwards through the offsetParent chain. 130 | var e = el; 131 | while (e) { 132 | e.mouseX = pos.x; 133 | e.mouseY = pos.y; 134 | pos.x += e.offsetLeft; 135 | pos.y += e.offsetTop; 136 | e = e.offsetParent; 137 | } 138 | 139 | // Look for the coordinates starting from the wheel widget. 140 | var e = reference; 141 | var offset = { x: 0, y: 0 } 142 | while (e) { 143 | if (typeof e.mouseX != 'undefined') { 144 | x = e.mouseX - offset.x; 145 | y = e.mouseY - offset.y; 146 | break; 147 | } 148 | offset.x += e.offsetLeft; 149 | offset.y += e.offsetTop; 150 | e = e.offsetParent; 151 | } 152 | 153 | // Reset stored coordinates 154 | e = el; 155 | while (e) { 156 | e.mouseX = undefined; 157 | e.mouseY = undefined; 158 | e = e.offsetParent; 159 | } 160 | } 161 | else { 162 | // Use absolute coordinates 163 | var pos = fb.absolutePosition(reference); 164 | x = (event.pageX || 0*(event.clientX + $('html').get(0).scrollLeft)) - pos.x; 165 | y = (event.pageY || 0*(event.clientY + $('html').get(0).scrollTop)) - pos.y; 166 | } 167 | // Subtract distance to middle 168 | return { x: x - fb.width / 2, y: y - fb.width / 2 }; 169 | } 170 | 171 | /** 172 | * Mousedown handler 173 | */ 174 | fb.mousedown = function (event) { 175 | // Capture mouse 176 | if (!document.dragging) { 177 | $(document).bind('mousemove', fb.mousemove).bind('mouseup', fb.mouseup); 178 | document.dragging = true; 179 | } 180 | 181 | // Check which area is being dragged 182 | var pos = fb.widgetCoords(event); 183 | fb.circleDrag = Math.max(Math.abs(pos.x), Math.abs(pos.y)) * 2 > fb.square; 184 | 185 | // Process 186 | fb.mousemove(event); 187 | return false; 188 | } 189 | 190 | /** 191 | * Mousemove handler 192 | */ 193 | fb.mousemove = function (event) { 194 | // Get coordinates relative to color picker center 195 | var pos = fb.widgetCoords(event); 196 | 197 | // Set new HSL parameters 198 | if (fb.circleDrag) { 199 | var hue = Math.atan2(pos.x, -pos.y) / 6.28; 200 | if (hue < 0) hue += 1; 201 | fb.setHSL([hue, fb.hsl[1], fb.hsl[2]]); 202 | } 203 | else { 204 | var sat = Math.max(0, Math.min(1, -(pos.x / fb.square) + .5)); 205 | var lum = Math.max(0, Math.min(1, -(pos.y / fb.square) + .5)); 206 | fb.setHSL([fb.hsl[0], sat, lum]); 207 | } 208 | return false; 209 | } 210 | 211 | /** 212 | * Mouseup handler 213 | */ 214 | fb.mouseup = function () { 215 | // Uncapture mouse 216 | $(document).unbind('mousemove', fb.mousemove); 217 | $(document).unbind('mouseup', fb.mouseup); 218 | document.dragging = false; 219 | } 220 | 221 | /** 222 | * Update the markers and styles 223 | */ 224 | fb.updateDisplay = function () { 225 | // Markers 226 | var angle = fb.hsl[0] * 6.28; 227 | $('.h-marker', e).css({ 228 | left: Math.round(Math.sin(angle) * fb.radius + fb.width / 2) + 'px', 229 | top: Math.round(-Math.cos(angle) * fb.radius + fb.width / 2) + 'px' 230 | }); 231 | 232 | $('.sl-marker', e).css({ 233 | left: Math.round(fb.square * (.5 - fb.hsl[1]) + fb.width / 2) + 'px', 234 | top: Math.round(fb.square * (.5 - fb.hsl[2]) + fb.width / 2) + 'px' 235 | }); 236 | 237 | // Saturation/Luminance gradient 238 | $('.color', e).css('backgroundColor', fb.pack(fb.HSLToRGB([fb.hsl[0], 1, 0.5]))); 239 | 240 | // Linked elements or callback 241 | if (typeof fb.callback == 'object') { 242 | // Set background/foreground color 243 | $(fb.callback).css({ 244 | backgroundColor: fb.color, 245 | color: fb.hsl[2] > 0.5 ? '#000' : '#fff' 246 | }); 247 | 248 | // Change linked value 249 | $(fb.callback).each(function() { 250 | if (this.value && this.value != fb.color) { 251 | this.value = fb.color; 252 | } 253 | }); 254 | } 255 | else if (typeof fb.callback == 'function') { 256 | fb.callback.call(fb, fb.color); 257 | } 258 | } 259 | 260 | /** 261 | * Get absolute position of element 262 | */ 263 | fb.absolutePosition = function (el) { 264 | var r = { x: el.offsetLeft, y: el.offsetTop }; 265 | // Resolve relative to offsetParent 266 | if (el.offsetParent) { 267 | var tmp = fb.absolutePosition(el.offsetParent); 268 | r.x += tmp.x; 269 | r.y += tmp.y; 270 | } 271 | return r; 272 | }; 273 | 274 | /* Various color utility functions */ 275 | fb.pack = function (rgb) { 276 | var r = Math.round(rgb[0] * 255); 277 | var g = Math.round(rgb[1] * 255); 278 | var b = Math.round(rgb[2] * 255); 279 | return '#' + (r < 16 ? '0' : '') + r.toString(16) + 280 | (g < 16 ? '0' : '') + g.toString(16) + 281 | (b < 16 ? '0' : '') + b.toString(16); 282 | } 283 | 284 | fb.unpack = function (color) { 285 | if (color.length == 7) { 286 | return [parseInt('0x' + color.substring(1, 3)) / 255, 287 | parseInt('0x' + color.substring(3, 5)) / 255, 288 | parseInt('0x' + color.substring(5, 7)) / 255]; 289 | } 290 | else if (color.length == 4) { 291 | return [parseInt('0x' + color.substring(1, 2)) / 15, 292 | parseInt('0x' + color.substring(2, 3)) / 15, 293 | parseInt('0x' + color.substring(3, 4)) / 15]; 294 | } 295 | } 296 | 297 | fb.HSLToRGB = function (hsl) { 298 | var m1, m2, r, g, b; 299 | var h = hsl[0], s = hsl[1], l = hsl[2]; 300 | m2 = (l <= 0.5) ? l * (s + 1) : l + s - l*s; 301 | m1 = l * 2 - m2; 302 | return [this.hueToRGB(m1, m2, h+0.33333), 303 | this.hueToRGB(m1, m2, h), 304 | this.hueToRGB(m1, m2, h-0.33333)]; 305 | } 306 | 307 | fb.hueToRGB = function (m1, m2, h) { 308 | h = (h < 0) ? h + 1 : ((h > 1) ? h - 1 : h); 309 | if (h * 6 < 1) return m1 + (m2 - m1) * h * 6; 310 | if (h * 2 < 1) return m2; 311 | if (h * 3 < 2) return m1 + (m2 - m1) * (0.66666 - h) * 6; 312 | return m1; 313 | } 314 | 315 | fb.RGBToHSL = function (rgb) { 316 | var min, max, delta, h, s, l; 317 | var r = rgb[0], g = rgb[1], b = rgb[2]; 318 | min = Math.min(r, Math.min(g, b)); 319 | max = Math.max(r, Math.max(g, b)); 320 | delta = max - min; 321 | l = (min + max) / 2; 322 | s = 0; 323 | if (l > 0 && l < 1) { 324 | s = delta / (l < 0.5 ? (2 * l) : (2 - 2 * l)); 325 | } 326 | h = 0; 327 | if (delta > 0) { 328 | if (max == r && max != g) h += (g - b) / delta; 329 | if (max == g && max != b) h += (2 + (b - r) / delta); 330 | if (max == b && max != r) h += (4 + (r - g) / delta); 331 | h /= 6; 332 | } 333 | return [h, s, l]; 334 | } 335 | 336 | // Install mousedown handler (the others are set on the document on-demand) 337 | $('*', e).mousedown(fb.mousedown); 338 | 339 | // Init color 340 | fb.setColor('#000000'); 341 | 342 | // Set linked elements/callback 343 | if (callback) { 344 | fb.linkTo(callback); 345 | } 346 | } 347 | })(jQuery); -------------------------------------------------------------------------------- /js/jquery.blockUI.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery blockUI plugin 3 | * Version 2.38 (29-MAR-2011) 4 | * @requires jQuery v1.2.3 or later 5 | * 6 | * Examples at: http://malsup.com/jquery/block/ 7 | * Copyright (c) 2007-2010 M. Alsup 8 | * Dual licensed under the MIT and GPL licenses: 9 | * http://www.opensource.org/licenses/mit-license.php 10 | * http://www.gnu.org/licenses/gpl.html 11 | * 12 | * Thanks to Amir-Hossein Sobhi for some excellent contributions! 13 | */ 14 | 15 | ;(function($) { 16 | 17 | if (/1\.(0|1|2)\.(0|1|2)/.test($.fn.jquery) || /^1.1/.test($.fn.jquery)) { 18 | alert('blockUI requires jQuery v1.2.3 or later! You are using v' + $.fn.jquery); 19 | return; 20 | } 21 | 22 | $.fn._fadeIn = $.fn.fadeIn; 23 | 24 | var noOp = function() {}; 25 | 26 | // this bit is to ensure we don't call setExpression when we shouldn't (with extra muscle to handle 27 | // retarded userAgent strings on Vista) 28 | var mode = document.documentMode || 0; 29 | var setExpr = $.browser.msie && (($.browser.version < 8 && !mode) || mode < 8); 30 | var ie6 = $.browser.msie && /MSIE 6.0/.test(navigator.userAgent) && !mode; 31 | 32 | // global $ methods for blocking/unblocking the entire page 33 | $.blockUI = function(opts) { install(window, opts); }; 34 | $.unblockUI = function(opts) { remove(window, opts); }; 35 | 36 | // convenience method for quick growl-like notifications (http://www.google.com/search?q=growl) 37 | $.growlUI = function(title, message, timeout, onClose) { 38 | var $m = $('
'); 39 | if (title) $m.append('

'+title+'

'); 40 | if (message) $m.append('

'+message+'

'); 41 | if (timeout == undefined) timeout = 3000; 42 | $.blockUI({ 43 | message: $m, fadeIn: 700, fadeOut: 1000, centerY: false, 44 | timeout: timeout, showOverlay: false, 45 | onUnblock: onClose, 46 | css: $.blockUI.defaults.growlCSS 47 | }); 48 | }; 49 | 50 | // plugin method for blocking element content 51 | $.fn.block = function(opts) { 52 | return this.unblock({ fadeOut: 0 }).each(function() { 53 | if ($.css(this,'position') == 'static') 54 | this.style.position = 'relative'; 55 | if ($.browser.msie) 56 | this.style.zoom = 1; // force 'hasLayout' 57 | install(this, opts); 58 | }); 59 | }; 60 | 61 | // plugin method for unblocking element content 62 | $.fn.unblock = function(opts) { 63 | return this.each(function() { 64 | remove(this, opts); 65 | }); 66 | }; 67 | 68 | $.blockUI.version = 2.38; // 2nd generation blocking at no extra cost! 69 | 70 | // override these in your code to change the default behavior and style 71 | $.blockUI.defaults = { 72 | // message displayed when blocking (use null for no message) 73 | message: '

Please wait...

', 74 | 75 | title: null, // title string; only used when theme == true 76 | draggable: true, // only used when theme == true (requires jquery-ui.js to be loaded) 77 | 78 | theme: false, // set to true to use with jQuery UI themes 79 | 80 | // styles for the message when blocking; if you wish to disable 81 | // these and use an external stylesheet then do this in your code: 82 | // $.blockUI.defaults.css = {}; 83 | css: { 84 | padding: 0, 85 | margin: 0, 86 | width: '30%', 87 | top: '40%', 88 | left: '35%', 89 | textAlign: 'center', 90 | color: '#000', 91 | border: '3px solid #aaa', 92 | backgroundColor:'#fff', 93 | cursor: 'wait' 94 | }, 95 | 96 | // minimal style set used when themes are used 97 | themedCSS: { 98 | width: '30%', 99 | top: '40%', 100 | left: '35%' 101 | }, 102 | 103 | // styles for the overlay 104 | overlayCSS: { 105 | backgroundColor: '#000', 106 | opacity: 0.6, 107 | cursor: 'wait' 108 | }, 109 | 110 | // styles applied when using $.growlUI 111 | growlCSS: { 112 | width: '350px', 113 | top: '10px', 114 | left: '', 115 | right: '10px', 116 | border: 'none', 117 | padding: '5px', 118 | opacity: 0.6, 119 | cursor: 'default', 120 | color: '#fff', 121 | backgroundColor: '#000', 122 | '-webkit-border-radius': '10px', 123 | '-moz-border-radius': '10px', 124 | 'border-radius': '10px' 125 | }, 126 | 127 | // IE issues: 'about:blank' fails on HTTPS and javascript:false is s-l-o-w 128 | // (hat tip to Jorge H. N. de Vasconcelos) 129 | iframeSrc: /^https/i.test(window.location.href || '') ? 'javascript:false' : 'about:blank', 130 | 131 | // force usage of iframe in non-IE browsers (handy for blocking applets) 132 | forceIframe: false, 133 | 134 | // z-index for the blocking overlay 135 | baseZ: 1000, 136 | 137 | // set these to true to have the message automatically centered 138 | centerX: true, // <-- only effects element blocking (page block controlled via css above) 139 | centerY: true, 140 | 141 | // allow body element to be stetched in ie6; this makes blocking look better 142 | // on "short" pages. disable if you wish to prevent changes to the body height 143 | allowBodyStretch: true, 144 | 145 | // enable if you want key and mouse events to be disabled for content that is blocked 146 | bindEvents: true, 147 | 148 | // be default blockUI will supress tab navigation from leaving blocking content 149 | // (if bindEvents is true) 150 | constrainTabKey: true, 151 | 152 | // fadeIn time in millis; set to 0 to disable fadeIn on block 153 | fadeIn: 200, 154 | 155 | // fadeOut time in millis; set to 0 to disable fadeOut on unblock 156 | fadeOut: 400, 157 | 158 | // time in millis to wait before auto-unblocking; set to 0 to disable auto-unblock 159 | timeout: 0, 160 | 161 | // disable if you don't want to show the overlay 162 | showOverlay: true, 163 | 164 | // if true, focus will be placed in the first available input field when 165 | // page blocking 166 | focusInput: true, 167 | 168 | // suppresses the use of overlay styles on FF/Linux (due to performance issues with opacity) 169 | applyPlatformOpacityRules: true, 170 | 171 | // callback method invoked when fadeIn has completed and blocking message is visible 172 | onBlock: null, 173 | 174 | // callback method invoked when unblocking has completed; the callback is 175 | // passed the element that has been unblocked (which is the window object for page 176 | // blocks) and the options that were passed to the unblock call: 177 | // onUnblock(element, options) 178 | onUnblock: null, 179 | 180 | // don't ask; if you really must know: http://groups.google.com/group/jquery-en/browse_thread/thread/36640a8730503595/2f6a79a77a78e493#2f6a79a77a78e493 181 | quirksmodeOffsetHack: 4, 182 | 183 | // class name of the message block 184 | blockMsgClass: 'blockMsg' 185 | }; 186 | 187 | // private data and functions follow... 188 | 189 | var pageBlock = null; 190 | var pageBlockEls = []; 191 | 192 | function install(el, opts) { 193 | var full = (el == window); 194 | var msg = opts && opts.message !== undefined ? opts.message : undefined; 195 | opts = $.extend({}, $.blockUI.defaults, opts || {}); 196 | opts.overlayCSS = $.extend({}, $.blockUI.defaults.overlayCSS, opts.overlayCSS || {}); 197 | var css = $.extend({}, $.blockUI.defaults.css, opts.css || {}); 198 | var themedCSS = $.extend({}, $.blockUI.defaults.themedCSS, opts.themedCSS || {}); 199 | msg = msg === undefined ? opts.message : msg; 200 | 201 | // remove the current block (if there is one) 202 | if (full && pageBlock) 203 | remove(window, {fadeOut:0}); 204 | 205 | // if an existing element is being used as the blocking content then we capture 206 | // its current place in the DOM (and current display style) so we can restore 207 | // it when we unblock 208 | if (msg && typeof msg != 'string' && (msg.parentNode || msg.jquery)) { 209 | var node = msg.jquery ? msg[0] : msg; 210 | var data = {}; 211 | $(el).data('blockUI.history', data); 212 | data.el = node; 213 | data.parent = node.parentNode; 214 | data.display = node.style.display; 215 | data.position = node.style.position; 216 | if (data.parent) 217 | data.parent.removeChild(node); 218 | } 219 | 220 | var z = opts.baseZ; 221 | 222 | // blockUI uses 3 layers for blocking, for simplicity they are all used on every platform; 223 | // layer1 is the iframe layer which is used to supress bleed through of underlying content 224 | // layer2 is the overlay layer which has opacity and a wait cursor (by default) 225 | // layer3 is the message content that is displayed while blocking 226 | 227 | var lyr1 = ($.browser.msie || opts.forceIframe) 228 | ? $('') 229 | : $(''); 230 | 231 | var lyr2 = opts.theme 232 | ? $('') 233 | : $(''); 234 | 235 | var lyr3, s; 236 | if (opts.theme && full) { 237 | s = ''; 241 | } 242 | else if (opts.theme) { 243 | s = ''; 247 | } 248 | else if (full) { 249 | s = ''; 250 | } 251 | else { 252 | s = ''; 253 | } 254 | lyr3 = $(s); 255 | 256 | // if we have a message, style it 257 | if (msg) { 258 | if (opts.theme) { 259 | lyr3.css(themedCSS); 260 | lyr3.addClass('ui-widget-content'); 261 | } 262 | else 263 | lyr3.css(css); 264 | } 265 | 266 | // style the overlay 267 | if (!opts.theme && (!opts.applyPlatformOpacityRules || !($.browser.mozilla && /Linux/.test(navigator.platform)))) 268 | lyr2.css(opts.overlayCSS); 269 | lyr2.css('position', full ? 'fixed' : 'absolute'); 270 | 271 | // make iframe layer transparent in IE 272 | if ($.browser.msie || opts.forceIframe) 273 | lyr1.css('opacity',0.0); 274 | 275 | //$([lyr1[0],lyr2[0],lyr3[0]]).appendTo(full ? 'body' : el); 276 | var layers = [lyr1,lyr2,lyr3], $par = full ? $('body') : $(el); 277 | $.each(layers, function() { 278 | this.appendTo($par); 279 | }); 280 | 281 | if (opts.theme && opts.draggable && $.fn.draggable) { 282 | lyr3.draggable({ 283 | handle: '.ui-dialog-titlebar', 284 | cancel: 'li' 285 | }); 286 | } 287 | 288 | // ie7 must use absolute positioning in quirks mode and to account for activex issues (when scrolling) 289 | var expr = setExpr && (!$.boxModel || $('object,embed', full ? null : el).length > 0); 290 | if (ie6 || expr) { 291 | // give body 100% height 292 | if (full && opts.allowBodyStretch && $.boxModel) 293 | $('html,body').css('height','100%'); 294 | 295 | // fix ie6 issue when blocked element has a border width 296 | if ((ie6 || !$.boxModel) && !full) { 297 | var t = sz(el,'borderTopWidth'), l = sz(el,'borderLeftWidth'); 298 | var fixT = t ? '(0 - '+t+')' : 0; 299 | var fixL = l ? '(0 - '+l+')' : 0; 300 | } 301 | 302 | // simulate fixed position 303 | $.each([lyr1,lyr2,lyr3], function(i,o) { 304 | var s = o[0].style; 305 | s.position = 'absolute'; 306 | if (i < 2) { 307 | full ? s.setExpression('height','Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.boxModel?0:'+opts.quirksmodeOffsetHack+') + "px"') 308 | : s.setExpression('height','this.parentNode.offsetHeight + "px"'); 309 | full ? s.setExpression('width','jQuery.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"') 310 | : s.setExpression('width','this.parentNode.offsetWidth + "px"'); 311 | if (fixL) s.setExpression('left', fixL); 312 | if (fixT) s.setExpression('top', fixT); 313 | } 314 | else if (opts.centerY) { 315 | if (full) s.setExpression('top','(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"'); 316 | s.marginTop = 0; 317 | } 318 | else if (!opts.centerY && full) { 319 | var top = (opts.css && opts.css.top) ? parseInt(opts.css.top) : 0; 320 | var expression = '((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + '+top+') + "px"'; 321 | s.setExpression('top',expression); 322 | } 323 | }); 324 | } 325 | 326 | // show the message 327 | if (msg) { 328 | if (opts.theme) 329 | lyr3.find('.ui-widget-content').append(msg); 330 | else 331 | lyr3.append(msg); 332 | if (msg.jquery || msg.nodeType) 333 | $(msg).show(); 334 | } 335 | 336 | if (($.browser.msie || opts.forceIframe) && opts.showOverlay) 337 | lyr1.show(); // opacity is zero 338 | if (opts.fadeIn) { 339 | var cb = opts.onBlock ? opts.onBlock : noOp; 340 | var cb1 = (opts.showOverlay && !msg) ? cb : noOp; 341 | var cb2 = msg ? cb : noOp; 342 | if (opts.showOverlay) 343 | lyr2._fadeIn(opts.fadeIn, cb1); 344 | if (msg) 345 | lyr3._fadeIn(opts.fadeIn, cb2); 346 | } 347 | else { 348 | if (opts.showOverlay) 349 | lyr2.show(); 350 | if (msg) 351 | lyr3.show(); 352 | if (opts.onBlock) 353 | opts.onBlock(); 354 | } 355 | 356 | // bind key and mouse events 357 | bind(1, el, opts); 358 | 359 | if (full) { 360 | pageBlock = lyr3[0]; 361 | pageBlockEls = $(':input:enabled:visible',pageBlock); 362 | if (opts.focusInput) 363 | setTimeout(focus, 20); 364 | } 365 | else 366 | center(lyr3[0], opts.centerX, opts.centerY); 367 | 368 | if (opts.timeout) { 369 | // auto-unblock 370 | var to = setTimeout(function() { 371 | full ? $.unblockUI(opts) : $(el).unblock(opts); 372 | }, opts.timeout); 373 | $(el).data('blockUI.timeout', to); 374 | } 375 | }; 376 | 377 | // remove the block 378 | function remove(el, opts) { 379 | var full = (el == window); 380 | var $el = $(el); 381 | var data = $el.data('blockUI.history'); 382 | var to = $el.data('blockUI.timeout'); 383 | if (to) { 384 | clearTimeout(to); 385 | $el.removeData('blockUI.timeout'); 386 | } 387 | opts = $.extend({}, $.blockUI.defaults, opts || {}); 388 | bind(0, el, opts); // unbind events 389 | 390 | var els; 391 | if (full) // crazy selector to handle odd field errors in ie6/7 392 | els = $('body').children().filter('.blockUI').add('body > .blockUI'); 393 | else 394 | els = $('.blockUI', el); 395 | 396 | if (full) 397 | pageBlock = pageBlockEls = null; 398 | 399 | if (opts.fadeOut) { 400 | els.fadeOut(opts.fadeOut); 401 | setTimeout(function() { reset(els,data,opts,el); }, opts.fadeOut); 402 | } 403 | else 404 | reset(els, data, opts, el); 405 | }; 406 | 407 | // move blocking element back into the DOM where it started 408 | function reset(els,data,opts,el) { 409 | els.each(function(i,o) { 410 | // remove via DOM calls so we don't lose event handlers 411 | if (this.parentNode) 412 | this.parentNode.removeChild(this); 413 | }); 414 | 415 | if (data && data.el) { 416 | data.el.style.display = data.display; 417 | data.el.style.position = data.position; 418 | if (data.parent) 419 | data.parent.appendChild(data.el); 420 | $(el).removeData('blockUI.history'); 421 | } 422 | 423 | if (typeof opts.onUnblock == 'function') 424 | opts.onUnblock(el,opts); 425 | }; 426 | 427 | // bind/unbind the handler 428 | function bind(b, el, opts) { 429 | var full = el == window, $el = $(el); 430 | 431 | // don't bother unbinding if there is nothing to unbind 432 | if (!b && (full && !pageBlock || !full && !$el.data('blockUI.isBlocked'))) 433 | return; 434 | if (!full) 435 | $el.data('blockUI.isBlocked', b); 436 | 437 | // don't bind events when overlay is not in use or if bindEvents is false 438 | if (!opts.bindEvents || (b && !opts.showOverlay)) 439 | return; 440 | 441 | // bind anchors and inputs for mouse and key events 442 | var events = 'mousedown mouseup keydown keypress'; 443 | b ? $(document).bind(events, opts, handler) : $(document).unbind(events, handler); 444 | 445 | // former impl... 446 | // var $e = $('a,:input'); 447 | // b ? $e.bind(events, opts, handler) : $e.unbind(events, handler); 448 | }; 449 | 450 | // event handler to suppress keyboard/mouse events when blocking 451 | function handler(e) { 452 | // allow tab navigation (conditionally) 453 | if (e.keyCode && e.keyCode == 9) { 454 | if (pageBlock && e.data.constrainTabKey) { 455 | var els = pageBlockEls; 456 | var fwd = !e.shiftKey && e.target === els[els.length-1]; 457 | var back = e.shiftKey && e.target === els[0]; 458 | if (fwd || back) { 459 | setTimeout(function(){focus(back)},10); 460 | return false; 461 | } 462 | } 463 | } 464 | var opts = e.data; 465 | // allow events within the message content 466 | if ($(e.target).parents('div.' + opts.blockMsgClass).length > 0) 467 | return true; 468 | 469 | // allow events for content that is not being blocked 470 | return $(e.target).parents().children().filter('div.blockUI').length == 0; 471 | }; 472 | 473 | function focus(back) { 474 | if (!pageBlockEls) 475 | return; 476 | var e = pageBlockEls[back===true ? pageBlockEls.length-1 : 0]; 477 | if (e) 478 | e.focus(); 479 | }; 480 | 481 | function center(el, x, y) { 482 | var p = el.parentNode, s = el.style; 483 | var l = ((p.offsetWidth - el.offsetWidth)/2) - sz(p,'borderLeftWidth'); 484 | var t = ((p.offsetHeight - el.offsetHeight)/2) - sz(p,'borderTopWidth'); 485 | if (x) s.left = l > 0 ? (l+'px') : '0'; 486 | if (y) s.top = t > 0 ? (t+'px') : '0'; 487 | }; 488 | 489 | function sz(el, p) { 490 | return parseInt($.css(el,p))||0; 491 | }; 492 | 493 | })(jQuery); 494 | -------------------------------------------------------------------------------- /js/chat.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Chat plugin javascript 3 | * 4 | * @todo Make this more OO when we have time 5 | * 6 | * @author S H Mohanjith 7 | * @since 1.0.1 8 | */ 9 | 10 | var chat_localized; 11 | 12 | if (chat_localized) { 13 | var instanse = false; 14 | var logging_out = false; 15 | var mes; 16 | var file; 17 | var postid; 18 | var currentContent = []; 19 | var lastCheck = []; 20 | var last_mid = []; 21 | var chat_refresh_timer = []; 22 | var mids = []; 23 | var chat; 24 | var pingSound; 25 | var lastUpdate = []; 26 | 27 | var name = chat_localized["name"]; 28 | var vip = chat_localized["vip"]; 29 | var sounds = chat_localized["sounds"]; 30 | var post_id = chat_localized["post_id"]; 31 | 32 | function Chat() { 33 | this.update = updateChat; 34 | this.send = sendChat; 35 | this.setup = setupChat; 36 | this.clear = clearChat; 37 | this.archive = archiveChat; 38 | } 39 | 40 | function updateChat(sounds) { 41 | if (!instanse) { 42 | jQuery('.chat-post-id').each(function () { 43 | var instanse = true; 44 | var pid = jQuery(this).val(); 45 | if (!lastCheck[pid]) { 46 | lastCheck[pid] = 0; 47 | last_mid[pid] = 0; 48 | lastUpdate[pid] = new Date().getTime(); 49 | } 50 | if (!(pid == 1 && jQuery('#chat-block-site').hasClass('closed'))) { 51 | jQuery.ajax({ 52 | type: "POST", 53 | url: chat_localized["url"], 54 | data: { 55 | 'function': 'update', 56 | 'cid': pid, 57 | 'file': file, 58 | 'action': 'chatProcess', 59 | 'avatar': chat_localized["avatar_" + pid], 60 | 'emoticons': chat_localized["avatar_" + pid], 61 | 'date_color': chat_localized["date_color_" + pid], 62 | 'name_color': chat_localized["name_color_" + pid], 63 | 'moderator_name_color': chat_localized["moderator_name_color_" + pid], 64 | 'text_color': chat_localized["text_color_" + pid], 65 | 'date_show': chat_localized["date_show_" + pid], 66 | 'time_show': chat_localized["time_show_" + pid], 67 | 'since': lastCheck[pid], 68 | 'since_id': last_mid[pid], 69 | 'moderator_roles': chat_localized["moderator_roles_" + pid] 70 | }, 71 | dataType: "json", 72 | success: function (data) { 73 | if (data && data.text) { 74 | var updateContent = ''; 75 | for (i in data.text) { 76 | updateContent = updateContent + "

" + data.text[i] + "

"; 77 | last_mid[pid] = i; 78 | } 79 | 80 | lastCheck[pid] = Math.max(data.time, lastCheck[pid]); 81 | 82 | /*if (data.text.length > 0) { 83 | jQuery('#chat-area-'+pid).animate({ scrollTop: jQuery('#chat-area-'+pid).attr("scrollHeight") }, 2000); 84 | } 85 | if ( sounds !== 'disabled' && chat_localized['sound_'+pid] !== 'disabled' && pingSound ) { 86 | pingSound.play('notify'); 87 | }*/ 88 | 89 | if (currentContent[pid] !== updateContent) { 90 | if (updateContent !== '') { 91 | jQuery('#chat-area-' + pid).append(jQuery(updateContent.replace(currentContent[pid], ''))); 92 | currentContent[pid] = updateContent; 93 | 94 | var container = jQuery('#chat-area-' + pid); 95 | var row = jQuery('div.row', container).last(); 96 | if (row.length) { 97 | var r_position = row.position(); 98 | var c_scrollTop = container.scrollTop() + r_position.top; 99 | 100 | jQuery('#chat-area-' + pid).animate({scrollTop: c_scrollTop}, 1000); 101 | } 102 | //jQuery('#chat-area-'+pid).animate({ scrollTop: jQuery('#chat-area-'+pid).attr("scrollHeight") }, 2000); 103 | 104 | if (sounds !== 'disabled' && chat_localized['sound_' + pid] !== 'disabled' && pingSound) { 105 | pingSound.play('notify'); 106 | } 107 | } 108 | } 109 | } 110 | instanse = false; 111 | lastUpdate[pid] = new Date().getTime(); 112 | } 113 | } 114 | ); 115 | 116 | if (new Date().getTime() > lastUpdate[pid] + (chat_localized["interval"] * 1000) * 60) { 117 | jQuery('#chat-send-' + pid).attr('disabled', true); 118 | } else { 119 | jQuery('#chat-send-' + pid).attr('disabled', false); 120 | } 121 | } 122 | }); 123 | } else { 124 | //setTimeout(updateChat, 1500); 125 | } 126 | } 127 | 128 | function sendChat(pid, message, name, vip, sounds, type) { 129 | message = jQuery.trim(message); 130 | name = base64_encode(jQuery.trim(name)); 131 | jQuery.ajax({ 132 | type: "POST", 133 | url: chat_localized["url"], 134 | data: { 135 | 'function': 'send', 136 | 'cid': pid, 137 | 'message': message, 138 | 'name': name, 139 | 'type': type, 140 | 'vip': vip, 141 | 'file': file, 142 | 'action': 'chatProcess', 143 | 'moderator_roles': chat_localized["moderator_roles_" + pid] 144 | }, 145 | dataType: "json", 146 | success: function (data) { 147 | updateChat(sounds); 148 | } 149 | }); 150 | } 151 | 152 | function clearChat(pid) { 153 | jQuery.ajax({ 154 | type: "POST", 155 | url: chat_localized["url"], 156 | data: { 157 | 'cid': pid, 158 | 'vip': vip, 159 | 'file': file, 160 | 'action': 'chatClear', 161 | 'since': lastCheck[pid] 162 | }, 163 | dataType: "json", 164 | success: function (data) { 165 | window.location.reload(); 166 | } 167 | }); 168 | } 169 | 170 | function archiveChat(pid) { 171 | jQuery.ajax({ 172 | type: "POST", 173 | url: chat_localized["url"], 174 | data: { 175 | 'cid': pid, 176 | 'vip': vip, 177 | 'file': file, 178 | 'action': 'chatArchive', 179 | 'since': lastCheck[pid] 180 | }, 181 | dataType: "json", 182 | success: function (data) { 183 | window.location.reload(); 184 | } 185 | }); 186 | } 187 | 188 | function setupChat(pid, sounds) { 189 | postid = pid; 190 | chat_refresh_timer[pid] = setInterval("updateChat(sounds)", chat_localized["interval"] * 1000); 191 | updateChat(sounds); 192 | } 193 | 194 | /** 195 | * Chat setup 196 | */ 197 | 198 | name = name.replace(/(<([^>]+)>)/ig, ""); 199 | 200 | chat = new Chat(); 201 | chat.setup(post_id, sounds); 202 | 203 | (function ($) { 204 | $(document).ready(function () { 205 | // Sound manager 206 | soundManager.url = chat_localized.plugin_url + 'swf/'; 207 | soundManager.onload = function () { 208 | pingSound = soundManager.createSound({ 209 | id: 'ping', 210 | url: chat_localized.plugin_url + '/audio/ping.mp3', 211 | volume: 100 212 | }); 213 | }; 214 | 215 | if (!$('#chat-block-site').hasClass('closed') && $('#chat-box-1').height() > $(window).height()) { 216 | $('#chat-block-inner').height($(window).height() - 50); 217 | if ($('#chat-block-site').hasClass('free-width')) { 218 | width = Math.max(425, $('#chat-box-1').width()); 219 | } else { 220 | width = $('#chat-box-1').width(); 221 | } 222 | $('#chat-block-site').width(width + 15); 223 | } else { 224 | if ($('#chat-block-inner .chat-login-wrap').hasClass('chat-login-wrap')) { 225 | $('#chat-block-inner').height($('#chat-box-1').height() + 50); 226 | } else { 227 | $('#chat-block-inner').height($('#chat-box-1').height()); 228 | } 229 | } 230 | 231 | $(window).resize(function () { 232 | if (!$('#chat-block-site').hasClass('closed')) { 233 | if ($('#chat-box-1').height() > $(window).height()) { 234 | $('#chat-block-inner').height($(window).height() - 50); 235 | if ($('#chat-block-site').hasClass('free-width')) { 236 | width = Math.max(425, $('#chat-box-1').width()); 237 | } else { 238 | width = $('#chat-box-1').width(); 239 | } 240 | $('#chat-block-site').width(width + 15); 241 | } 242 | 243 | if ($(window).height() > $('#chat-box-1').height()) { 244 | $('#chat-block-inner').height($('#chat-box-1').height() + 5); 245 | if ($('#chat-block-site').hasClass('free-width')) { 246 | width = Math.max(425, $('#chat-box-1').width()); 247 | } else { 248 | width = $('#chat-box-1').width(); 249 | } 250 | $('#chat-block-site').width(width); 251 | } 252 | } 253 | $('.chat-send').each(function () { 254 | $(this).width($(this).closest('.chat-send-wrap').width() - 12); 255 | }) 256 | }); 257 | 258 | $(".chat-send").keydown(function (event) { 259 | var key = event.which; 260 | if (key >= 33) { 261 | var maxLength = 2000; 262 | var length = this.value.length; 263 | 264 | if (length >= maxLength) { 265 | event.preventDefault(); 266 | } 267 | } 268 | }); 269 | 270 | $('.chat-send').keyup(function (e) { 271 | if (e.keyCode == 13) { 272 | var text = $(this).val(); 273 | var maxLength = 2000; 274 | var length = text.length; 275 | 276 | if (length <= maxLength + 1) { 277 | cid = $(this).closest('form').find('.chat-post-id').val(); 278 | chat.send(cid, text, chat_localized['name_' + cid], vip, chat_localized['sound_' + cid], chat_localized['type_' + cid]); 279 | $(this).val(""); 280 | } else { 281 | $(this).val(text.substring(0, maxLength)); 282 | } 283 | } 284 | }); 285 | 286 | $('.chat-clear').click(function (e) { 287 | chat.clear($(this).closest('form').find('.chat-post-id').val()); 288 | $(this).attr("disabled", "disabled"); 289 | $(this).val(chat_localized.please_wait); 290 | }); 291 | 292 | $('.chat-archive').click(function (e) { 293 | chat.archive($(this).closest('form').find('.chat-post-id').val()); 294 | $(this).attr("disabled", "disabled"); 295 | $(this).val(chat_localized.please_wait); 296 | }); 297 | 298 | $('.chat-clear').attr("disabled", false); 299 | $('.chat-archive').attr("disabled", false); 300 | 301 | $('div.chat-emoticons-list span.chat-emoticon').click(function () { 302 | cid = $(this).closest('div').attr('id').replace(/chat\-emoticons\-list\-/, ''); 303 | $('#chat-send-' + cid).val($('#chat-send-' + cid).val() + ' ' + $(this). find('img').attr('alt')).focus(); 304 | }); 305 | 306 | $('#chat-block-header').click(function () { 307 | if ($('#chat-toggle-button').attr('alt') == '-') { 308 | $('#chat-block-site').addClass('closed'); 309 | $('#chat-toggle-button').attr('alt', '+'); 310 | $('#chat-toggle-button').attr('src', chat_localized.maximize_button); 311 | $('#chat-toggle-button').attr('title', chat_localized.maximize); 312 | $.cookie('chat_site_wide_state_104', 'closed', {expires: 7, path: '/'}); 313 | 314 | } else { 315 | $('#chat-block-site').removeClass('closed'); 316 | $('#chat-toggle-button').attr('alt', '-'); 317 | $('#chat-toggle-button').attr('src', chat_localized.minimize_button); 318 | $('#chat-toggle-button').attr('title', chat_localized.minimize); 319 | $.cookie('chat_site_wide_state_104', 'open', {expires: 7, path: '/'}); 320 | } 321 | $(window).resize(); 322 | }); 323 | 324 | $('form.chat-login').submit(function () { 325 | if ($.cookie('chat_stateless_user_type_104') && $.cookie('chat_stateless_user_type_104').match(',')) { 326 | login_options = $.cookie('chat_stateless_user_type_104').split(','); 327 | if (!$.cookie('chat_stateless_user_type_104').match('public_user')) { 328 | login_options.push('public_user'); 329 | } 330 | } else { 331 | login_options = [$.cookie('chat_stateless_user_type_104'), 'public_user']; 332 | } 333 | $.cookie('chat_stateless_user_type_104', login_options.join(','), {expires: 7, path: '/'}); 334 | $.cookie('chat_stateless_user_name_public_user', $(this).find('input.chat-login-name').val(), { 335 | expires: 7, 336 | path: '/' 337 | }); 338 | $.cookie('chat_stateless_user_image_public_user', $(this).find('input.chat-login-email').val(), { 339 | expires: 7, 340 | path: '/' 341 | }); 342 | 343 | window.location.reload(); 344 | return false; 345 | }); 346 | 347 | if ($.cookie('chat_site_wide_state_104') == 'open') { 348 | $('#chat-block-site').removeClass('closed'); 349 | $('#chat-toggle-button').attr('alt', '-'); 350 | $('#chat-toggle-button').attr('src', chat_localized.minimize_button); 351 | $('#chat-toggle-button').attr('title', chat_localized.minimize); 352 | $.cookie('chat_site_wide_state_104', 'open', {expires: 7, path: '/'}); 353 | } 354 | 355 | $(window).resize(); 356 | }); 357 | })(jQuery); 358 | 359 | 360 | (function ($) { 361 | if (chat_localized['twitter_active']) { 362 | twttr.anywhere(function (T) { 363 | if (T.isConnected()) { 364 | $(".chat-twitter-signin-btn").append(''); 365 | $(".chat-twitter-signout-btn").bind("click", function () { 366 | twttr.anywhere.signOut(); 367 | }); 368 | 369 | if ($.cookie('chat_stateless_user_type_104') && $.cookie('chat_stateless_user_type_104').match(',')) { 370 | login_options = $.cookie('chat_stateless_user_type_104').split(',') 371 | if (!$.cookie('chat_stateless_user_type_104').match('twitter')) { 372 | login_options.push('twitter'); 373 | } 374 | } else { 375 | login_options = [$.cookie('chat_stateless_user_type_104'), 'twitter']; 376 | } 377 | 378 | $.cookie('chat_stateless_user_type_104', login_options.join(','), {expires: 7, path: '/'}); 379 | $.cookie('chat_stateless_user_name_twitter', T.currentUser.data('name'), {expires: 7, path: '/'}); 380 | $.cookie('chat_stateless_user_image_twitter', T.currentUser.data('profile_image_url'), { 381 | expires: 7, 382 | path: '/' 383 | }); 384 | } else { 385 | $(".chat-twitter-signin-btn").each(function () { 386 | T("#" + $(this).attr('id')).connectButton({size: "large"}); 387 | }); 388 | } 389 | 390 | T.bind("authComplete", function (e, user) { 391 | if ($.cookie('chat_stateless_user_type_104') && $.cookie('chat_stateless_user_type_104').match(',')) { 392 | login_options = $.cookie('chat_stateless_user_type_104').split(','); 393 | if (!$.cookie('chat_stateless_user_type_104').match('twitter')) { 394 | login_options.push('twitter'); 395 | } 396 | } else { 397 | login_options = [$.cookie('chat_stateless_user_type_104'), 'twitter']; 398 | } 399 | 400 | $.cookie('chat_stateless_user_type_104', login_options.join(','), {expires: 7, path: '/'}); 401 | $.cookie('chat_stateless_user_name_twitter', T.currentUser.data('name'), {expires: 7, path: '/'}); 402 | $.cookie('chat_stateless_user_image_twitter', T.currentUser.data('profile_image_url'), { 403 | expires: 7, 404 | path: '/' 405 | }); 406 | window.location.reload(); 407 | }); 408 | 409 | T.bind("signOut", function (e) { 410 | $.cookie('chat_stateless_user_type_104', $.cookie('chat_stateless_user_type_104').replace(',twitter', ''), {path: '/'}); 411 | $.cookie('chat_stateless_user_name_twitter', null, {path: '/'}); 412 | $.cookie('chat_stateless_user_image_twitter', null, {path: '/'}); 413 | 414 | if (!logging_out) { 415 | window.location.reload(); 416 | } 417 | }); 418 | }); 419 | } 420 | 421 | if (chat_localized['facebook_active']) { 422 | $(".chat-facebook-signin-btn").html(''); 423 | 424 | $("body").append('
'); 425 | 426 | FB.init({appId: chat_localized.facebook_app_id, status: true, cookie: true, xfbml: true}); 427 | FB.Event.subscribe('auth.sessionChange', function (response) { 428 | if (!response.session) { 429 | $.cookie('chat_stateless_user_type_104', $.cookie('chat_stateless_user_type_104').replace(',facebook', ''), {path: '/'}); 430 | $.cookie('chat_stateless_user_name_facebook', null, {path: '/'}); 431 | $.cookie('chat_stateless_user_image_facebook', null, {path: '/'}); 432 | } 433 | if (!logging_out) { 434 | window.location.reload(); 435 | } 436 | }); 437 | FB.getLoginStatus(function (response) { 438 | if (response.session) { 439 | $(".chat-facebook-signin-btn").html(''); 440 | $(".chat-facebook-signout-btn").bind("click", function () { 441 | FB.logout(); 442 | }); 443 | } 444 | }); 445 | } 446 | 447 | $('input.chat-logout-submit').click(function () { 448 | try { 449 | if ($.cookie('chat_stateless_user_type_104') && $.cookie('chat_stateless_user_type_104').match('public_user')) { 450 | $.cookie('chat_stateless_user_type_104', $.cookie('chat_stateless_user_type_104').replace(',public_user', ''), {path: '/'}); 451 | $.cookie('chat_stateless_user_name_public_user', null, {path: '/'}); 452 | $.cookie('chat_stateless_user_image_public_user', null, {path: '/'}); 453 | 454 | window.location.reload(); 455 | } 456 | 457 | if ($.cookie('chat_stateless_user_type_104') && $.cookie('chat_stateless_user_type_104').match('facebook')) { 458 | if (chat_localized['facebook_active']) { 459 | FB.logout(); 460 | } 461 | } 462 | 463 | if ($.cookie('chat_stateless_user_type_104') && $.cookie('chat_stateless_user_type_104').match('twitter')) { 464 | if (chat_localized['twitter_active']) { 465 | twttr.anywhere(function (T) { 466 | twttr.anywhere.signOut(); 467 | }); 468 | } 469 | } 470 | } catch (e) { 471 | $.cookie('chat_stateless_user_type_104', '', {path: '/'}); 472 | $.cookie('chat_stateless_user_name_public_user', null, {path: '/'}); 473 | $.cookie('chat_stateless_user_image_public_user', null, {path: '/'}); 474 | $.cookie('chat_stateless_user_name_twitter', null, {path: '/'}); 475 | $.cookie('chat_stateless_user_image_twitter', null, {path: '/'}); 476 | $.cookie('chat_stateless_user_name_facebook', null, {path: '/'}); 477 | $.cookie('chat_stateless_user_image_facebook', null, {path: '/'}); 478 | 479 | window.location.reload(); 480 | } 481 | }); 482 | })(jQuery); 483 | } 484 | 485 | /** 486 | * From php.js 487 | * 488 | * See base64.min.js for license and copyright 489 | **/ 490 | function base64_decode(data) { 491 | var b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; 492 | var o1, o2, o3, h1, h2, h3, h4, bits, i = 0, ac = 0, dec = "", tmp_arr = []; 493 | if (!data) { 494 | return data; 495 | } 496 | data += ''; 497 | do { 498 | h1 = b64.indexOf(data.charAt(i++)); 499 | h2 = b64.indexOf(data.charAt(i++)); 500 | h3 = b64.indexOf(data.charAt(i++)); 501 | h4 = b64.indexOf(data.charAt(i++)); 502 | bits = h1 << 18 | h2 << 12 | h3 << 6 | h4; 503 | o1 = bits >> 16 & 0xff; 504 | o2 = bits >> 8 & 0xff; 505 | o3 = bits & 0xff; 506 | if (h3 == 64) { 507 | tmp_arr[ac++] = String.fromCharCode(o1); 508 | } else if (h4 == 64) { 509 | tmp_arr[ac++] = String.fromCharCode(o1, o2); 510 | } else { 511 | tmp_arr[ac++] = String.fromCharCode(o1, o2, o3); 512 | } 513 | } while (i < data.length); 514 | dec = tmp_arr.join(''); 515 | dec = this.utf8_decode(dec); 516 | return dec; 517 | } 518 | function base64_encode(data) { 519 | var b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; 520 | var o1, o2, o3, h1, h2, h3, h4, bits, i = 0, ac = 0, enc = "", tmp_arr = []; 521 | if (!data) { 522 | return data; 523 | } 524 | data = this.utf8_encode(data + ''); 525 | do { 526 | o1 = data.charCodeAt(i++); 527 | o2 = data.charCodeAt(i++); 528 | o3 = data.charCodeAt(i++); 529 | bits = o1 << 16 | o2 << 8 | o3; 530 | h1 = bits >> 18 & 0x3f; 531 | h2 = bits >> 12 & 0x3f; 532 | h3 = bits >> 6 & 0x3f; 533 | h4 = bits & 0x3f; 534 | tmp_arr[ac++] = b64.charAt(h1) + b64.charAt(h2) + b64.charAt(h3) + b64.charAt(h4); 535 | } while (i < data.length); 536 | enc = tmp_arr.join(''); 537 | switch (data.length % 3) { 538 | case 1: 539 | enc = enc.slice(0, -2) + '=='; 540 | break; 541 | case 2: 542 | enc = enc.slice(0, -1) + '='; 543 | break; 544 | } 545 | return enc; 546 | } 547 | function utf8_decode(str_data) { 548 | var tmp_arr = [], i = 0, ac = 0, c1 = 0, c2 = 0, c3 = 0; 549 | str_data += ''; 550 | while (i < str_data.length) { 551 | c1 = str_data.charCodeAt(i); 552 | if (c1 < 128) { 553 | tmp_arr[ac++] = String.fromCharCode(c1); 554 | i++; 555 | } else if ((c1 > 191) && (c1 < 224)) { 556 | c2 = str_data.charCodeAt(i + 1); 557 | tmp_arr[ac++] = String.fromCharCode(((c1 & 31) << 6) | (c2 & 63)); 558 | i += 2; 559 | } else { 560 | c2 = str_data.charCodeAt(i + 1); 561 | c3 = str_data.charCodeAt(i + 2); 562 | tmp_arr[ac++] = String.fromCharCode(((c1 & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63)); 563 | i += 3; 564 | } 565 | } 566 | return tmp_arr.join(''); 567 | } 568 | function utf8_encode(argString) { 569 | var string = (argString + ''); 570 | var utftext = ""; 571 | var start, end; 572 | var stringl = 0; 573 | start = end = 0; 574 | stringl = string.length; 575 | for (var n = 0; n < stringl; n++) { 576 | var c1 = string.charCodeAt(n); 577 | var enc = null; 578 | if (c1 < 128) { 579 | end++; 580 | } else if (c1 > 127 && c1 < 2048) { 581 | enc = String.fromCharCode((c1 >> 6) | 192) + String.fromCharCode((c1 & 63) | 128); 582 | } else { 583 | enc = String.fromCharCode((c1 >> 12) | 224) + String.fromCharCode(((c1 >> 6) & 63) | 128) + String.fromCharCode((c1 & 63) | 128); 584 | } 585 | if (enc !== null) { 586 | if (end > start) { 587 | utftext += string.substring(start, end); 588 | } 589 | utftext += enc; 590 | start = end = n + 1; 591 | } 592 | } 593 | if (end > start) { 594 | utftext += string.substring(start, string.length); 595 | } 596 | return utftext; 597 | } 598 | 599 | // php.js end -------------------------------------------------------------------------------- /js/soundmanager2-nodebug-jsmin.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | SoundManager 2: Javascript Sound for the Web 4 | -------------------------------------------- 5 | http://schillmania.com/projects/soundmanager2/ 6 | 7 | Copyright (c) 2007, Scott Schiller. All rights reserved. 8 | Code provided under the BSD License: 9 | http://schillmania.com/projects/soundmanager2/license.txt 10 | 11 | V2.96a.20100822 12 | */ 13 | (function(j){function ga(xa,ya){function ha(){if(b.debugURLParam.test(N))b.debugMode=true}this.flashVersion=8;this.debugFlash=this.debugMode=false;this.useConsole=true;this.waitForWindowLoad=this.consoleOnly=false;this.nullURL="about:blank";this.allowPolling=true;this.useFastPolling=false;this.useMovieStar=true;this.bgColor="#ffffff";this.useHighPerformance=false;this.flashLoadTimeout=1E3;this.wmode=null;this.allowFullScreen=true;this.allowScriptAccess="always";this.useHTML5Audio=this.useFlashBlock= 14 | false;this.html5Test=/^probably$/i;this.audioFormats={mp3:{type:['audio/mpeg; codecs="mp3"',"audio/mpeg","audio/mp3","audio/MPA","audio/mpa-robust"],required:true},mp4:{related:["aac","m4a"],type:['audio/mp4; codecs="mp4a.40.2"',"audio/aac","audio/x-m4a","audio/MP4A-LATM","audio/mpeg4-generic"],required:true},ogg:{type:["audio/ogg; codecs=vorbis"],required:false},wav:{type:['audio/wav; codecs="1"',"audio/wav","audio/wave","audio/x-wav"],required:false}};this.defaultOptions={autoLoad:false,stream:true, 15 | autoPlay:false,loops:1,onid3:null,onload:null,whileloading:null,onplay:null,onpause:null,onresume:null,whileplaying:null,onstop:null,onfinish:null,onbeforefinish:null,onbeforefinishtime:5E3,onbeforefinishcomplete:null,onjustbeforefinish:null,onjustbeforefinishtime:200,multiShot:true,multiShotEvents:false,position:null,pan:0,type:null,volume:100};this.flash9Options={isMovieStar:null,usePeakData:false,useWaveformData:false,useEQData:false,onbufferchange:null,ondataerror:null};this.movieStarOptions= 16 | {onmetadata:null,useVideo:false,bufferTime:3,serverURL:null,onconnect:null};this.version=null;this.versionNumber="V2.96a.20100822";this.movieURL=null;this.url=xa||null;this.altURL=null;this.enabled=this.swfLoaded=false;this.o=null;this.movieID="sm2-container";this.id=ya||"sm2movie";this.swfCSS={swfDefault:"movieContainer",swfError:"swf_error",swfTimedout:"swf_timedout",swfUnblocked:"swf_unblocked",sm2Debug:"sm2_debug",highPerf:"high_performance",flashDebug:"flash_debug"};this.oMC=null;this.sounds= 17 | {};this.soundIDs=[];this.isFullScreen=this.muted=false;this.isIE=navigator.userAgent.match(/MSIE/i);this.isSafari=navigator.userAgent.match(/safari/i);this.debugID="soundmanager-debug";this.debugURLParam=/([#?&])debug=1/i;this.didFlashBlock=this.specialWmodeCase=false;this.filePattern=null;this.filePatterns={flash8:/\.mp3(\?.*)?$/i,flash9:/\.mp3(\?.*)?$/i};this.baseMimeTypes=/^\s*audio\/(?:x-)?(?:mp(?:eg|3))\s*(?:$|;)/i;this.netStreamMimeTypes=/^\s*audio\/(?:x-)?(?:mp(?:eg|3))\s*(?:$|;)/i;this.netStreamTypes= 18 | ["aac","flv","mov","mp4","m4v","f4v","m4a","mp4v","3gp","3g2"];this.netStreamPattern=RegExp("\\.("+this.netStreamTypes.join("|")+")(\\?.*)?$","i");this.mimePattern=this.baseMimeTypes;this.features={buffering:false,peakData:false,waveformData:false,eqData:false,movieStar:false};this.sandbox={type:null,types:{remote:"remote (domain-based) rules",localWithFile:"local with file access (no internet access)",localWithNetwork:"local with network (internet access only, no local access)",localTrusted:"local, trusted (local+internet access)"}, 19 | description:null,noRemote:null,noLocal:null};this.hasHTML5=null;this.html5={usingFlash:null};this.ignoreFlash=false;var W,b=this,y,t=navigator.userAgent,N=j.location.href.toString(),k=this.flashVersion,ia,O,z=[],E=false,F=false,p=false,v=false,ja=false,G,q,ka,A,B,la,X,Y,w,ma,P,Q,H,Z,na,R,$,oa,pa,I,qa,J=null,aa=null,K,ba,L,S,ca,n,T=false,da=false,ra,sa,C=null,ta,U,x=false,M,u,ea,ua,va=t.match(/pre\//i),za=t.match(/(ipad|iphone)/i);t.match(/mobile/i);var fa=typeof document.hasFocus!=="undefined"?document.hasFocus(): 20 | null,D=typeof document.hasFocus==="undefined"&&this.isSafari,wa=!D;this._use_maybe=N.match(/sm2\-useHTML5Maybe\=1/i);this._overHTTP=document.location?document.location.protocol.match(/http/i):null;this.useAltURL=!this._overHTTP;if(za||va){b.useHTML5Audio=true;b.ignoreFlash=true}if(va||this._use_maybe)b.html5Test=/^(probably|maybe)$/i;this.supported=function(){return C?p&&!v:b.useHTML5Audio&&b.hasHTML5};this.getMovie=function(c){return b.isIE?j[c]:b.isSafari?y(c)||document[c]:y(c)};this.loadFromXML= 21 | function(c){try{b.o._loadFromXML(c)}catch(a){I();return true}};this.createSound=function(c){function a(){f=S(f);b.sounds[e.id]=new W(e);b.soundIDs.push(e.id);return b.sounds[e.id]}var f=null,g=null,e=null;if(!p)throw ca("soundManager.createSound(): "+K("notReady"),arguments.callee.caller);if(arguments.length===2)c={id:arguments[0],url:arguments[1]};e=f=q(c);if(n(e.id,true))return b.sounds[e.id];if(U(e)){g=a();g._setup_html5(e)}else{if(k>8&&b.useMovieStar){if(e.isMovieStar===null)e.isMovieStar=e.serverURL|| 22 | (e.type?e.type.match(b.netStreamPattern):false)||e.url.match(b.netStreamPattern)?true:false;if(e.isMovieStar)if(e.usePeakData)e.usePeakData=false}g=a();if(k===8)b.o._createSound(e.id,e.onjustbeforefinishtime,e.loops||1);else{b.o._createSound(e.id,e.url,e.onjustbeforefinishtime,e.usePeakData,e.useWaveformData,e.useEQData,e.isMovieStar,e.isMovieStar?e.useVideo:false,e.isMovieStar?e.bufferTime:false,e.loops||1,e.serverURL,e.duration||null,e.totalBytes||null,e.autoPlay,true);if(!e.serverURL){g.connected= 23 | true;e.onconnect&&e.onconnect.apply(g)}}}if(e.autoLoad||e.autoPlay)if(g)if(b.isHTML5){g.autobuffer="auto";g.preload="auto"}else g.load(e);e.autoPlay&&g.play();return g};this.createVideo=function(c){if(arguments.length===2)c={id:arguments[0],url:arguments[1]};if(k>=9){c.isMovieStar=true;c.useVideo=true}else return false;return b.createSound(c)};this.destroyVideo=this.destroySound=function(c,a){if(!n(c))return false;for(var f=0;f1&&c.stream)c.stream=false;return c};ca=function(c,a){var f;if(!a)return Error("Error: "+c);typeof console!=="undefined"&& 34 | typeof console.trace!=="undefined"&&console.trace();f="Error: "+c+". \nCaller: "+a.toString();return Error(f)};ia=function(){return false};pa=function(c){for(var a in c)if(c.hasOwnProperty(a)&&typeof c[a]==="function")c[a]=ia};I=function(c){if(typeof c==="undefined")c=false;if(v||c)b.disable(c)};qa=function(c){var a=null;if(c)if(c.match(/\.swf(\?\.*)?$/i)){if(a=c.substr(c.toLowerCase().lastIndexOf(".swf?")+4))return c}else if(c.lastIndexOf("/")!==c.length-1)c+="/";return(c&&c.lastIndexOf("/")!==-1? 35 | c.substr(0,c.lastIndexOf("/")+1):"./")+b.movieURL};Y=function(){if(k!==8&&k!==9)b.flashVersion=8;var c=b.debugMode||b.debugFlash?"_debug.swf":".swf";if(b.flashVersion<9&&b.useHTML5Audio&&b.audioFormats.mp4.required)b.flashVersion=9;k=b.flashVersion;b.version=b.versionNumber+(x?" (HTML5-only mode)":k===9?" (AS3/Flash 9)":" (AS2/Flash 8)");if(k>8){b.defaultOptions=q(b.defaultOptions,b.flash9Options);b.features.buffering=true}if(k>8&&b.useMovieStar){b.defaultOptions=q(b.defaultOptions,b.movieStarOptions); 36 | b.filePatterns.flash9=RegExp("\\.(mp3|"+b.netStreamTypes.join("|")+")(\\?.*)?$","i");b.mimePattern=b.netStreamMimeTypes;b.features.movieStar=true}else b.features.movieStar=false;b.filePattern=b.filePatterns[k!==8?"flash9":"flash8"];b.movieURL=(k===8?"soundmanager2.swf":"soundmanager2_flash9.swf").replace(".swf",c);b.features.peakData=b.features.waveformData=b.features.eqData=k>8};na=function(){return document.body?document.body:document.documentElement?document.documentElement:document.getElementsByTagName("div")[0]}; 37 | oa=function(c,a){if(!b.o||!b.allowPolling)return false;b.o._setPolling(c,a)};$=function(){function c(){f.left=j.scrollX+"px";f.top=j.scrollY+"px"}function a(g){g=j[(g?"add":"remove")+"EventListener"];g("resize",c,false);g("scroll",c,false)}var f=null;return{check:function(g){f=b.oMC.style;if(t.match(/android/i)){if(g){if(b.flashLoadTimeout)b._s.flashLoadTimeout=0;return false}f.position="absolute";f.left=f.top="0px";a(true);b.onready(function(){a(false);if(f)f.left=f.top="-9999px"});c()}}}}();R=function(c, 38 | a){var f=a?a:b.url,g=b.altURL?b.altURL:f,e,o,l,h;c=typeof c==="undefined"?b.id:c;if(E&&F)return false;if(x){Y();b.oMC=y(b.movieID);O();F=E=true;return false}E=true;Y();b.url=qa(this._overHTTP?f:g);a=b.url;if(b.useHighPerformance&&b.useMovieStar&&b.defaultOptions.useVideo===true)b.useHighPerformance=false;b.wmode=!b.wmode&&b.useHighPerformance&&!b.useMovieStar?"transparent":b.wmode;if(b.wmode!==null&&!b.isIE&&!b.useHighPerformance&&navigator.platform.match(/win32/i)){b.specialWmodeCase=true;b.wmode= 39 | null}if(k===8)b.allowFullScreen=false;g={name:c,id:c,src:a,width:"100%",height:"100%",quality:"high",allowScriptAccess:b.allowScriptAccess,bgcolor:b.bgColor,pluginspage:"http://www.macromedia.com/go/getflashplayer",type:"application/x-shockwave-flash",wmode:b.wmode,allowFullScreen:b.allowFullScreen?"true":"false"};if(b.debugFlash)g.FlashVars="debug=1";b.wmode||delete g.wmode;if(b.isIE){f=document.createElement("div");o=''+(b.wmode?' ':"")+''+(b.debugFlash?'':"")+"