get('frontedition', '1', 'int'); if ($enableFrontedition == 0) return; // load language file $lang = \JFactory::getLanguage(); $lang->load('com_pagebuilderck', JPATH_SITE . '/components/com_pagebuilderck', $lang->getTag(), false); global $pagebuilderckEditionLoaded, $ckFrontEditionLoaded; $pagebuilderckEditionLoaded = true; $input = CKFof::getInput(); $user = CKFof::getUser(); if ($user->id && $input->get('tckedition', 0, 'int') === 1) { if (! $ckFrontEditionLoaded) echo self::renderMenu(); $editor = \JFactory::getConfig()->get('editor') == 'jce' ? 'jce' : 'tinymce'; $editor = \JEditor::getInstance($editor); $editor->display('ckeditor', $html = '', $width = '', $height = '200px', $col='', $row='', $buttons = true, $id = 'ckeditor'); include_once JPATH_ADMINISTRATOR . '/components/com_pagebuilderck/helpers/menustyles.php'; include_once JPATH_ADMINISTRATOR . '/components/com_pagebuilderck/helpers/stylescss.php'; include_once JPATH_ADMINISTRATOR . '/components/com_pagebuilderck/helpers/ckeditor.php'; include_once JPATH_ADMINISTRATOR . '/components/com_pagebuilderck/helpers/pagebuilderck.php'; include_once(JPATH_ADMINISTRATOR . '/components/com_pagebuilderck/views/page/tmpl/include.php'); include_once(JPATH_ADMINISTRATOR . '/components/com_pagebuilderck/views/page/tmpl/menu.php'); include_once(JPATH_ADMINISTRATOR . '/components/com_pagebuilderck/views/page/tmpl/toolbar.php'); ?> id) { $buttons = self::getActivationButton(); $html = self::getEmptyMenu($buttons); echo $html; ?> id && $input->get('tckedition', 0, 'int') === 1) { // self::renderMenu(); // get current uri $uri = JFactory::getURI(); $current_url = $uri->toString(); // CKFof::redirect(JUri::root(true) . '/index.php?option=com_pagebuilderck&view=frontedition&url=' . urlencode($current_url)); // $this->callTemplateEdition(); }*/ // self::callTemplateEdition(); } public static function getEmptyMenu($buttons = '') { ob_start(); ?>
getQuery() ? self::getCurrentUri() . '&tckedition=1' : self::getCurrentUri() . '?tckedition=1'); ob_start(); ?> toString(); } public static function getCssForEdition() { ob_start(); ?> authorise('core.edit', 'com_pagebuilderck')); // check the ACL from the component config $canusefrontedition = $user->authorise('core.frontedition', 'com_pagebuilderck'); if (! $canusefrontedition) return false; if ($authorised !== true) { return false; // if ($user->guest === 1) // { // $return = base64_encode(CKUri::getInstance()); // $login_url_with_return = \JRoute::_('index.php?option=com_users&return=' . $return); // $app->enqueueMessage(CKText::_('JERROR_ALERTNOAUTHOR'), 'notice'); // $app->redirect($login_url_with_return, 403); // } // else // { // $app->enqueueMessage(CKText::_('JERROR_ALERTNOAUTHOR'), 'error'); // $app->setHeader('status', 403, true); // return; // } } // check that the template is compatible $app = \JFactory::getApplication(); $template = $app->getTemplate(); // load xml file from the template $xml = simplexml_load_file(JPATH_SITE . '/templates/' . $template . '/templateDetails.xml'); // check that the template is made with a compatible version of Template Creator CK if ($xml->generator != 'Template Creator CK') { // JError::raiseWarning(403, CKText::_('The template you are trying to edit has not been created with Template Creator CK, or not the latest version of if. You can download Template Creator CK on https://www.template-creator.com')); return false; } return true; } private static function checkModulesmanagerckCompatibility() { if (! file_exists(JPATH_ROOT . '/components/com_modulesmanagerck/modulesmanagerck.php')) return true; $xmlData = self::getXmlData(JPATH_ROOT . '/administrator/components/com_modulesmanagerck/modulesmanagerck.xml'); $installedVersion = ((string)($xmlData->version)); // if the installed version is the V1 if(version_compare($installedVersion, '1.3.1', '<')) { // if the params is also installed if (\JPluginHelper::isEnabled('system', 'modulesmanagersystemck')) { // throw new \RuntimeException('Slideshow CK Light cannot be installed over Slideshow CK V1 + Params. Please install Slideshow CK Pro to get the same features as previously, else you may loose your existing settings. To downgrade, please first uninstall Slideshow CK Params. Read more'); echo 'WARNING : Modules Manager CK has been detected but its version is not up to date. You must set up your system correctly or it will not work.
Please check the documentation