function chatRoom($options = array(), $chatters = array()) { $IPBHTML = ""; if (IPSLib::locationHasHooks('skin_ipchat', $this->_funcHooks['chatRoom'])) { $count_fc473221c0d8519b3b35e078488c45d5 = is_array($this->functionData['chatRoom']) ? count($this->functionData['chatRoom']) : 0; $this->functionData['chatRoom'][$count_fc473221c0d8519b3b35e078488c45d5]['options'] = $options; $this->functionData['chatRoom'][$count_fc473221c0d8519b3b35e078488c45d5]['chatters'] = $chatters; } $IPBHTML .= "" . $this->registry->getClass('output')->addJSModule("chat", "0") . "\n" . $this->registry->getClass('output')->addToDocumentHead('importcss', "{$this->settings['css_base_url']}style_css/{$this->registry->output->skin['_csscacheid']}/ipb_editor.css") . "\n<script type='text/javascript'>\n\t// Basic variables\n\tvar roomId\t\t= {$options['roomId']};\n\tvar userId\t\t= {$options['userId']};\n\tvar userName\t= '" . ($this->memberData['member_id'] ? "{$this->memberData['members_display_name']}" : "{$this->memberData['members_display_name']}_{$options['userId']}") . "';\n\tvar accessKey\t= '{$options['accessKey']}';\n\tvar serverHost\t= '{$options['serverHost']}';\n\tvar serverPath\t= '{$options['serverPath']}';\n\tvar ourUrl\t\t= '{$options['ourUrl']}';\n\tUSE_RTE\t\t\t= 0;\n\tvar isMobile\t= 0;\n\t// Chat settings\t\n\tipb.chat.condenseTime\t\t= parseInt({$this->settings['ipchat_limit_time']});\n\tipb.chat.maxMessages\t\t= parseInt({$this->settings['ipchat_max_messages']});\n\tipb.chat.moderator\t\t\t= parseInt({$options['moderator']});\n\tipb.chat.private\t\t\t= parseInt({$options['private']});\n\tipb.chat.hideEnterExit\t\t= parseInt({$this->settings['ipchat_hide_usermessage']});\n\tipb.chat.noBuffer\t\t\t= parseInt('{$this->settings['ipchat_no_buffer']}');\n\tipb.chat.inactiveKick\t\t= parseInt('{$this->settings['ipchat_inactive_minutes']}');\n\tipb.chat.user24hour \t\t= parseInt('{$this->settings['ipchat_24hour']}');\n\t\n\t// Set up templates\n\tipb.chat.templates['msg-1']\t\t\t\t= new Template( \"<li class='post chat-message #{ownclass}'>#{photo} <label>#{username}</label> <div>#{message}</div></li>\" );\n\tipb.chat.templates['msg-1-compound']\t= new Template( \"<li class='post chat-message #{ownclass}'><div class='hider'> </div><div>#{message}</div></li>\" );\n\tipb.chat.templates['msg-2']\t\t\t\t= new Template( \"<li class='post chat-notice'>#{photo} <label>#{username}</label> <div>#{action}</div></li>\" );\n\tipb.chat.templates['msg-3']\t\t\t\t= new Template( \"<li class='post chat-me'>#{photo} <label>#{username}</label> <div>**#{message}**</div></li>\" );\n\tipb.chat.templates['msg-4']\t\t\t\t= new Template( \"<li class='post chat-system'>{$this->lang->words['sys_message_pre']} #{message}</li>\" );\n\tipb.chat.templates['msg-5']\t\t\t\t= new Template( \"<li class='post chat-moderator'><label class='fluid'>#{username}</label> <div>{$this->lang->words['_kicked']} #{extra}</div></li>\" );\n\tipb.chat.templates['msg-K']\t\t\t\t= new Template( \"<li class='post chat-moderator'><div>{$this->lang->words['youve_been_kicked']}</div></li>\" );\n\tipb.chat.templates['send_private']\t\t= new Template( \"<div id='priv_#{id}_wrap'><h3 class='bar'>{$this->lang->words['sendprivatechat']}</h3><div class='chat-private-message'><textarea name='message_content' id='priv_chat_text_#{id}' cols='25' rows='2'></textarea> <input type='submit' value='{$this->lang->words['sendprivatebutton']}' class='input_submit add_folder' id='#{id}_submit' onclick='return ipb.chat.sendPrivateChat( #{id} );' /></div></div>\" );\n\tipb.chat.templates['new-tab']\t\t\t= new Template( \"<a href='#tab-#{id}' rel='#{id}'>#{name} <img src='{$this->settings['img_url']}/cross.png' alt='x' class='right' id='close-chat-tab-#{id}' /></a>\" );\n\tipb.chat.templates['count-title']\t\t= new Template( \"" . str_replace('%s', '#{count}', $this->lang->words['chattab_count']) . "\" );\n\t\n\t// Set some language vars\n\tipb.lang['time_am']\t\t\t\t= \"{$this->lang->words['time_am']}\";\n\tipb.lang['time_pm']\t\t\t\t= \"{$this->lang->words['time_pm']}\";\n\tipb.lang['entered_room']\t\t= \" {$this->lang->words['entered_room']}\";\n\tipb.lang['left_room']\t\t\t= \" {$this->lang->words['left_room']}\";\n\tipb.lang['chat_kick_user']\t\t= \"{$this->lang->words['chat_kick_user']}\";\n\tipb.lang['chat_ban_user']\t\t= \"{$this->lang->words['chat_ban_user']}\";\n\tipb.lang['chat_priv_user']\t\t= \"{$this->lang->words['chat_priv_user']}\";\n\tipb.lang['cant_kick_self']\t\t= \"{$this->lang->words['cant_kick_self']}\";\n\tipb.lang['youve_been_kicked']\t= \"{$this->lang->words['youve_been_kicked']}\";\n\tipb.lang['block_priv_user']\t\t= \"{$this->lang->words['block_priv_user']}\";\n\tipb.lang['unblock_priv_user']\t= \"{$this->lang->words['unblock_priv_user']}\";\n\tipb.lang['cant_block_user']\t\t= \"{$this->lang->words['cant_block_user']}\";\n\tipb.lang['noprivate_withignored'] = \"{$this->lang->words['noprivate_withignored']}\";\n\tipb.lang['ban_user_confirm']\t= \"{$this->lang->words['banconfirmpopup']}\";\n\t\n\t// Emoticons\n\tipb.chat.emoticons\t\t\t= \$H({ " . IPSLib::fetchEmoticonsAsJson($this->registry->output->skin['set_emo_dir'], true) . " });\n\tipb.vars['emoticon_url']\t= \"{$this->settings['emoticons_url']}\";\n\tipb.vars['img_url']\t\t\t= '{$this->settings['img_url']}';\n\t\n\t// Sound\n\tipb.chat.soundEnabled\t\t= " . (IPSCookie::get('chat_sounds') == 'off' ? "0" : "1") . ";\n\tipb.chat.soundOnImg\t\t\t= \"{$this->settings['img_url']}/bell.png\";\n\tipb.chat.soundOffImg\t\t= \"{$this->settings['img_url']}/bell_off.png\";\n\t\n\t// Chatters name formatting\n\t" . $this->__f__776f6e2cf0409238d7f8b06df58633b5($options, $chatters) . "\t// Ignore private chats from..\n\t" . $this->__f__5cb7dc707613b708061e35c39c0315de($options, $chatters) . "\t" . ((isset($this->memberData['_ignoredUsers']) and count($this->memberData['_ignoredUsers'])) ? "\n\t\t" . $this->__f__912a9882eb2468aa711103e006f1db77($options, $chatters) . "\t" : "") . "\n\t\n\t// Badwords\n\t" . ((is_array($this->caches['badwords']) and count($this->caches['badwords'])) ? "\n\t\t" . $this->__f__a322b0264fb42d72e2ed89b6f99a822a($options, $chatters) . "\t" : "") . "\n\t\n\t// Groups\n\t" . $this->__f__2a73ab0bb6c4c786423dde2785d55fd9($options, $chatters) . "</script>\n<script type='text/javascript' src='{$this->settings['public_dir']}js/ips.editor.js'></script>\n" . (!$this->request['_popup'] ? "\n\t<h1 class='ipsType_pagetitle'>" . IPSLib::getAppTitle('ipchat') . "</h1>\n\t<br /><br />\n" : "") . "\n<div class='ipsBox ipsLayout ipsLayout_withright ipsPostForm clearfix'>\n\t<div class='ipsBox_container ipsLayout_right ipsPostForm_sidebar'>\n\t\t<div id='chat-room-list' style='display:none'>\n\t\t\t<h3 class='bar'>{$this->lang->words['chats']}</h3>\n\t\t\t<div class='ipsPad ipsSideMenu'>\n\t\t\t\t<ul id='chat-tab-holder'>\n\t\t\t\t\t<li class='active' id='tab-chatroom'><a href='#tab-chatroom' rel='chatroom'>{$this->lang->words['chat_tab_home']}</a></li>\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t</div>\t\n\t\t<h3 class='bar'><span id='online-chat-count'>" . (($_count = count($chatters)) ? "{$_count}" : "0") . "</span> {$this->lang->words['whos_chatting_ttl']}</h3>\n\t\t<div class='ipsPad' id='chatters-online-wrap'>\n\t\t\t<ul id='chatters-online'>\n\t\t\t\t" . $this->__f__85f7a2a7de7bd273e202a92898fb0067($options, $chatters) . "\t\t\t</ul>\n\t\t</div>\n\t\t<div class='ipsPad right'>\n\t\t\t<ul class='ipsList_inline'>\n\t\t\t\t<li>\n\t\t\t\t\t<a class='ipsButton_secondary' href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("module=ipschat&section=chat&do=leave&room={$options['roomId']}&user={$options['userId']}&access_key={$options['accessKey']}&secure_key={$this->member->form_hash}" . ($this->request['_popup'] ? "&popup=1" : "") . "", "publicWithApp", ''), "", "") . "' title='{$this->lang->words['leave_room']}' id='leave_room'><img src='{$this->settings['img_url']}/cross.png' alt='{$this->lang->words['leave_room']}' /> {$this->lang->words['leave_room']}</a>\n\t\t\t\t</li>\n\t\t\t\t<li>\n\t\t\t\t\t<a class='ipsButton_secondary' href='#' title='{$this->lang->words['toggle_sound']}' id='sound_toggle'> <img id='sound_toggle_img' src='{$this->settings['img_url']}/" . (IPSCookie::get('chat_sounds') == 'off' ? "bell_off.png" : "bell.png") . "' alt='{$this->lang->words['toggle_sound']}' /> </a>\n\t\t\t\t</li>\n\t\t\t\t" . (!$this->request['_popup'] ? "\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<a class='ipsButton_secondary' href='#' title='{$this->lang->words['chat_new_window']}' id='chat_new_window'><img src='{$this->settings['img_url']}/chat/window_open.png' alt='{$this->lang->words['chat_new_window']}' /></a>\n\t\t\t\t\t</li>\n\t\t\t\t" : "") . "\n\t\t\t</ul>\n\t\t</div>\n\t</div>\n\t<div class='ipsBox_container ipsLayout_content'>\n\t\t<div id='scrollbar_container'>\n\t\t\t<div id='messages-display'><span id='initial_message'>{$this->lang->words['please_wait_chats']}</span></div>\n\t\t</div>\n\t\t<form id='chat-form' action='#' method='post'>\n\t\t\t<input type='hidden' name='1_wysiwyg_used' id='1_wysiwyg_used' value='0' />\n\t\t\t<input type='hidden' name='editor_ids[]' value='1' />\n\t\t\t<div class='ips_editor' id='editor_message'>\n\t\t\t\t<div id='message_controls' class='controls'>\n\t\t\t\t\t<ul id='message_toolbar_2' class='toolbar' style='display: none'>\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<span id='message_cmd_bold' class='rte_control rte_button' title='{$this->lang->words['js_tt_bold']}'><img src='{$this->settings['img_url']}/rte_icons/bold.png' alt='{$this->lang->words['js_tt_bold']}' /></span>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<span id='message_cmd_italic' class='rte_control rte_button' title='{$this->lang->words['js_tt_italic']}'><img src='{$this->settings['img_url']}/rte_icons/italic.png' alt='{$this->lang->words['js_tt_italic']}' /></span>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<span id='message_cmd_underline' class='rte_control rte_button' title='{$this->lang->words['js_tt_underline']}'><img src='{$this->settings['img_url']}/rte_icons/underline.png' alt='{$this->lang->words['js_tt_underline']}' /></span>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<span id='emoticons_custom_menu' class='ipbmenu rte_control rte_button' title='{$this->lang->words['js_tt_emoticons']}'><img src='{$this->settings['img_url']}/rte_icons/emoticons.png' alt='{$this->lang->words['js_tt_emoticons']}' /></span>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<span id='message_cmd_link' class='rte_control rte_palette' title='{$this->lang->words['js_tt_link']}'><img src='{$this->settings['img_url']}/rte_icons/link.png' alt='{$this->lang->words['js_tt_link']}' /></span>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t</ul>\n\t\t\t\t</div>\n\t\t\t\t<div id='message_wrap' class='editor'>\n\t\t\t\t\t<textarea name=\"message\" class=\"input_rte\" id=\"message_textarea\" rows=\"3\" cols=\"50\" tabindex=\"0\" maxlength=\"450\"></textarea>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<input type='submit' id='chat-submit' class='input_submit' value='{$this->lang->words['chat_post_button']}' />\n\t\t</form>\n\t</div>\n</div>\n<div id='mod-menu-container'>\n\t" . $this->__f__b9925e475553743bdec6c74675fb1a60($options, $chatters) . "</div>\n<div id='emoticons_custom_menu_menucontent'></div>\n<script type='text/javascript'>\n\tif( \$( 'message_toolbar_2' ) ){ \$( 'message_toolbar_2' ).show(); }\n\tipb.editor_values.get('templates')['link'] = new Template(\"<label for='#{id}_url'>{$this->lang->words['js_template_url']}</label><input type='text' class='input_text' id='#{id}_url' value='http://' tabindex='10' /><label for='#{id}_urltext'>{$this->lang->words['js_template_link']}</label><input type='text' class='input_text _select' id='#{id}_urltext' value='{$this->lang->words['js_template_default']}' tabindex='11' /><input type='submit' value='{$this->lang->words['js_template_insert_link']}' tabindex='12' />\");\n\tipb.editor_values.get('templates')['emoticons_showall'] = new Template(\"<input class='input_submit emoticons' type='button' id='#{id}_all_emoticons' value='{$this->lang->words['show_all_emoticons']}' />\");\n\tipb.editor_values.get('templates')['emoticon_wrapper'] = new Template(\"<h4><span>{$this->lang->words['emoticons_template_title']}</span></h4><div id='#{id}_emoticon_holder' class='emoticon_holder'></div>\");\n\tipb.editor_values.set( 'show_emoticon_link', false );\n\tipb.editor_values.set( 'emoticons', ipb.chat.emoticons );\n\tipb.editor_values.set( 'bbcodes', \$H(" . IPSLib::fetchBbcodeAsJson() . ") );\n\tipb.editors[ 'message' ] = new ipb.editor( 'message', 0 );\n\t/* Load emoticons on the fly ... */\n\tvar _emoticonsLoaded\t= false;\n\t\$('emoticons_custom_menu').observe( 'click', function( e ){ \n\t\tif( !_emoticonsLoaded )\n\t\t{\n\t\t\tnew Ajax.Request( \n\t\t\t\t\t\t\t\tipb.vars['base_url'] + \"&app=ipchat&module=ajax§ion=getemoticons&md5check=\" + ipb.vars['secure_hash'], \n\t\t\t\t\t\t\t\t{ \n\t\t\t\t\t\t\t\t\tmethod: 'get',\n\t\t\t\t\t\t\t\t\tonSuccess: function(t)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\$('emoticons_custom_menu_menucontent').update( t.responseText );\n\t\t\t\t\t\t\t\t\t\t_emoticonsLoaded\t= true;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t);\n\t\t}\n\t});\n\tfunction addEmoImage(elem){\n\t\tvar code = elem.up('tr').down('a').innerHTML;\n\t\tvar title = elem.up('tr').down('img').readAttribute('title');\n\t\tipb.editors[ 'message' ].insert_emoticon('', title, code,'');\n\t}\n</script>\n\t\t\t\n<!--Iframes used for cross-domain \"AJAX\"-->\n<div id='iframeContainer'>\n<div id='storage_container_chatroom' class='storage-container'><ul id='storage_chatroom'></ul></div>\n</div>"; return $IPBHTML; }
function editorLoadJs($options = '', $inlineLoad = false) { $IPBHTML = ""; if (IPSLib::locationHasHooks('skin_editors', $this->_funcHooks['editorLoadJs'])) { $count_b8324e99a127f0556839b84632af5049 = is_array($this->functionData['editorLoadJs']) ? count($this->functionData['editorLoadJs']) : 0; $this->functionData['editorLoadJs'][$count_b8324e99a127f0556839b84632af5049]['options'] = $options; $this->functionData['editorLoadJs'][$count_b8324e99a127f0556839b84632af5049]['inlineLoad'] = $inlineLoad; } $this->_editorJsLoaded = true; $jsonEncoded = IPSText::jsonEncodeForTemplate(isset($options['smilies']) && is_array($options['smilies']) ? $options['smilies'] : array()); $options['bypassCKEditor'] = isset($options['bypassCKEditor']) ? $options['bypassCKEditor'] : 0; $IPBHTML .= "" . $this->registry->getClass('output')->addJSModule("textEditor", "0") . "\r\n" . $this->registry->getClass('output')->addJSModule("textEditor.bbcode", "0") . "" . ($options['bypassCKEditor'] != 1 ? "" . ((defined("CK_LOAD_SOURCE") and CK_LOAD_SOURCE) ? "\r\n\t\t<!-- Load source files, not the minified version -->\r\n\t\t<script type=\"text/javascript\" src=\"{$this->settings['js_base_url']}js/3rd_party/ckeditor/ckeditor_source.js?nck={$this->settings['noCacheKey']}\"></script>\r\n\t" : "\r\n\t\t<script type=\"text/javascript\" src=\"{$this->settings['js_base_url']}js/3rd_party/ckeditor/ckeditor.js?nck={$this->settings['noCacheKey']}\"></script>\r\n\t") . "" : "\r\n\t<script type=\"text/javascript\">\r\n\t\tCKEDITOR = { config: {} };\r\n\t</script>\r\n") . "\r\n<script type=\"text/javascript\">\r\n\t/* Dynamic items */\r\n\tCKEDITOR.config.IPS_BBCODE = " . IPSLib::fetchBbcodeAsJson(array('skip' => array('sharedmedia'))) . ";\r\n\tCKEDITOR.config.IPS_BBCODE_NOPARSE = " . IPSLib::fetchBbcodeAsJson(array('noParseOnly' => 1)) . ";\r\n\tCKEDITOR.config.IPS_BBCODE_DISABLED = " . IPSText::jsonEncodeForTemplate($options['disabledTags']) . ";\r\n\tCKEDITOR.config.IPS_BBCODE_IMG_URL = \"{$this->settings['public_cdn_url']}style_extra/bbcode_icons\";\r\n\tCKEDITOR.config.IPS_BBCODE_BUTTONS = [];\r\n\tCKEDITOR.timestamp = \"{$this->settings['noCacheKey']}\";\r\n\t\r\n\t/* Has to go before config load */\r\n\tvar IPS_smiley_path\t\t\t= \"{$this->settings['emoticons_url']}/\";\r\n\tvar IPS_smiles \t\t= " . (!empty($options['smilies']['count']) ? "{$jsonEncoded}" : "{}") . ";\r\n\tvar IPS_remove_plugins = [];\r\n\tvar IPS_extra_plugins = [];\r\n\t\r\n\t/* Load our configuration */\r\n\tCKEDITOR.config.customConfig = '{$this->settings['js_base_url']}js/3rd_party/ckeditor/ips_config.js';\r\n\t\r\n\t/* Override with prefs */\r\n\tCKEDITOR.config.CmdVAsPlainText = " . ($this->memberData['bw_paste_plain'] ? "true" : "false") . ";\r\n</script>\r\n" . $this->registry->output->addToDocumentHead('importcss', "{$this->settings['css_base_url']}style_css/{$this->registry->output->skin['_csscacheid']}/ipb_ckeditor.css") . ""; return $IPBHTML; }
function editorLoadJs($options = '', $inlineLoad = false) { $IPBHTML = ""; if (IPSLib::locationHasHooks('skin_editors', $this->_funcHooks['editorLoadJs'])) { $count_a938980ed7583a20a49183f943ebe0ae = is_array($this->functionData['editorLoadJs']) ? count($this->functionData['editorLoadJs']) : 0; $this->functionData['editorLoadJs'][$count_a938980ed7583a20a49183f943ebe0ae]['options'] = $options; $this->functionData['editorLoadJs'][$count_a938980ed7583a20a49183f943ebe0ae]['inlineLoad'] = $inlineLoad; } $this->_editorJsLoaded = true; $jsonEncoded = IPSText::jsonEncodeForTemplate(isset($options['smilies']) && is_array($options['smilies']) ? $options['smilies'] : array()); $options['bypassCKEditor'] = isset($options['bypassCKEditor']) ? $options['bypassCKEditor'] : 0; $IPBHTML .= "" . $this->registry->getClass('output')->addJSModule("textEditor", "0") . "\n" . $this->registry->getClass('output')->addJSModule("textEditor.bbcode", "0") . "" . ($options['bypassCKEditor'] != 1 ? "" . ((defined("CK_LOAD_SOURCE") and CK_LOAD_SOURCE) ? "\n\t\t<!-- Load source files, not the minified version -->\n\t\t<script type=\"text/javascript\" src=\"{$this->settings['js_base_url']}js/3rd_party/ckeditor/ckeditor_source.js?nck={$this->settings['noCacheKey']}\"></script>\n\t" : "\n\t\t<script type=\"text/javascript\" src=\"{$this->settings['js_base_url']}js/3rd_party/ckeditor/ckeditor.js?nck={$this->settings['noCacheKey']}\"></script>\n\t") . "" : "\n\t<script type=\"text/javascript\">\n\t\tCKEDITOR = { config: {} };\n\t</script>\n") . "\n<script type=\"text/javascript\">\n\t/* Dynamic items */\n\tCKEDITOR.config.IPS_BBCODE = " . IPSLib::fetchBbcodeAsJson(array('skip' => array('sharedmedia'))) . ";\n\tCKEDITOR.config.IPS_BBCODE_NOPARSE = " . IPSLib::fetchBbcodeAsJson(array('noParseOnly' => 1)) . ";\n\tCKEDITOR.config.IPS_BBCODE_IMG_URL = \"{$this->settings['public_cdn_url']}style_extra/bbcode_icons\";\n\tCKEDITOR.config.IPS_BBCODE_BUTTONS = [];\n\tCKEDITOR.timestamp = \"{$this->settings['noCacheKey']}\";\n\t\n\t/* Has to go before config load */\n\tvar IPS_smiley_path\t\t\t= \"{$this->settings['emoticons_url']}/\";\n\tvar IPS_smiles \t\t= " . (!empty($options['smilies']['count']) ? "{$jsonEncoded}" : "{}") . ";\n\tvar IPS_remove_plugins = [];\n\tvar IPS_extra_plugins = [];\n\t\n\t/* Load our configuration */\n\tCKEDITOR.config.customConfig = '{$this->settings['js_base_url']}js/3rd_party/ckeditor/ips_config.js';\n\t\n\t/* Override with prefs */\n\tCKEDITOR.config.CmdVAsPlainText = " . ($this->memberData['bw_paste_plain'] ? "true" : "false") . ";\n</script>\n" . $this->registry->output->addToDocumentHead('importcss', "{$this->settings['css_base_url']}style_css/{$this->registry->output->skin['_csscacheid']}/ipb_ckeditor.css") . "\n\n\n<script>\njQuery.noConflict();\njQuery(document).ready(function(){\njQuery('.ipsField_editor').css('opacity','0');\nvar interval = setInterval(function(){\n var css = jQuery('link[href^=\"{$this->settings['js_base_url']}js/3rd_party/ckeditor/skins/ips/editor.css\"]')\n if (css.length){\n css.remove();\n jQuery('head').append(\"<link href='{style_images_url}/assets/ckeditor/editor.css' type='text/css' rel='stylesheet' />\");\n clearInterval(interval);\njQuery('.ipsField_editor').delay('300').animate({opacity: 1})\n }\n}, 1000);\n});\n</script>"; return $IPBHTML; }
function ips_editor($form_field = "", $initial_content = "", $images_path = "", $rte_mode = 0, $editor_id = 'ed-0', $smilies = '', $allow_sidebar = 1) { $IPBHTML = ""; $IPBHTML .= "<!-- RTE ON: {$rte_mode} -->\n" . $this->registry->getClass('output')->addJSModule("editor", "0") . "\n<!--top-->\n<input type='hidden' name='{$editor_id}_wysiwyg_used' id='{$editor_id}_wysiwyg_used' value='0' />\n<input type='hidden' name='editor_ids[]' value='{$editor_id}' />\n" . (($show_sidebar = IPSCookie::get('emoticon_sidebar')) ? "" : "") . "\n<div class='ips_editor " . ($show_sidebar == '1' ? "with_sidebar" : "") . "' id='editor_{$editor_id}'>\n\t<div class='sidebar row1 altrow' id='{$editor_id}_sidebar' " . (IPSCookie::get('emoticon_sidebar') != '1' ? "style='display: none'" : "") . ">\n\t\t<h4><img src='{$this->settings['img_url']}/close_popup.png' alt='{$this->lang->words['icon']}' id='{$editor_id}_close_sidebar' /><span>{$this->lang->words['emoticons_template_title']}</span></h4>\n\t\t<div id='{$editor_id}_emoticon_holder' class='emoticon_holder'></div>\n\t\t<div class='show_all_emoticons' id='{$editor_id}_showall_bar'>\n\t\t\t<input type='button' value='Show All' id='{$editor_id}_showall_emoticons' class='input_submit emoticons' />\n\t\t</div>\n\t</div>\n\t<div id='{$editor_id}_controls' class='controls'>\n\t\t<ul id='{$editor_id}_toolbar_1' class='toolbar' style='display: none'>\n\t\t\t<li class='left'>\n\t\t\t\t<span id='{$editor_id}_cmd_removeformat' class='rte_control rte_button' title='{$this->lang->words['js_tt_noformat']}'><img src='{$this->settings['img_url']}/rte_icons/remove_formatting.png' alt='{$this->lang->words['js_tt_noformat']}' /></span>\n\t\t\t</li>\n\t\t\t<li class='left'>\n\t\t\t\t<span id='{$editor_id}_cmd_togglesource' class='rte_control rte_button' title='{$this->lang->words['js_tt_htmlsource']}'><img src='{$this->settings['img_url']}/rte_icons/toggle_source.png' alt='{$this->lang->words['js_tt_htmlsource']}' /></span>\n\t\t\t</li>\n\t\t\t<li class='left'>\n\t\t\t\t<span id='{$editor_id}_cmd_otherstyles' class='rte_control rte_menu rte_special' title='{$this->lang->words['box_other_desc']}' style='display: none'>{$this->lang->words['box_other']}</span>\n\t\t\t</li>\n\t\t\t<li class='left'>\n\t\t\t\t<span id='{$editor_id}_cmd_fontname' class='rte_control rte_menu rte_font' title='{$this->lang->words['box_font_desc']}'>{$this->lang->words['box_font']}</span>\n\t\t\t</li>\n\t\t\t<li class='left'>\n\t\t\t\t<span id='{$editor_id}_cmd_fontsize' class='rte_control rte_menu rte_fontsize' title='{$this->lang->words['box_size_desc']}'>{$this->lang->words['box_size']}</span>\n\t\t\t</li>\n\t\t\t<li class='left'>\n\t\t\t\t<span id='{$editor_id}_cmd_forecolor' class='rte_control rte_palette' title='{$this->lang->words['js_tt_font_col']}'><img src='{$this->settings['img_url']}/rte_icons/font_color.png' alt='{$this->lang->words['js_tt_font_col']}' /></span>\n\t\t\t</li>\n\t\t\t<!--<li class='left'>\n\t\t\t\t<span id='{$editor_id}_cmd_backcolor' class='rte_control rte_palette' title='{$this->lang->words['js_tt_back_col']}'><img src='{$this->settings['img_url']}/rte_icons/background_color.png' alt='{$this->lang->words['js_tt_back_col']}' /></span>\n\t\t\t</li>-->\n\t\t\t\n\t\t\t<li class='right'>\n\t\t\t\t<span id='{$editor_id}_cmd_spellcheck' class='rte_control rte_button' title='{$this->lang->words['js_tt_spellcheck']}'><img src='{$this->settings['img_url']}/rte_icons/spellcheck.png' alt='{$this->lang->words['js_tt_spellcheck']}' /></span>\n\t\t\t</li>\n\t\t\t<li class='right'>\n\t\t\t\t<span id='{$editor_id}_cmd_r_small' class='rte_control rte_button' title='{$this->lang->words['js_tt_resizesmall']}'><img src='{$this->settings['img_url']}/rte_icons/resize_small.png' alt='{$this->lang->words['js_tt_resizesmall']}' /></span>\n\t\t\t</li>\n\t\t\t<li class='right'>\n\t\t\t\t<span id='{$editor_id}_cmd_r_big' class='rte_control rte_button' title='{$this->lang->words['js_tt_resizebig']}'><img src='{$this->settings['img_url']}/rte_icons/resize_big.png' alt='{$this->lang->words['js_tt_resizebig']}' /></span>\n\t\t\t</li>\n\t\t\t<li class='right sep'>\n\t\t\t\t<span id='{$editor_id}_cmd_help' class='rte_control rte_button' title='{$this->lang->words['js_tt_help']}'><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=forums&module=extras&section=legends&do=bbcode", 'public', ''), "", "") . "' title='{$this->lang->words['js_tt_help']}'><img src='{$this->settings['img_url']}/rte_icons/help.png' alt='{$this->lang->words['js_tt_help']}' /></a></span>\n\t\t\t</li>\t\t\t\n\t\t\t<li class='right sep'>\n\t\t\t\t<span id='{$editor_id}_cmd_undo' class='rte_control rte_button' title='{$this->lang->words['js_tt_undo']}'><img src='{$this->settings['img_url']}/rte_icons/undo.png' alt='{$this->lang->words['js_tt_undo']}' /></span>\n\t\t\t</li>\n\t\t\t<li class='right'>\n\t\t\t\t<span id='{$editor_id}_cmd_redo' class='rte_control rte_button' title='{$this->lang->words['js_tt_redo']}'><img src='{$this->settings['img_url']}/rte_icons/redo.png' alt='{$this->lang->words['js_tt_redo']}' /></span>\n\t\t\t</li>\n\t\t\t\n\t\t" . ($this->settings['posting_allow_rte'] == 1 ? "\n\t\t\t<li class='right'>\n\t\t\t\t<!--<span id='{$editor_id}_cmd_switcheditor' class='rte_control rte_button' title='{$this->lang->words['js_tt_switcheditor']}'><img src='{$this->settings['img_url']}/rte_icons/switch.png' alt='{$this->lang->words['js_tt_switcheditor']}' /></span>-->\n\t\t\t</li>\n\t\t" : "") . "\n\t\t</ul>\n\t\t<ul id='{$editor_id}_toolbar_2' class='toolbar' style='display: none'>\n\t\t\t<li>\n\t\t\t\t<span id='{$editor_id}_cmd_bold' class='rte_control rte_button' title='{$this->lang->words['js_tt_bold']}'><img src='{$this->settings['img_url']}/rte_icons/bold.png' alt='{$this->lang->words['js_tt_bold']}' /></span>\n\t\t\t</li>\n\t\t\t<li>\n\t\t\t\t<span id='{$editor_id}_cmd_italic' class='rte_control rte_button' title='{$this->lang->words['js_tt_italic']}'><img src='{$this->settings['img_url']}/rte_icons/italic.png' alt='{$this->lang->words['js_tt_italic']}' /></span>\n\t\t\t</li>\n\t\t\t<li>\n\t\t\t\t<span id='{$editor_id}_cmd_underline' class='rte_control rte_button' title='{$this->lang->words['js_tt_underline']}'><img src='{$this->settings['img_url']}/rte_icons/underline.png' alt='{$this->lang->words['js_tt_underline']}' /></span>\n\t\t\t</li>\n\t\t\t<li class='sep'>\n\t\t\t\t<span id='{$editor_id}_cmd_strikethrough' class='rte_control rte_button' title='{$this->lang->words['js_tt_strike']}'><img src='{$this->settings['img_url']}/rte_icons/strike.png' alt='{$this->lang->words['js_tt_strike']}' /></span>\n\t\t\t</li>\n\t\t\t<li>\n\t\t\t\t<span id='{$editor_id}_cmd_subscript' class='rte_control rte_button' title='{$this->lang->words['js_tt_sub']}'><img src='{$this->settings['img_url']}/rte_icons/subscript.png' alt='{$this->lang->words['js_tt_sub']}' /></span>\n\t\t\t</li>\n\t\t\t<li class='sep'>\n\t\t\t\t<span id='{$editor_id}_cmd_superscript' class='rte_control rte_button' title='{$this->lang->words['js_tt_sup']}'><img src='{$this->settings['img_url']}/rte_icons/superscript.png' alt='{$this->lang->words['js_tt_sup']}' /></span>\n\t\t\t</li>\n\t\t\t<li>\n\t\t\t\t<span id='{$editor_id}_cmd_insertunorderedlist' class='rte_control rte_button' title='{$this->lang->words['js_tt_list']}'><img src='{$this->settings['img_url']}/rte_icons/unordered_list.png' alt='{$this->lang->words['js_tt_list']}' /></span>\n\t\t\t</li>\n\t\t\t<li class='sep'>\n\t\t\t\t<span id='{$editor_id}_cmd_insertorderedlist' class='rte_control rte_button' title='{$this->lang->words['js_tt_list']}'><img src='{$this->settings['img_url']}/rte_icons/ordered_list.png' alt='{$this->lang->words['js_tt_list']}' /></span>\n\t\t\t</li>\t\t\t\n\t\t" . ($this->settings['_remove_emoticons'] == 0 ? "\n\t\t\t<li>\n\t\t\t\t<span id='{$editor_id}_cmd_emoticons' class='rte_control rte_button' title='{$this->lang->words['js_tt_emoticons']}'><img src='{$this->settings['img_url']}/rte_icons/emoticons.png' alt='{$this->lang->words['js_tt_emoticons']}' /></span>\n\t\t\t</li>\n\t\t" : "") . "\n\t\t\t<li>\n\t\t\t\t<span id='{$editor_id}_cmd_link' class='rte_control rte_palette' title='{$this->lang->words['js_tt_link']}'><img src='{$this->settings['img_url']}/rte_icons/link.png' alt='{$this->lang->words['js_tt_link']}' /></span>\n\t\t\t</li>\n\t\t\t<li>\n\t\t\t\t<span id='{$editor_id}_cmd_image' class='rte_control rte_palette' title='{$this->lang->words['js_tt_image']}'><img src='{$this->settings['img_url']}/rte_icons/picture.png' alt='{$this->lang->words['js_tt_image']}' /></span>\n\t\t\t</li>\n\t\t\t<li>\n\t\t\t\t<span id='{$editor_id}_cmd_email' class='rte_control rte_palette' title='{$this->lang->words['js_tt_email']}'><img src='{$this->settings['img_url']}/rte_icons/email.png' alt='{$this->lang->words['js_tt_email']}' /></span>\n\t\t\t</li>\n\t\t\t<li>\n\t\t\t\t<span id='{$editor_id}_cmd_ipb_quote' class='rte_control rte_button' title='{$this->lang->words['js_tt_quote']}'><img src='{$this->settings['img_url']}/rte_icons/quote.png' alt='{$this->lang->words['js_tt_quote']}' /></span>\n\t\t\t</li>\n\t\t\t<li>\n\t\t\t\t<span id='{$editor_id}_cmd_ipb_code' class='rte_control rte_button' title='{$this->lang->words['js_tt_code']}'><img src='{$this->settings['img_url']}/rte_icons/code.png' alt='{$this->lang->words['js_tt_code']}' /></span>\n\t\t\t</li>\n\t\t\t<li>\n\t\t\t\t<span id='{$editor_id}_cmd_media' class='rte_control rte_palette' title='{$this->lang->words['js_tt_media']}'><img src='{$this->settings['img_url']}/rte_icons/media.png' alt='{$this->lang->words['js_tt_media']}' /></span>\n\t\t\t</li>\n\t\t\t<li class='right'>\n\t\t\t\t<span id='{$editor_id}_cmd_justifyright' class='rte_control rte_button' title='{$this->lang->words['js_tt_right']}'><img src='{$this->settings['img_url']}/rte_icons/align_right.png' alt='{$this->lang->words['js_tt_right']}' /></span>\n\t\t\t</li>\n\t\t\t<li class='right'>\n\t\t\t\t<span id='{$editor_id}_cmd_justifycenter' class='rte_control rte_button' title='{$this->lang->words['js_tt_center']}'><img src='{$this->settings['img_url']}/rte_icons/align_center.png' alt='{$this->lang->words['js_tt_center']}' /></span>\n\t\t\t</li>\n\t\t\t<li class='right'>\n\t\t\t\t<span id='{$editor_id}_cmd_justifyleft' class='rte_control rte_button' title='{$this->lang->words['js_tt_left']}'><img src='{$this->settings['img_url']}/rte_icons/align_left.png' alt='{$this->lang->words['js_tt_left']}' /></span>\n\t\t\t</li>\n\t\t\t<li class='right sep'>\n\t\t\t\t<span id='{$editor_id}_cmd_indent' class='rte_control rte_button' title='{$this->lang->words['js_tt_indent']}'><img src='{$this->settings['img_url']}/rte_icons/indent.png' alt='{$this->lang->words['js_tt_indent']}' /></span>\n\t\t\t</li>\n\t\t\t<li class='right'>\n\t\t\t\t<span id='{$editor_id}_cmd_outdent' class='rte_control rte_button' title='{$this->lang->words['js_tt_outdent']}'><img src='{$this->settings['img_url']}/rte_icons/outdent.png' alt='{$this->lang->words['js_tt_outdent']}' /></span>\n\t\t\t</li>\n\t\t</ul>\n\t</div>\n\t<div id='{$editor_id}_wrap' class='editor'>\n\t\t<textarea name=\"{$form_field}\" class=\"input_rte\" id=\"{$editor_id}_textarea\" rows=\"10\" cols=\"60\" tabindex=\"0\">{$initial_content}</textarea>\n\t</div>\n</div>\n\t\n<!-- Toolpanes -->\n<script type=\"text/javascript\">\n//<![CDATA[\n\$('{$editor_id}_toolbar_1').show();\n\$('{$editor_id}_toolbar_2').show();\n// Rikki: Had to remove <form>... </form> because Opera would see </form> and not pass the topic icons / hidden fields properly. Tried \"</\" + \"form>\" but when it is parsed, it had the same affect\nipb.editor_values.get('templates')['link'] = new Template(\"<label for='#{id}_url'>{$this->lang->words['js_template_url']}</label><input type='text' class='input_text' id='#{id}_url' value='http://' tabindex='10' /><label for='#{id}_urltext'>{$this->lang->words['js_template_link']}</label><input type='text' class='input_text _select' id='#{id}_urltext' value='{$this->lang->words['js_template_default']}' tabindex='11' /><input type='submit' class='input_submit' value='{$this->lang->words['js_template_insert_link']}' tabindex='12' />\");\nipb.editor_values.get('templates')['image'] = new Template(\"<label for='#{id}_img'>{$this->lang->words['js_template_imageurl']}</label><input type='text' class='input_text' id='#{id}_img' value='http://' tabindex='10' /><input type='submit' class='input_submit' value='{$this->lang->words['js_template_insert_img']}' tabindex='11' />\");\nipb.editor_values.get('templates')['email'] = new Template(\"<label for='#{id}_email'>{$this->lang->words['js_template_email_url']}</label><input type='text' class='input_text' id='#{id}_email' tabindex='10' /><label for='#{id}_emailtext'>{$this->lang->words['js_template_link']}</label><input type='text' class='input_text _select' id='#{id}_emailtext' value='{$this->lang->words['js_template_email_me']}' tabindex='11' /><input type='submit' class='input_submit' value='{$this->lang->words['js_template_insert_email']}' tabindex='12' />\");\nipb.editor_values.get('templates')['media'] = new Template(\"<label for='#{id}_media'>{$this->lang->words['js_template_media_url']}</label><input type='text' class='input_text' id='#{id}_media' value='http://' tabindex='10' /><input type='submit' class='input_submit' value='{$this->lang->words['js_template_insert_media']}' tabindex='11' />\");\nipb.editor_values.get('templates')['generic'] = new Template(\"<div class='rte_title'>#{title}</div><strong>{$this->lang->words['js_template_example']}</strong><pre>#{example}</pre><label for='#{id}_option' class='optional'>#{option_text}</label><input type='text' class='input_text optional' id='#{id}_option' tabindex='10' /><label for='#{id}_text' class='tagcontent'>#{value_text}</label><textarea class='input_text _select tagcontent' id='#{id}_text' tabindex='11' rows='4' cols='30' style='width: 98%' /></textarea><input type='submit' class='input_submit' value='{$this->lang->words['js_template_add']}' tabindex='12' />\");\nipb.editor_values.get('templates')['toolbar'] = new Template(\"<ul id='#{id}_toolbar_#{toolbarid}' class='toolbar' style='display: none'>#{content}</ul>\");\nipb.editor_values.get('templates')['button'] = new Template(\"<li><span id='#{id}_cmd_custom_#{cmd}' class='rte_control rte_button specialitem' title='#{title}'><img src='{$this->settings['img_url']}/rte_icons/#{img}' alt='{$this->lang->words['icon']}' /></span></li>\");\nipb.editor_values.get('templates')['menu_item'] = new Template(\"<li id='#{id}_cmd_custom_#{cmd}' class='specialitem clickable'>#{title}</li>\");\nipb.editor_values.get('templates')['togglesource'] = new Template(\"<fieldset id='#{id}_ts_controls' class='submit' style='text-align: left'><input type='button' class='input_submit' value='{$this->lang->words['js_template_update']}' id='#{id}_ts_update' /> <a href='#' id='#{id}_ts_cancel' class='cancel'>{$this->lang->words['js_template_cancel_source']}</a></fieldset>\");\nipb.editor_values.get('templates')['emoticons_showall'] = new Template(\"<input class='input_submit emoticons' type='button' id='#{id}_all_emoticons' value='{$this->lang->words['show_all_emoticons']}' />\");\nipb.editor_values.get('templates')['emoticon_wrapper'] = new Template(\"<h4><span>{$this->lang->words['emoticons_template_title']}</span></h4><div id='#{id}_emoticon_holder' class='emoticon_holder'></div>\");\n// Add smilies into the mix\nipb.editor_values.set( 'show_emoticon_link', " . ($allow_sidebar ? "true" : "false") . " );\nipb.editor_values.set( 'emoticons', \$H({ {$smilies} }) );\nipb.editor_values.set( 'bbcodes', \$H(" . IPSLib::fetchBbcodeAsJson() . ") );\nipb.vars['emoticon_url'] = \"{$this->settings['emoticons_url']}\";\nipb.editors[ '{$editor_id}' ] = new ipb.editor( '{$editor_id}', USE_RTE );\n//]]>\n</script>"; return $IPBHTML; }
/** * Editor template for ACP * * @access public * @param string From field name * @param string Initial content for the editor * @param string Path to the images * @param integer Whether RTE is enabled (1) or not (0) * @param string Editor id * @param string Emoticon data * @return string HTML */ public function ips_editor($form_field = "", $initial_content = "", $images_path = "", $rte_mode = 0, $editor_id = 'ed-0', $smilies = '') { $IPBHTML = ""; //--starthtml--// $this->settings['extraJsModules'] .= ",editor"; $bbcodes = IPSLib::fetchBbcodeAsJson(); $show_sidebar = IPSCookie::get('emoticon_sidebar'); $show_sidebar_class = $show_sidebar && $this->settings['_remove_emoticons'] == 0 ? 'with_sidebar' : ''; $show_sidebar_style = $show_sidebar && $this->settings['_remove_emoticons'] == 0 ? '' : "style='display:none'"; $show_sidebar_link = $show_sidebar && $this->settings['_remove_emoticons'] == 0 ? 'true' : 'false'; $IPBHTML .= <<<EOF \t<!--top--> \t<input type='hidden' name='{$editor_id}_wysiwyg_used' id='{$editor_id}_wysiwyg_used' value='0' /> \t<input type='hidden' name='editor_ids[]' value='{$editor_id}' /> \t<div class='ips_editor {$show_sidebar_class}' id='editor_{$editor_id}'> EOF; if ($this->settings['_remove_emoticons'] == 0) { $IPBHTML .= <<<EOF \t\t<div class='sidebar row1 altrow' id='{$editor_id}_sidebar' {$show_sidebar_style}> \t\t\t<h4><img src='{$this->settings['img_url']}/close_popup.png' alt='{$this->lang->words['icon']}' id='{$editor_id}_close_sidebar' /><span>{$this->lang->words['emoticons_template_title']}</span></h4> \t\t\t<div id='{$editor_id}_emoticon_holder' class='emoticon_holder'></div> \t\t\t<div class='show_all_emoticons' id='{$editor_id}_showall_bar'> \t\t\t\t<input type='button' value='Show All' id='{$editor_id}_showall_emoticons' class='input_submit emoticons' /> \t\t\t</div> \t\t</div> EOF; } $IPBHTML .= <<<EOF \t\t<div id='{$editor_id}_controls' class='controls'> \t\t\t<ul id='{$editor_id}_toolbar_1' class='toolbar' style='display: none'> \t\t\t\t<li class='left'> \t\t\t\t\t<span id='{$editor_id}_cmd_removeformat' class='rte_control rte_button' title='{$this->lang->words['js_tt_noformat']}'><img src='{$this->settings['img_url']}/rte_icons/remove_formatting.png' alt='{$this->lang->words['js_tt_noformat']}' /></span> \t\t\t\t</li> \t\t\t\t<li class='left'> \t\t\t\t\t<span id='{$editor_id}_cmd_togglesource' class='rte_control rte_button' title='{$this->lang->words['js_tt_htmlsource']}'><img src='{$this->settings['img_url']}/rte_icons/toggle_source.png' alt='{$this->lang->words['js_tt_htmlsource']}' /></span> \t\t\t\t</li> \t\t\t\t<li class='left'> \t\t\t\t\t<span id='{$editor_id}_cmd_otherstyles' class='rte_control rte_menu rte_special' title='{$this->lang->words['box_other_desc']}' style='display: none'>{$this->lang->words['box_other']}</span> \t\t\t\t</li> \t\t\t\t<li class='left'> \t\t\t\t\t<span id='{$editor_id}_cmd_fontname' class='rte_control rte_menu rte_font' title='{$this->lang->words['box_font_desc']}'>{$this->lang->words['box_font']}</span> \t\t\t\t</li> \t\t\t\t<li class='left'> \t\t\t\t\t<span id='{$editor_id}_cmd_fontsize' class='rte_control rte_menu rte_fontsize' title='{$this->lang->words['box_size_desc']}'>{$this->lang->words['box_size']}</span> \t\t\t\t</li> \t\t\t\t<li class='left'> \t\t\t\t\t<span id='{$editor_id}_cmd_forecolor' class='rte_control rte_palette' title='{$this->lang->words['js_tt_font_col']}'><img src='{$this->settings['img_url']}/rte_icons/font_color.png' alt='{$this->lang->words['js_tt_font_col']}' /></span> \t\t\t\t</li> \t\t\t\t<!--<li class='left'> \t\t\t\t\t<span id='{$editor_id}_cmd_backcolor' class='rte_control rte_palette' title='{$this->lang->words['js_tt_back_col']}'><img src='{$this->settings['img_url']}/rte_icons/background_color.png' alt='{$this->lang->words['js_tt_back_col']}' /></span> \t\t\t\t</li>--> \t\t\t\t<li class='right'> \t\t\t\t\t<span id='{$editor_id}_cmd_spellcheck' class='rte_control rte_button' title='{$this->lang->words['js_tt_spellcheck']}'><img src='{$this->settings['img_url']}/rte_icons/spellcheck.png' alt='{$this->lang->words['js_tt_spellcheck']}' /></span> \t\t\t\t</li> \t\t\t\t<li class='right'> \t\t\t\t\t<span id='{$editor_id}_cmd_r_small' class='rte_control rte_button' title='{$this->lang->words['js_tt_resizesmall']}'><img src='{$this->settings['img_url']}/rte_icons/resize_small.png' alt='{$this->lang->words['js_tt_resizesmall']}' /></span> \t\t\t\t</li> \t\t\t\t<li class='right'> \t\t\t\t\t<span id='{$editor_id}_cmd_r_big' class='rte_control rte_button' title='{$this->lang->words['js_tt_resizebig']}'><img src='{$this->settings['img_url']}/rte_icons/resize_big.png' alt='{$this->lang->words['js_tt_resizebig']}' /></span> \t\t\t\t</li> \t\t\t\t<li class='right sep'> \t\t\t\t\t<span id='{$editor_id}_cmd_help' class='rte_control rte_button' title='{$this->lang->words['js_tt_help']}'><a href='{parse url="app=forums&module=extras&section=legends&do=bbcode" base="public"}' title='{$this->lang->words['js_tt_help']}'><img src='{$this->settings['img_url']}/rte_icons/help.png' alt='{$this->lang->words['js_tt_help']}' /></a></span> \t\t\t\t</li>\t\t\t \t\t\t\t<li class='right sep'> \t\t\t\t\t<span id='{$editor_id}_cmd_undo' class='rte_control rte_button' title='{$this->lang->words['js_tt_undo']}'><img src='{$this->settings['img_url']}/rte_icons/undo.png' alt='{$this->lang->words['js_tt_undo']}' /></span> \t\t\t\t</li> \t\t\t\t<li class='right'> \t\t\t\t\t<span id='{$editor_id}_cmd_redo' class='rte_control rte_button' title='{$this->lang->words['js_tt_redo']}'><img src='{$this->settings['img_url']}/rte_icons/redo.png' alt='{$this->lang->words['js_tt_redo']}' /></span> \t\t\t\t</li> EOF; if ($this->settings['posting_allow_rte'] == 1) { $IPBHTML .= <<<EOF \t\t\t\t<li class='right'> \t\t\t\t\t<!--<span id='{$editor_id}_cmd_switcheditor' class='rte_control rte_button' title='{$this->lang->words['js_tt_switcheditor']}'><img src='{$this->settings['img_url']}/rte_icons/switch.png' alt='{$this->lang->words['js_tt_switcheditor']}' /></span>--> \t\t\t\t</li> EOF; } $IPBHTML .= <<<EOF \t\t\t</ul> \t\t\t<ul id='{$editor_id}_toolbar_2' class='toolbar' style='display: none'> \t\t\t\t<li> \t\t\t\t\t<span id='{$editor_id}_cmd_bold' class='rte_control rte_button' title='{$this->lang->words['js_tt_bold']}'><img src='{$this->settings['img_url']}/rte_icons/bold.png' alt='{$this->lang->words['js_tt_bold']}' /></span> \t\t\t\t</li> \t\t\t\t<li> \t\t\t\t\t<span id='{$editor_id}_cmd_italic' class='rte_control rte_button' title='{$this->lang->words['js_tt_italic']}'><img src='{$this->settings['img_url']}/rte_icons/italic.png' alt='{$this->lang->words['js_tt_italic']}' /></span> \t\t\t\t</li> \t\t\t\t<li> \t\t\t\t\t<span id='{$editor_id}_cmd_underline' class='rte_control rte_button' title='{$this->lang->words['js_tt_underline']}'><img src='{$this->settings['img_url']}/rte_icons/underline.png' alt='{$this->lang->words['js_tt_underline']}' /></span> \t\t\t\t</li> \t\t\t\t<li class='sep'> \t\t\t\t\t<span id='{$editor_id}_cmd_strikethrough' class='rte_control rte_button' title='{$this->lang->words['js_tt_strike']}'><img src='{$this->settings['img_url']}/rte_icons/strike.png' alt='{$this->lang->words['js_tt_strike']}' /></span> \t\t\t\t</li> \t\t\t\t<li> \t\t\t\t\t<span id='{$editor_id}_cmd_subscript' class='rte_control rte_button' title='{$this->lang->words['js_tt_sub']}'><img src='{$this->settings['img_url']}/rte_icons/subscript.png' alt='{$this->lang->words['js_tt_sub']}' /></span> \t\t\t\t</li> \t\t\t\t<li class='sep'> \t\t\t\t\t<span id='{$editor_id}_cmd_superscript' class='rte_control rte_button' title='{$this->lang->words['js_tt_sup']}'><img src='{$this->settings['img_url']}/rte_icons/superscript.png' alt='{$this->lang->words['js_tt_sup']}' /></span> \t\t\t\t</li> \t\t\t\t<li> \t\t\t\t\t<span id='{$editor_id}_cmd_insertunorderedlist' class='rte_control rte_button' title='{$this->lang->words['js_tt_list']}'><img src='{$this->settings['img_url']}/rte_icons/unordered_list.png' alt='{$this->lang->words['js_tt_list']}' /></span> \t\t\t\t</li> \t\t\t\t<li class='sep'> \t\t\t\t\t<span id='{$editor_id}_cmd_insertorderedlist' class='rte_control rte_button' title='{$this->lang->words['js_tt_list']}'><img src='{$this->settings['img_url']}/rte_icons/ordered_list.png' alt='{$this->lang->words['js_tt_list']}' /></span> \t\t\t\t</li> EOF; if ($this->settings['_remove_emoticons'] == 0) { $IPBHTML .= <<<EOF \t\t\t\t<li> \t\t\t\t\t<span id='{$editor_id}_cmd_emoticons' class='rte_control rte_button' title='{$this->lang->words['js_tt_emoticons']}'><img src='{$this->settings['img_url']}/rte_icons/emoticons.png' alt='{$this->lang->words['js_tt_emoticons']}' /></span> \t\t\t\t</li> EOF; } $IPBHTML .= <<<EOF \t\t\t\t<li> \t\t\t\t\t<span id='{$editor_id}_cmd_link' class='rte_control rte_palette' title='{$this->lang->words['js_tt_link']}'><img src='{$this->settings['img_url']}/rte_icons/link.png' alt='{$this->lang->words['js_tt_link']}' /></span> \t\t\t\t</li> \t\t\t\t<li> \t\t\t\t\t<span id='{$editor_id}_cmd_image' class='rte_control rte_palette' title='{$this->lang->words['js_tt_image']}'><img src='{$this->settings['img_url']}/rte_icons/picture.png' alt='{$this->lang->words['js_tt_image']}' /></span> \t\t\t\t</li> \t\t\t\t<li> \t\t\t\t\t<span id='{$editor_id}_cmd_email' class='rte_control rte_palette' title='{$this->lang->words['js_tt_email']}'><img src='{$this->settings['img_url']}/rte_icons/email.png' alt='{$this->lang->words['js_tt_email']}' /></span> \t\t\t\t</li> \t\t\t\t<li> \t\t\t\t\t<span id='{$editor_id}_cmd_ipb_quote' class='rte_control rte_button' title='{$this->lang->words['js_tt_quote']}'><img src='{$this->settings['img_url']}/rte_icons/quote.png' alt='{$this->lang->words['js_tt_quote']}' /></span> \t\t\t\t</li> \t\t\t\t<li> \t\t\t\t\t<span id='{$editor_id}_cmd_ipb_code' class='rte_control rte_button' title='{$this->lang->words['js_tt_code']}'><img src='{$this->settings['img_url']}/rte_icons/code.png' alt='{$this->lang->words['js_tt_code']}' /></span> \t\t\t\t</li> \t\t\t\t<li> \t\t\t\t\t<span id='{$editor_id}_cmd_media' class='rte_control rte_palette' title='{$this->lang->words['js_tt_media']}'><img src='{$this->settings['img_url']}/rte_icons/media.png' alt='{$this->lang->words['js_tt_media']}' /></span> \t\t\t\t</li> \t\t\t\t<li class='right'> \t\t\t\t\t<span id='{$editor_id}_cmd_justifyright' class='rte_control rte_button' title='{$this->lang->words['js_tt_right']}'><img src='{$this->settings['img_url']}/rte_icons/align_right.png' alt='{$this->lang->words['js_tt_right']}' /></span> \t\t\t\t</li> \t\t\t\t<li class='right'> \t\t\t\t\t<span id='{$editor_id}_cmd_justifycenter' class='rte_control rte_button' title='{$this->lang->words['js_tt_center']}'><img src='{$this->settings['img_url']}/rte_icons/align_center.png' alt='{$this->lang->words['js_tt_center']}' /></span> \t\t\t\t</li> \t\t\t\t<li class='right'> \t\t\t\t\t<span id='{$editor_id}_cmd_justifyleft' class='rte_control rte_button' title='{$this->lang->words['js_tt_left']}'><img src='{$this->settings['img_url']}/rte_icons/align_left.png' alt='{$this->lang->words['js_tt_left']}' /></span> \t\t\t\t</li> \t\t\t\t<li class='right sep'> \t\t\t\t\t<span id='{$editor_id}_cmd_indent' class='rte_control rte_button' title='{$this->lang->words['js_tt_indent']}'><img src='{$this->settings['img_url']}/rte_icons/indent.png' alt='{$this->lang->words['js_tt_indent']}' /></span> \t\t\t\t</li> \t\t\t\t<li class='right'> \t\t\t\t\t<span id='{$editor_id}_cmd_outdent' class='rte_control rte_button' title='{$this->lang->words['js_tt_outdent']}'><img src='{$this->settings['img_url']}/rte_icons/outdent.png' alt='{$this->lang->words['js_tt_outdent']}' /></span> \t\t\t\t</li> \t\t\t</ul> \t\t</div> \t\t<div id='{$editor_id}_wrap' class='editor'> \t\t\t<textarea name="{$form_field}" class="input_rte" id="{$editor_id}_textarea" rows="10" cols="60" tabindex="0">{$initial_content}</textarea> \t\t</div> \t</div> \t<!-- Toolpanes --> \t<script type="text/javascript"> \t//<![CDATA[ \t\$('{$editor_id}_toolbar_1').show(); \t\$('{$editor_id}_toolbar_2').show(); \t// Rikki: Had to remove <form>... </form> because Opera would see </form> and not pass the topic icons / hidden fields properly. Tried "</" + "form>" but when it is parsed, it had the same affect \tipb.editor_values.get('templates')['link'] = new Template("<label for='#{id}_url'>{$this->lang->words['js_template_url']}</label><input type='text' class='input_text' id='#{id}_url' value='http://' tabindex='10' /><label for='#{id}_urltext'>{$this->lang->words['js_template_link']}</label><input type='text' class='input_text _select' id='#{id}_urltext' value='{$this->lang->words['js_template_default']}' tabindex='11' /><input type='submit' class='input_submit' value='{$this->lang->words['js_template_insert_link']}' tabindex='12' />"); \tipb.editor_values.get('templates')['image'] = new Template("<label for='#{id}_img'>{$this->lang->words['js_template_imageurl']}</label><input type='text' class='input_text' id='#{id}_img' value='http://' tabindex='10' /><input type='submit' class='input_submit' value='{$this->lang->words['js_template_insert_img']}' tabindex='11' />"); \tipb.editor_values.get('templates')['email'] = new Template("<label for='#{id}_email'>{$this->lang->words['js_template_email_url']}</label><input type='text' class='input_text' id='#{id}_email' tabindex='10' /><label for='#{id}_emailtext'>{$this->lang->words['js_template_link']}</label><input type='text' class='input_text _select' id='#{id}_emailtext' value='{$this->lang->words['js_template_email_me']}' tabindex='11' /><input type='submit' class='input_submit' value='{$this->lang->words['js_template_insert_email']}' tabindex='12' />"); \tipb.editor_values.get('templates')['media'] = new Template("<label for='#{id}_media'>{$this->lang->words['js_template_media_url']}</label><input type='text' class='input_text' id='#{id}_media' value='http://' tabindex='10' /><input type='submit' class='input_submit' value='{$this->lang->words['js_template_insert_media']}' tabindex='11' />"); \tipb.editor_values.get('templates')['generic'] = new Template("<div class='rte_title'>#{title}</div><strong>{$this->lang->words['js_template_example']}</strong><pre>#{example}</pre><label for='#{id}_option' class='optional'>#{option_text}</label><input type='text' class='input_text optional' id='#{id}_option' tabindex='10' /><label for='#{id}_text' class='tagcontent'>#{value_text}</label><input type='text' class='input_text _select tagcontent' id='#{id}_text' tabindex='11' /><input type='submit' class='input_submit' value='{$this->lang->words['js_template_add']}' tabindex='12' />"); \tipb.editor_values.get('templates')['toolbar'] = new Template("<ul id='#{id}_toolbar_#{toolbarid}' class='toolbar' style='display: none'>#{content}</ul>"); \tipb.editor_values.get('templates')['button'] = new Template("<li><span id='#{id}_cmd_custom_#{cmd}' class='rte_control rte_button specialitem' title='#{title}'><img src='{$this->settings['img_url']}/rte_icons/#{img}' alt='{$this->lang->words['icon']}' /></span></li>"); \tipb.editor_values.get('templates')['menu_item'] = new Template("<li id='#{id}_cmd_custom_#{cmd}' class='specialitem clickable'>#{title}</li>"); \tipb.editor_values.get('templates')['togglesource'] = new Template("<fieldset id='#{id}_ts_controls' class='submit' style='text-align: left'><input type='button' class='input_submit' value='{$this->lang->words['js_template_update']}' id='#{id}_ts_update' /> <a href='#' id='#{id}_ts_cancel' class='cancel'>{$this->lang->words['js_template_cancel_source']}</a></fieldset>"); \tipb.editor_values.get('templates')['emoticons_showall'] = new Template("<input class='input_submit emoticons' type='button' id='#{id}_all_emoticons' value='{$this->lang->words['show_all_emoticons']}' />"); \tipb.editor_values.get('templates')['emoticon_wrapper'] = new Template("<h4><span>{$this->lang->words['emoticons_template_title']}</span></h4><div id='#{id}_emoticon_holder' class='emoticon_holder'></div>"); \t// Add smilies into the mix \tipb.editor_values.set( 'show_emoticon_link', true ); \tipb.editor_values.set( 'emoticons', \$H({ {$smilies} }) ); \tipb.editor_values.set( 'bbcodes', \$H( {$bbcodes} ) ); \tipb.vars['emoticon_url'] = "{$this->settings['emoticons_url']}"; \tEvent.observe(window, 'load', function(e){ \t\tipb.editors[ '{$editor_id}' ] = new ipb.editor( '{$editor_id}', USE_RTE ); \t}); \t//]]> \t</script> EOF; //--endhtml--// return $IPBHTML; }