本文整理汇总了PHP中IPSLib::fetchBbcodeAsJson方法的典型用法代码示例。如果您正苦于以下问题:PHP IPSLib::fetchBbcodeAsJson方法的具体用法?PHP IPSLib::fetchBbcodeAsJson怎么用?PHP IPSLib::fetchBbcodeAsJson使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IPSLib
的用法示例。
在下文中一共展示了IPSLib::fetchBbcodeAsJson方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: chatRoom
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;
}
示例2: editorLoadJs
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;
}
示例3: editorLoadJs
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;
}
示例4: ips_editor
/**
* 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>
//.........这里部分代码省略.........