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 editor($formField = 'post', $content = '', $options = array(), $autoSaveData = array(), $warningInfo = '', $acknowledge = FALSE, $bbcodeVersion = null, $showEditor = TRUE)
 {
     $IPBHTML = "";
     if (IPSLib::locationHasHooks('skin_editors', $this->_funcHooks['editor'])) {
         $count_dc5d71344978455c9ad8373b44e75458 = is_array($this->functionData['editor']) ? count($this->functionData['editor']) : 0;
         $this->functionData['editor'][$count_dc5d71344978455c9ad8373b44e75458]['formField'] = $formField;
         $this->functionData['editor'][$count_dc5d71344978455c9ad8373b44e75458]['content'] = $content;
         $this->functionData['editor'][$count_dc5d71344978455c9ad8373b44e75458]['options'] = $options;
         $this->functionData['editor'][$count_dc5d71344978455c9ad8373b44e75458]['autoSaveData'] = $autoSaveData;
         $this->functionData['editor'][$count_dc5d71344978455c9ad8373b44e75458]['warningInfo'] = $warningInfo;
         $this->functionData['editor'][$count_dc5d71344978455c9ad8373b44e75458]['acknowledge'] = $acknowledge;
         $this->functionData['editor'][$count_dc5d71344978455c9ad8373b44e75458]['bbcodeVersion'] = $bbcodeVersion;
         $this->functionData['editor'][$count_dc5d71344978455c9ad8373b44e75458]['showEditor'] = $showEditor;
     }
     /* Always return as UTF-8 */
     $jsonEncoded = IPSText::jsonEncodeForTemplate($autoSaveData);
     $IPBHTML .= "" . ($acknowledge ? "\r\n\t<p class='message'>{$this->lang->words['warnings_acknowledge_desc']} <a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=members&amp;module=profile&amp;section=warnings&amp;do=acknowledge&amp;id={$acknowledge}", "public", ''), "", "") . "' class='ipsButton_secondary'>{$this->lang->words['warnings_acknowledge_review']}</a></p>\r\n" : "" . ($warningInfo ? "\r\n\t\t<p class='message'>{$warningInfo}</p>\r\n\t\t<br />\r\n\t" : "") . "\r\n\t" . ($showEditor ? "\t\t" . (empty($this->_editorJsLoaded) ? "\r\n\t\t\t" . (method_exists($this->registry->getClass('output')->getTemplate('editors'), 'editorLoadJs') ? $this->registry->getClass('output')->getTemplate('editors')->editorLoadJs($options) : '') . "\r\n\t\t" : "") . "\r\n\t\t<input type='hidden' name='isRte' id='isRte_{$options['editorName']}' value='0' />\r\n\t\t<input type='hidden' name='noSmilies' id='noSmilies_{$options['editorName']}' value='" . intval($options['noSmilies']) . "' />\r\n\t\t<textarea id=\"{$options['editorName']}\" name=\"{$formField}\" class='ipsEditor_textarea input_text" . ($options['type'] == 'mini' ? " mini" : "") . "'>{$content}</textarea>\r\n\t\t<p class='desc ipsPad' style='display: none' id='editor_html_message_{$options['editorName']}'>{$this->lang->words['editor_html_message']}</p>" : "") . "") . "";
     return $IPBHTML;
 }
 /**
  * Show the attach upload field
  *
  * @param	string	$msg
  * @param	bool	$is_error
  * @param	integer	$insert_id
  * @return	@e void
  */
 public function attachmentUploadShow($msg = "ready", $is_error = 0, $insert_id = 0)
 {
     /* INIT JSON */
     $JSON = array();
     $JSON['msg'] = $msg;
     $JSON['is_error'] = $is_error;
     $is_reset = 0;
     /* JSON Data */
     $JSON['attach_post_key'] = $attach_post_key = trim(IPSText::alphanumericalClean($this->request['attach_post_key']));
     $JSON['attach_rel_module'] = $attach_rel_module = trim(IPSText::alphanumericalClean($this->request['attach_rel_module']));
     $JSON['attach_rel_id'] = $attach_rel_id = intval($this->request['attach_rel_id']);
     if ($insert_id) {
         $JSON['insert_id'] = $insert_id;
     }
     /* Get extra form fields */
     foreach ($this->request as $k => $v) {
         if (preg_match("#^--ff--#", $k)) {
             $JSON['extra_upload_form_url'] .= '&amp;' . str_replace('--ff--', '', $k) . '=' . $v;
             $JSON['extra_upload_form_url'] .= '&amp;' . $k . '=' . $v;
         }
     }
     /* INIT module */
     $this->class_attach->type = $attach_rel_module;
     $this->class_attach->attach_post_key = $attach_post_key;
     $this->class_attach->init();
     $this->class_attach->getUploadFormSettings();
     /* Load Language Bits */
     $this->registry->getClass('class_localization')->loadLanguageFile(array('lang_post'));
     /* Generate current items... */
     $_more = $attach_rel_id ? ' OR c.attach_rel_id=' . $attach_rel_id : '';
     $this->DB->build(array('select' => 'c.*', 'from' => array('attachments' => 'c'), 'where' => "c.attach_rel_module='{$attach_rel_module}' AND c.attach_post_key='{$attach_post_key}'{$_more}", 'add_join' => array(array('select' => 't.*', 'from' => array('attachments_type' => 't'), 'where' => 't.atype_extension=c.attach_ext', 'type' => 'left'))));
     $this->DB->execute();
     while ($row = $this->DB->fetch()) {
         if ($attach_rel_module != $row['attach_rel_module']) {
             continue;
         }
         if ($insert_id && $row['attach_id'] == $insert_id || $this->request['fetch_all']) {
             if ($row['attach_is_image'] and !$row['attach_thumb_location']) {
                 $row['attach_thumb_location'] = $row['attach_location'];
                 $row['attach_thumb_width'] = $row['attach_width'];
                 $row['attach_thumb_height'] = $row['attach_height'];
             }
             $JSON['current_items'][$row['attach_id']] = array($row['attach_id'], str_replace(array('[', ']'), '', $row['attach_file']), $row['attach_filesize'], $row['attach_is_image'], $row['attach_thumb_location'], $row['attach_thumb_width'], $row['attach_thumb_height'], $row['atype_img']);
         }
     }
     $JSON['attach_stats'] = $this->class_attach->attach_stats;
     /* Formatting nonsense for special char sets */
     $result = IPSText::jsonEncodeForTemplate($JSON);
     IPSDebug::addLogMessage($result, 'uploads');
     /* Return JSON */
     return $result;
 }
 /**
  * Fetches the output
  *
  * @access	public
  * @param	string		Output gathered
  * @param	string		Title of the document
  * @param	array 		Navigation gathered
  * @param	array 		Array of document head items
  * @param	array 		Array of JS loader items
  * @param	array 		Array of extra data
  * @return	string		Output to be printed to the client
  */
 public function fetchOutput($output, $title, $navigation, $documentHeadItems, $jsLoaderItems, $extraData = array())
 {
     //-----------------------------------------
     // INIT
     //-----------------------------------------
     $system_vars_cache = $this->caches['systemvars'];
     $pmData = FALSE;
     $notificationLatest = array();
     //-----------------------------------------
     // NORMAL
     //-----------------------------------------
     if ($this->_outputType == 'normal') {
         //-----------------------------------------
         // Do we have a notification show?
         //-----------------------------------------
         if (!empty($this->memberData['msg_show_notification']) and $this->memberData['_cache']['show_notification_popup']) {
             if (!$this->settings['board_offline'] or $this->memberData['g_access_offline']) {
                 if (strpos(ipsRegistry::$settings['query_string_real'], 'module=messaging') === false) {
                     IPSMember::save($this->memberData['member_id'], array('core' => array('msg_show_notification' => 0)));
                     /* Grab inline notifications... */
                     $classToLoad = IPSLib::loadLibrary(IPS_ROOT_PATH . '/sources/classes/member/notifications.php', 'notifications');
                     $notifyLibrary = new $classToLoad($this->registry);
                     $notifyLibrary->setMember($this->memberData);
                     $tmp = $notifyLibrary->getLatestNotificationForInlinePopUp();
                     $weNeed = array('notify_title', 'member_member_id', 'member_PhotoTag', 'member_members_display_name', 'date_parsed', 'title', 'url', 'type', 'content', 'member_HoverCard');
                     foreach ($weNeed as $k) {
                         $notificationLatest[$k] = $tmp[$k];
                     }
                 }
             }
         }
         //-----------------------------------------
         // Add identifier URL
         //-----------------------------------------
         $http = 'http://';
         if (strpos($this->settings['board_url'], 'https://') === 0) {
             $http = 'https://';
         }
         $this->addMetaTag('identifier-url', $http . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
         //-----------------------------------------
         // Add in task image?
         //-----------------------------------------
         $task = '';
         $system_vars_cache['task_next_run'] = isset($system_vars_cache['task_next_run']) ? $system_vars_cache['task_next_run'] : 0;
         if (!$this->settings['task_use_cron'] and time() >= $system_vars_cache['task_next_run'] or defined('FORCE_TASK_KEY')) {
             $_url = !$this->registry->getClass('output')->isHTTPS ? $this->settings['base_url'] : $this->settings['base_url_https'];
             $task = "<div><img src='" . $_url . "app=core&amp;module=task' alt='' style='border: 0px;height:1px;width:1px;' /></div>";
         }
         //-----------------------------------------
         // Grab output
         //-----------------------------------------
         /* Inline msg */
         $inlineMsg = $this->member->sessionClass()->getInlineMessage();
         $templateName = 'globalTemplate';
         $templateGroup = 'global';
         if ($this->useMinimalWrapper) {
             $templateName = 'globalTemplateMinimal';
             $templateGroup = 'global_other';
         }
         /* Do pagination */
         if (strstr($title, '<%pageNumber%>')) {
             $replace = $this->_current_page_title ? ' ' . $this->lang->words['page_title_page'] . ' ' . $this->_current_page_title : '';
             $title = str_replace('<%pageNumber%>', $replace, $title);
         } else {
             if ($this->_current_page_title) {
                 $title = $title . ' ' . $this->lang->words['page_title_page'] . ' ' . $this->_current_page_title;
             }
         }
         $finalOutput = $this->output->getTemplate($templateGroup)->{$templateName}($output, $documentHeadItems, $this->_css, $jsLoaderItems, $this->_metaTags, array('title' => $title, 'applications' => $this->core_fetchApplicationData(), 'page' => $this->_current_page_title, 'notifications' => $notificationLatest ? IPSText::jsonEncodeForTemplate($notificationLatest) : '', 'inlineMsg' => $inlineMsg), array('navigation' => $navigation, 'adHeaderCode' => !empty($extraData['adHeaderCode']) ? $extraData['adHeaderCode'] : '', 'adFooterCode' => !empty($extraData['adFooterCode']) ? $extraData['adFooterCode'] : ''), array('time' => $this->registry->getClass('class_localization')->getDate(time(), 'SHORT', 1), 'mark_read_apps' => IPSLib::getEnabledApplications('itemMarking'), 'lang_chooser' => $this->html_buildLanguageDropDown(), 'skin_chooser' => $this->html_fetchSetsDropDown(), 'copyright' => $this->html_fetchCopyright()), array('ex_time' => (isset($this->request['faster']) and $this->request['faster'] == 'yes') ? $this->_getFasterText() : sprintf("%.4f", IPSDebug::endTimer()), 'gzip_status' => $this->settings['disable_gzip'] == 1 ? $this->lang->words['gzip_off'] : $this->lang->words['gzip_on'], 'server_load' => ipsRegistry::$server_load, 'queries' => $this->DB->getQueryCount(), 'task' => $task));
     } else {
         if ($this->_outputType == 'redirect') {
             $extraData['full'] = 1;
             # SEO?
             if ($extraData['seoTitle']) {
                 $extraData['url'] = $this->output->buildSEOUrl($extraData['url'], 'none', $extraData['seoTitle'], $extraData['seoTemplate']);
             }
             $finalOutput = $this->output->getTemplate('global_other')->redirectTemplate($documentHeadItems, $this->_css, $jsLoaderItems, $extraData['text'], $extraData['url'], $extraData['full']);
         } else {
             if ($this->_outputType == 'popup') {
                 $finalOutput = $this->output->getTemplate('global_other')->displayPopUpWindow($documentHeadItems, $this->_css, $jsLoaderItems, $title, $output);
             }
         }
     }
     //-----------------------------------------
     // Set a class on the body for print
     //-----------------------------------------
     if ($this->_printOnly) {
         $finalOutput = str_replace("<body", "<body class='printpreview'", $finalOutput);
     }
     //-----------------------------------------
     // Return
     //-----------------------------------------
     return $finalOutput;
 }
 function tagTextEntryBox($tags, $options, $where)
 {
     $IPBHTML = "";
     if (IPSLib::locationHasHooks('skin_global_other', $this->_funcHooks['tagTextEntryBox'])) {
         $count_819cf4db0cce1db6dbcb4f32ae9b0d1b = is_array($this->functionData['tagTextEntryBox']) ? count($this->functionData['tagTextEntryBox']) : 0;
         $this->functionData['tagTextEntryBox'][$count_819cf4db0cce1db6dbcb4f32ae9b0d1b]['tags'] = $tags;
         $this->functionData['tagTextEntryBox'][$count_819cf4db0cce1db6dbcb4f32ae9b0d1b]['options'] = $options;
         $this->functionData['tagTextEntryBox'][$count_819cf4db0cce1db6dbcb4f32ae9b0d1b]['where'] = $where;
     }
     $options['lang']['tag_add_link'] = $this->lang->words['add_a_tag'];
     $options['lang']['tip_text'] = $this->lang->words['tag_tip'];
     $options['forceLowercase'] = $this->settings['tags_force_lower'];
     $options['existingTags'] = count($tags['tags']) ? $tags['tags'] : null;
     $_tmp = $options;
     /* Always return as UTF-8 */
     $jsonEncoded = IPSText::jsonEncodeForTemplate($_tmp);
     $IPBHTML .= "" . $this->registry->getClass('output')->addJSModule("tags", "0") . "\n<input type=\"text\" class=\"input_text\" size=\"50\" value=\"\" name=\"{$options['fieldId']}\" id=\"{$options['fieldId']}\" " . (!$options['isOpenSystem'] ? "readonly=\"readonly\"" : "") . " />\n" . ($options['prefixesEnabled'] && !$this->memberData['gbw_disable_prefixes'] ? "&nbsp;&nbsp;<span class=\"desc lighter\"><input type=\"checkbox\" value=\"1\" name=\"{$options['fieldId']}_prefix\" id=\"{$options['fieldId']}_prefix\" " . (($tags['formatted']['prefix'] or $this->request[$options['fieldId'] . '_prefix']) ? "checked='checked'" : "") . " /> {$this->lang->words['firsttagprefix']}</span>" : "") . "\n" . (!$options['minTags'] && $options['maxTags'] ? "\n\t<br /><span class='desc lighter'>" . sprintf($this->lang->words['tags_max_no_min'], $options['maxTags']) . "</span>\n" : "") . "\n" . ($options['minTags'] && !$options['maxTags'] ? "\n\t<br /><span class='desc lighter'>" . sprintf($this->lang->words['tags_min_no_max'], $options['minTags']) . "</span>\n" : "") . "\n" . ($options['minTags'] && $options['maxTags'] ? "\n\t<br /><span class='desc lighter'>" . sprintf($this->lang->words['tags_max_and_min'], $options['minTags'], $options['maxTags']) . "</span>\n" : "") . "<script type=\"text/javascript\">\n\t\$( \"{$options['fieldId']}\" ).tagify( {$jsonEncoded} );\n</script>";
     return $IPBHTML;
 }
 function tagTextEntryBox($tags, $options, $where)
 {
     $IPBHTML = "";
     $options['lang']['tag_add_link'] = $this->lang->words['add_a_tag'];
     $options['lang']['tip_text'] = $this->lang->words['tag_tip'];
     $options['forceLowercase'] = $this->settings['tags_force_lower'];
     $options['existingTags'] = count($tags['tags']) ? $tags['tags'] : null;
     $_tmp = $options;
     /* Always return as UTF-8 */
     $jsonEncoded = IPSText::jsonEncodeForTemplate($_tmp);
     $IPBHTML .= "<script type='text/javascript' src=\"{$this->settings['public_dir']}js/ips.tags.mobile.js\"></script>\n<a href='#' id='{$options['fieldId']}_tag_button' class='ipsTagBox_launcher'>{$this->lang->words['mob_edit_tags']}</a>\n<div class='ipsFilterPane' id='{$options['fieldId']}_tag_pane' style='display: none'>\n\t<a href='#' id='{$options['fieldId']}_close_pane' class='ipsFilterPane_close'><span>&times;</span></a>\n\t<div>\n\t\t<h4>{$this->lang->words['topictagsh4']}</h4>\n\t\t" . (!$options['minTags'] && $options['maxTags'] ? "\n\t\t\t<h5>" . sprintf($this->lang->words['tags_max_no_min'], $options['maxTags']) . "</h5>\n\t\t" : "") . "" . ($options['minTags'] && !$options['maxTags'] ? "\n\t\t\t<h5>" . sprintf($this->lang->words['tags_min_no_max'], $options['minTags']) . "</h5>\n\t\t" : "") . "" . ($options['minTags'] && $options['maxTags'] ? "\n\t\t\t<h5>" . sprintf($this->lang->words['tags_max_and_min'], $options['minTags'], $options['maxTags']) . "</h5>\n\t\t" : "") . "\n\t\t<div class='ipsFilterPane_inner'>\n\t\t\t<div class='ipsTagBox'>\n\t\t\t\t<ul id='{$options['fieldId']}_tags' class='ipsTagBox_taglist'></ul>\n\t\t\t</div>\n\t\t\t<div class='ipsTagBox_editor'>\n\t\t\t\t<span id='{$options['fieldId']}_addwrap'>\n\t\t\t\t\t" . (!$options['isOpenSystem'] ? "<select id='{$options['fieldId']}_tag_select' class='input_select'>\n\t\t\t\t\t\t\t" . (!empty($options['predefinedTags']) ? "" . $this->__f__98bebb1ae6aaf59a9dc428c8401fe23e($tags, $options, $where) . "\t\t\t\t\t\t\t" : "") . "\n\t\t\t\t\t\t</select>" : "\n\t\t\t\t\t\t<input type='text' id='{$options['fieldId']}_tag_input' class='input_text' />\n\t\t\t\t\t") . " <input type='submit' value='{$this->lang->words['mob_add_tag']}' class='input_submit' id='{$options['fieldId']}_tag_add' />\n\t\t\t\t</span>\n\t\t\t\t<span id='{$options['fieldId']}_removewrap' style='display: none'>\n\t\t\t\t\t<input type='submit' value='{$this->lang->words['mob_remove_tag']}' id='{$options['fieldId']}_tag_remove' class='input_submit ipsTagBox_remove' />\n\t\t\t\t</span>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n<input type=\"text\" value=\"\" name=\"{$options['fieldId']}\" id=\"{$options['fieldId']}\" style='display: none' /><script type=\"text/javascript\">\n\t\$( \"{$options['fieldId']}\" ).mobileTagify( {$jsonEncoded} );\n</script>";
     return $IPBHTML;
 }
Beispiel #8
0
 /**
  * Archive Rules overview
  *
  * @return	@e void
  */
 protected function _archiveRules()
 {
     /* Get archive count so far */
     $counts = $this->archiveWriter->getArchivePossibleCount();
     $rules = $this->archiveWriter->getRulesFromDb();
     if ($counts['count'] < 1) {
         $textString = $this->lang->words['archive_no_query'];
     } else {
         $textString = sprintf($this->lang->words['archive_x_query'], $counts['percentage'], $this->lang->formatNumber($counts['count']), $this->lang->formatNumber($counts['total']));
     }
     /* Post process */
     foreach (array('archive', 'skip') as $type) {
         if (!empty($rules[$type]['forum']['text'])) {
             $ids = IPSLib::isSerialized($rules[$type]['forum']['text']) ? unserialize($rules[$type]['forum']['text']) : array();
             if (count($ids)) {
                 foreach ($ids as $fid) {
                     $data = $this->registry->class_forums->getForumbyId($fid);
                     if ($data['id']) {
                         $rules[$type]['forum']['_parseData'][$fid] = array('data' => $this->registry->class_forums->getForumbyId($fid), 'nav' => $this->html->buildForumNav($this->registry->class_forums->forumsBreadcrumbNav($fid, 'showforum=', true)));
                     }
                 }
             }
         }
         if (!empty($rules[$type]['member']['text'])) {
             $ids = IPSLib::isSerialized($rules[$type]['member']['text']) ? unserialize($rules[$type]['member']['text']) : array();
             if (count($ids)) {
                 $members = IPSMember::load($ids, 'all');
                 foreach ($members as $id => $data) {
                     $members[$id] = IPSMember::buildProfilePhoto($members[$id]);
                     $members[$id]['photoTag'] = IPSMember::buildPhotoTag($members[$id], 'inset');
                 }
                 foreach ($ids as $fid) {
                     $rules[$type]['member']['_parseData']['count'] = count($members);
                     $rules[$type]['member']['_parseData']['data'] = $members;
                 }
             }
         }
     }
     /* Show rules page */
     $this->registry->output->html .= $this->html->archiveRules(IPSText::jsonEncodeForTemplate($rules), $textString);
 }
Beispiel #9
0
    function editor($formField = 'post', $content = '', $options = array(), $autoSaveData = array())
    {
        $IPBHTML = "";
        //--starthtml--//
        $options['type'] = $options['type'] ? $options['type'] : "''";
        $options['minimize'] = intval($options['minimize']);
        $options['smilies'] = IPSText::jsonEncodeForTemplate(is_array($options['smilies']) ? $options['smilies'] : array());
        $options['noSmilies'] = intval($options['noSmilies']);
        $bbcode = IPSLib::fetchBbcodeAsJson();
        $defaultSkin = $this->registry->output->_fetchSkinByDefault();
        if (!$this->_editorJsLoaded) {
            $this->_editorJsLoaded = true;
            if (defined("CK_LOAD_SOURCE") and CK_LOAD_SOURCE) {
                $IPBHTML .= <<<EOF
\t\t<script type="text/javascript" src="{$this->settings['js_base_url']}js/3rd_party/ckeditor/ckeditor_source.js"></script>
EOF;
            } else {
                $IPBHTML .= <<<EOF
\t\t<script type="text/javascript" src="{$this->settings['js_base_url']}js/3rd_party/ckeditor/ckeditor.js"></script>
EOF;
            }
            $CmdVAsPlainText = $this->memberData['bw_paste_plain'] ? 'true' : 'false';
            $IPBHTML .= <<<EOF
<script type="text/javascript" src='{$this->settings['cache_dir']}lang_cache/{$this->lang->lang_id}/ipb.lang.js' charset='{$this->settings['gb_char_set']}'></script>
<script type="text/javascript" src="{$this->settings['js_base_url']}js/ips.textEditor.js"></script>
<script type="text/javascript" src="{$this->settings['js_base_url']}js/ips.textEditor.bbcode.js"></script>
<script type="text/javascript">
\t/* Dynamic items */
\tCKEDITOR.config.IPS_BBCODE          = {$bbcode};
\tCKEDITOR.config.IPS_BBCODE_IMG_URL  = "{$this->settings['js_base_url']}style_extra/bbcode_icons";
\tCKEDITOR.config.IPS_BBCODE_BUTTONS  = [];
\t
\t/* Has to go before config load */
\tvar IPS_smiley_path\t\t\t= "{$this->settings['emoticons_url']}/";
\tvar IPS_smiles       \t\t= {$options['smilies']};
\tvar IPS_remove_plugins      = [];
\tvar IPS_extra_plugins       = [];

\t/* Load our configuration */
\tCKEDITOR.config.customConfig  = '{$this->settings['js_base_url']}js/3rd_party/ckeditor/ips_config.js';
\t
\t/* Override with prefs */
\tCKEDITOR.config.CmdVAsPlainText = {$CmdVAsPlainText};
</script>
<style type="text/css">
@import url("{$this->settings['css_base_url']}style_css/css_{$defaultSkin}/ipb_ckeditor.css");
</style>
EOF;
        }
        $options['noSmilies'] = intval($options['noSmilies']);
        $options['isRte'] = intval($options['isRte']);
        $options['isHtml'] = intval($options['isHtml']);
        $options['autoSaveKey'] = $options['autoSaveKey'] ? $options['autoSaveKey'] : '';
        $jsonEncoded = IPSText::jsonEncodeForTemplate($autoSaveData);
        $IPBHTML .= <<<EOF
<input type='hidden' name='noSmilies' id='noSmilies_{$options['editorName']}' value='{$options['noSmilies']}' />
<textarea id="{$options['editorName']}" name="{$formField}" class='ips_EditorTextArea'>{$content}</textarea>
<a id="ips_switchEditor" style="display:none" href="javascript:void()">Switch to Rich Text Editor</a>
<span id='editor_html_message_{$options['editorName']}'>&nbsp;</span>
<script type="text/javascript">
\tipb.textEditor.initialize('{$options['editorName']}', { type: '{$options['type']}',
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tminimize: {$options['minimize']},
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbypassCKEditor: {$options['bypassCKEditor']},
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisRte: {$options['isRte']},
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisHtml: {$options['isHtml']},
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnoSmilies: {$options['noSmilies']},
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tips_AutoSaveKey: '{$options['autoSaveKey']}',
\t\t\t\t\t\t\t\t\t\t\t\t\t        ips_AutoSaveData: {$jsonEncoded} } );
</script>
EOF;
        //--endhtml--//
        return $IPBHTML;
    }
Beispiel #10
0
 function tagTextEntryBox($tags, $options, $where)
 {
     $IPBHTML = "";
     if (IPSLib::locationHasHooks('skin_global_other', $this->_funcHooks['tagTextEntryBox'])) {
         $count_dbb6bba522a5fb59f97e4baf4f666cc0 = is_array($this->functionData['tagTextEntryBox']) ? count($this->functionData['tagTextEntryBox']) : 0;
         $this->functionData['tagTextEntryBox'][$count_dbb6bba522a5fb59f97e4baf4f666cc0]['tags'] = $tags;
         $this->functionData['tagTextEntryBox'][$count_dbb6bba522a5fb59f97e4baf4f666cc0]['options'] = $options;
         $this->functionData['tagTextEntryBox'][$count_dbb6bba522a5fb59f97e4baf4f666cc0]['where'] = $where;
     }
     $options['lang']['tag_add_link'] = $this->lang->words['add_a_tag'];
     $options['lang']['tip_text'] = $this->lang->words['tag_tip'];
     $options['forceLowercase'] = $this->settings['tags_force_lower'];
     $options['existingTags'] = count($tags['tags']) ? $tags['tags'] : null;
     $_tmp = $options;
     /* Always return as UTF-8 */
     $jsonEncoded = IPSText::jsonEncodeForTemplate($_tmp);
     $IPBHTML .= "<script type='text/javascript' src=\"{$this->settings['public_dir']}js/ips.tags.mobile.js\"></script>\n<a href='#' id='{$options['fieldId']}_tag_button' class='ipsTagBox_launcher'>{$this->lang->words['mob_edit_tags']}</a>\n<div class='ipsFilterPane' id='{$options['fieldId']}_tag_pane' style='display: none'>\n\t<a href='#' id='{$options['fieldId']}_close_pane' class='ipsFilterPane_close'><span>&times;</span></a>\n\t<div>\n\t\t<h4>{$this->lang->words['topictagsh4']}</h4>\n\t\t" . (!$options['minTags'] && $options['maxTags'] ? "\n\t\t\t<h5>" . sprintf($this->lang->words['tags_max_no_min'], $options['maxTags']) . "</h5>\n\t\t" : "") . "" . ($options['minTags'] && !$options['maxTags'] ? "\n\t\t\t<h5>" . sprintf($this->lang->words['tags_min_no_max'], $options['minTags']) . "</h5>\n\t\t" : "") . "" . ($options['minTags'] && $options['maxTags'] ? "\n\t\t\t<h5>" . sprintf($this->lang->words['tags_max_and_min'], $options['minTags'], $options['maxTags']) . "</h5>\n\t\t" : "") . "\n\t\t<div class='ipsFilterPane_inner'>\n\t\t\t<div class='ipsTagBox'>\n\t\t\t\t<ul id='{$options['fieldId']}_tags' class='ipsTagBox_taglist'></ul>\n\t\t\t</div>\n\t\t\t<div class='ipsTagBox_editor'>\n\t\t\t\t<span id='{$options['fieldId']}_addwrap'>\n\t\t\t\t\t" . (!$options['isOpenSystem'] ? "<select id='{$options['fieldId']}_tag_select' class='input_select'>\n\t\t\t\t\t\t\t" . (!empty($options['predefinedTags']) ? "" . $this->__f__384d5ad69e1b874c432b54e1fb63e3dc($tags, $options, $where) . "\t\t\t\t\t\t\t" : "") . "\n\t\t\t\t\t\t</select>" : "\n\t\t\t\t\t\t<input type='text' id='{$options['fieldId']}_tag_input' class='input_text' />\n\t\t\t\t\t") . " <input type='submit' value='{$this->lang->words['mob_add_tag']}' class='input_submit' id='{$options['fieldId']}_tag_add' />\n\t\t\t\t</span>\n\t\t\t\t<span id='{$options['fieldId']}_removewrap' style='display: none'>\n\t\t\t\t\t<input type='submit' value='{$this->lang->words['mob_remove_tag']}' id='{$options['fieldId']}_tag_remove' class='input_submit ipsTagBox_remove' />\n\t\t\t\t</span>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n<input type=\"text\" value=\"\" name=\"{$options['fieldId']}\" id=\"{$options['fieldId']}\" style='display: none' /><script type=\"text/javascript\">\n\t\$( \"{$options['fieldId']}\" ).mobileTagify( {$jsonEncoded} );\n</script>";
     return $IPBHTML;
 }