Esempio n. 1
0
 protected function _getBbmBbCodeAddEditResponse(array $code)
 {
     $code = $this->_getBbmBbCodePermissions($code);
     $addOnModel = $this->_getAddOnModel();
     list($mceSupport, $redactorSupport) = BBM_Helper_Editors::getCompatibility();
     $viewParams = array('addOnOptions' => $addOnModel->getAddOnOptionsListIfAvailable(), 'addOnSelected' => isset($code['bbcode_addon']) ? $code['bbcode_addon'] : $addOnModel->getDefaultAddOnId(), 'mceSupport' => $mceSupport, 'redactorSupport' => $redactorSupport, 'code' => $code, 'quattroSets' => BBM_Helper_QuattroUnicode::getunicodeSets(), 'activeTags' => $this->_getBbmBBCodeModel()->getActiveTags($code), 'faFonts' => array_flip(BBM_Helper_FontAwesome::getFonts()));
     //Check if the edit is made from the button manager
     if (isset($_GET['bm'])) {
         $viewParams['code']['bm_src'] = $_GET['bm'];
         return $this->responseView('Bbm_ViewAdmin_Bbm_BbCodes_Edit', 'bbm_bb_codes_edit_overlay', $viewParams);
     }
     return $this->responseView('Bbm_ViewAdmin_Bbm_BbCodes_Edit', 'bbm_bb_codes_edit', $viewParams);
 }
Esempio n. 2
0
 public function checkEditorConfigCompatibility($config_ed)
 {
     list($mceSupport, $redactorSupport) = BBM_Helper_Editors::getCompatibility();
     if ($config_ed == 'xen' && !$redactorSupport) {
         throw $this->responseException($this->responseError(new XenForo_Phrase('bbm_config_redactor_unsupported'), 404));
     }
     if ($config_ed == 'mce' && !$mceSupport) {
         throw $this->responseException($this->responseError(new XenForo_Phrase('bbm_config_mce_unsupported'), 404));
     }
 }