From ace83c8a7544c4375c420162d5eca19456242017 Mon Sep 17 00:00:00 2001 From: Md Siddiqur Rahman Date: Thu, 13 Oct 2022 14:02:16 +0600 Subject: [PATCH 01/29] update namespace --- plugins/system/helix3/core/helix3.php | 159 +++++++++--------- plugins/system/helix3/fields/asset.php | 24 +-- plugins/system/helix3/fields/button.php | 6 +- plugins/system/helix3/fields/group.php | 19 ++- plugins/system/helix3/fields/icon.php | 22 +-- plugins/system/helix3/fields/layout.php | 12 +- plugins/system/helix3/fields/layoutlist.php | 24 +-- plugins/system/helix3/fields/megamenu.php | 4 +- plugins/system/helix3/fields/menulayout.php | 28 +-- plugins/system/helix3/fields/modpos.php | 22 ++- plugins/system/helix3/fields/optionio.php | 14 +- plugins/system/helix3/fields/presets.php | 31 ++-- plugins/system/helix3/fields/spgallery.php | 36 ++-- plugins/system/helix3/fields/spimage.php | 26 ++- plugins/system/helix3/fields/typography.php | 29 ++-- plugins/system/helix3/helix3.php | 101 +++++------ plugins/system/helix3/layout/generated.php | 46 ++--- .../layout/layout-settings/fields-helper.php | 16 +- .../layout-settings/row-column-settings.php | 152 ++++++++--------- plugins/system/helix3/layout/types/color.php | 6 +- plugins/system/helix3/layout/types/media.php | 27 +-- .../helix3/layouts/frontend/generate.php | 11 +- .../helix3/layouts/frontend/modules.php | 8 +- .../system/helix3/layouts/frontend/rows.php | 28 +-- plugins/system/helix3/params/menu-child.xml | 4 +- templates/shaper_helix3/css/template.css | 6 +- 26 files changed, 472 insertions(+), 389 deletions(-) diff --git a/plugins/system/helix3/core/helix3.php b/plugins/system/helix3/core/helix3.php index 416da8d..b09b508 100644 --- a/plugins/system/helix3/core/helix3.php +++ b/plugins/system/helix3/core/helix3.php @@ -1,18 +1,21 @@ document = JFactory::getDocument(); + self::getInstance()->document = Factory::getDocument(); $doc = self::getInstance()->document; if (is_string($key)) { @@ -62,15 +65,15 @@ public static function getDocument($key = false) public static function getParam($key) { - $params = JFactory::getApplication()->getTemplate(true)->params; + $params = Factory::getApplication()->getTemplate(true)->params; return $params->get($key); } public static function loadHead() { - $doc = JFactory::getDocument(); - $app = JFactory::getApplication(); + $doc = Factory::getDocument(); + $app = Factory::getApplication(); $option = $app->input->get('option', ''); $view = $app->input->get('view', ''); $layout = $app->input->get('layout', ''); @@ -78,7 +81,7 @@ public static function loadHead() // Favicon if ($favicon = self::getParam('favicon')) { - $doc->addFavicon(JURI::base(true) . '/' . $favicon); + $doc->addFavicon(Uri::base(true) . '/' . $favicon); } else { @@ -90,28 +93,28 @@ public static function loadHead() { if (JVERSION < 4) { - $doc->addStylesheet(JURI::base(true) . '/plugins/system/helix3/assets/css/system.j3.min.css'); + $doc->addStylesheet(Uri::base(true) . '/plugins/system/helix3/assets/css/system.j3.min.css'); } else { - $doc->addStylesheet(JURI::base(true) . '/plugins/system/helix3/assets/css/system.j4.min.css'); + $doc->addStylesheet(Uri::base(true) . '/plugins/system/helix3/assets/css/system.j4.min.css'); } } // web fonts self::loadWebFonts(); - JHtml::_('jquery.framework'); + HTMLHelper::_('jquery.framework'); // Remove Joomla core bootstrap if (JVERSION < 4) { - JHtml::_('bootstrap.framework'); - if(isset($doc->_scripts[JUri::base(true) . '/media/jui/js/bootstrap.min.js'])) { - unset($doc->_scripts[JUri::base(true) . '/media/jui/js/bootstrap.min.js']); + HTMLHelper::_('bootstrap.framework'); + if(isset($doc->_scripts[Uri::base(true) . '/media/jui/js/bootstrap.min.js'])) { + unset($doc->_scripts[Uri::base(true) . '/media/jui/js/bootstrap.min.js']); } - $doc->addScript(JUri::root(true) . '/plugins/system/helix3/assets/js/bootstrap.legacy.js'); + $doc->addScript(Uri::root(true) . '/plugins/system/helix3/assets/js/bootstrap.legacy.js'); } echo ''; @@ -120,8 +123,8 @@ public static function loadHead() //Body Class public static function bodyClass($class = '') { - $app = JFactory::getApplication(); - $doc = JFactory::getDocument(); + $app = Factory::getApplication(); + $doc = Factory::getDocument(); $language = $doc->language; $direction = $doc->direction; $option = str_replace('_', '-', $app->input->getCmd('option', '')); @@ -153,7 +156,7 @@ public static function bodyClass($class = '') //Get view public static function view($class = '') { - $app = JFactory::getApplication(); + $app = Factory::getApplication(); $view = $app->input->getCmd('view', ''); $layout = $app->input->getCmd('layout', ''); @@ -168,13 +171,13 @@ public static function view($class = '') //Get Template name public static function getTemplate() { - return JFactory::getApplication()->getTemplate(); + return Factory::getApplication()->getTemplate(); } //Get Template URI public static function getTemplateUri() { - return JURI::base(true) . '/templates/' . self::getTemplate(); + return Uri::base(true) . '/templates/' . self::getTemplate(); } /** @@ -190,20 +193,20 @@ public static function Param($name = true, $value = null) // if $name = true, this will return all param data if (is_bool($name) and $name == true) { - return JFactory::getApplication()->getTemplate(true)->params; + return Factory::getApplication()->getTemplate(true)->params; } // if $value = null, this will return specific param data if (is_null($value)) { - return JFactory::getApplication()->getTemplate(true)->params->get($name); + return Factory::getApplication()->getTemplate(true)->params->get($name); } // if $value not = null, this will set a value in specific name. - $data = JFactory::getApplication()->getTemplate(true)->params->get($name); + $data = Factory::getApplication()->getTemplate(true)->params->get($name); if (is_null($data) or !isset($data)) { - JFactory::getApplication()->getTemplate(true)->params->set($name, $value); + Factory::getApplication()->getTemplate(true)->params->set($name, $value); return $value; } @@ -224,12 +227,12 @@ public static function Param($name = true, $value = null) private static function importFeatures() { - $template = JFactory::getApplication()->getTemplate(); + $template = Factory::getApplication()->getTemplate(); $path = JPATH_THEMES . '/' . $template . '/features'; if (file_exists($path)) { - $files = JFolder::files($path, '.php'); + $files = Folder::files($path, '.php'); if (count($files)) { @@ -237,7 +240,7 @@ private static function importFeatures() { include_once $path . '/' . $file; - $name = JFile::stripExt($file); + $name = File::stripExt($file); $class = 'Helix3Feature' . ucfirst($name); $class = new $class(self::getInstance()); @@ -277,17 +280,17 @@ public static function generatelayout() self::getInstance()->addCSS('custom.css'); self::getInstance()->addJS('custom.js'); - $doc = JFactory::getDocument(); - $app = JFactory::getApplication(); + $doc = Factory::getDocument(); + $app = Factory::getApplication(); $option = $app->input->get('option', ''); $view = $app->input->get('view', ''); $layout = $app->input->get('layout', ''); $pagebuilder = false; - $params = JFactory::getApplication()->getTemplate(true)->params; + $params = Factory::getApplication()->getTemplate(true)->params; if ($option == 'com_sppagebuilder') { - $doc->addStylesheet(JURI::base(true) . '/plugins/system/helix3/assets/css/pagebuilder.css'); + $doc->addStylesheet(Uri::base(true) . '/plugins/system/helix3/assets/css/pagebuilder.css'); $pagebuilder = true; } @@ -312,7 +315,7 @@ public static function generatelayout() if (empty($rows)) { $layout_file = JPATH_SITE . '/templates/' . self::getTemplate() . '/layout/default.json'; - if (!JFile::exists($layout_file)) + if (!File::exists($layout_file)) { die('Default Layout file is not exists! Please goto to template manager and create a new layout first.'); } @@ -341,7 +344,7 @@ public static function generatelayout() $fluidrow = $row->settings->fluidrow; } - $id = (empty($row->settings->name)) ? 'sp-section-' . ($key + 1) : 'sp-' . JFilterOutput::stringURLSafe($row->settings->name); + $id = (empty($row->settings->name)) ? 'sp-section-' . ($key + 1) : 'sp-' . OutputFilter::stringURLSafe($row->settings->name); $row_class = ''; @@ -397,7 +400,7 @@ public static function generatelayout() if (!empty($row->settings->background_image)) { - $row_css .= 'background-image:url("' . JURI::base(true) . '/' . htmlspecialchars((JVERSION < 4 ? $row->settings->background_image : JHtml::cleanImageURL($row->settings->background_image)->url), ENT_COMPAT, 'UTF-8') . '");'; + $row_css .= 'background-image:url("' . Uri::base(true) . '/' . htmlspecialchars((JVERSION < 4 ? $row->settings->background_image : HTMLHelper::cleanImageURL($row->settings->background_image)->url), ENT_COMPAT, 'UTF-8') . '");'; if (!empty($row->settings->background_repeat)) { $row_css .= 'background-repeat:' . $row->settings->background_repeat . ';'; @@ -476,14 +479,14 @@ public static function generatelayout() 'componentArea' => $componentArea, ); - $template = JFactory::getApplication()->getTemplate(); + $template = Factory::getApplication()->getTemplate(); $themepath = JPATH_THEMES . '/' . $template; $generate_file = $themepath . '/html/layouts/helix3/frontend/generate.php'; $lyt_thm_path = $themepath . '/html/layouts/helix3/'; $layout_path = (file_exists($generate_file)) ? $lyt_thm_path : JPATH_ROOT .'/plugins/system/helix3/layouts'; - $getLayout = new JLayoutFile('frontend.generate', $layout_path ); + $getLayout = new FileLayout('frontend.generate', $layout_path ); $output .= $getLayout->render($layout_data); } @@ -514,7 +517,7 @@ private static function hasComponent($rowColumns) //Get Active Columns private static function rowColumns($columns) { - $doc = JFactory::getDocument(); + $doc = Factory::getDocument(); $cols = array(); //Inactive @@ -583,7 +586,7 @@ private static function rowColumns($columns) //Count Modules public static function countModules($position) { - $doc = JFactory::getDocument(); + $doc = Factory::getDocument(); return ($doc->countModules($position) or self::hasFeature($position)); } @@ -617,7 +620,7 @@ public static function hasFeature($position) public static function addCSS($sources, $attribs = array()) { - $template = JFactory::getApplication()->getTemplate(); + $template = Factory::getApplication()->getTemplate(); $path = JPATH_THEMES . '/' . $template . '/css/'; $srcs = array(); @@ -639,7 +642,7 @@ public static function addCSS($sources, $attribs = array()) if (file_exists($path . $src)) { - self::getInstance()->document->addStyleSheet(JURI::base(true) . '/templates/' . $template . '/css/' . $src, 'text/css', null, $attribs); + self::getInstance()->document->addStyleSheet(Uri::base(true) . '/templates/' . $template . '/css/' . $src, 'text/css', null, $attribs); } else { @@ -666,7 +669,7 @@ public static function addJS($sources, $seperator = ',') $srcs = array(); - $template = JFactory::getApplication()->getTemplate(); + $template = Factory::getApplication()->getTemplate(); $path = JPATH_THEMES . '/' . $template . '/js/'; if (is_string($sources)) @@ -686,7 +689,7 @@ public static function addJS($sources, $seperator = ',') if (file_exists($path . $src)) { - self::getInstance()->document->addScript(JURI::base(true) . '/templates/' . $template . '/js/' . $src); + self::getInstance()->document->addScript(Uri::base(true) . '/templates/' . $template . '/js/' . $src); } else { @@ -790,7 +793,7 @@ public static function setLessVariable($name, $value) private static function autoCompileLess($less, $css) { // load the cache - $template = JFactory::getApplication()->getTemplate(); + $template = Factory::getApplication()->getTemplate(); $cachePath = JPATH_CACHE . '/com_templates/templates/' . $template; $cacheFile = $cachePath . '/' . basename($css . ".cache"); @@ -820,7 +823,7 @@ private static function autoCompileLess($less, $css) if (!file_exists($cachePath)) { - JFolder::create($cachePath, 0755); + Folder::create($cachePath, 0755); } file_put_contents($cacheFile, serialize($newCache)); @@ -840,7 +843,7 @@ private static function autoCompileLess($less, $css) */ public static function addLess($less, $css, $attribs = array()) { - $template = JFactory::getApplication()->getTemplate(); + $template = Factory::getApplication()->getTemplate(); $themepath = JPATH_THEMES . '/' . $template; if (self::getParam('lessoption') and self::getParam('lessoption') == '1') @@ -882,7 +885,7 @@ private static function resetCookie($name) */ public static function Preset() { - $template = JFactory::getApplication()->getTemplate(); + $template = Factory::getApplication()->getTemplate(); $name = $template . '_preset'; if (isset($_COOKIE[$name])) @@ -1019,9 +1022,9 @@ public static function loadWebFonts() */ public static function addGoogleFont($fonts) { - $doc = JFactory::getDocument(); + $doc = Factory::getDocument(); $webfonts = ''; - $tpl_path = JPATH_BASE . '/templates/' . JFactory::getApplication()->getTemplate() . '/webfonts/webfonts.json'; + $tpl_path = JPATH_BASE . '/templates/' . Factory::getApplication()->getTemplate() . '/webfonts/webfonts.json'; $plg_path = JPATH_BASE . '/plugins/system/helix3/assets/webfonts/webfonts.json'; if (file_exists($tpl_path)) @@ -1154,8 +1157,8 @@ public static function compressJS($excludes = '') { require_once(__DIR__ . '/classes/Minifier.php'); - $doc = JFactory::getDocument(); - $app = JFactory::getApplication(); + $doc = Factory::getDocument(); + $app = Factory::getApplication(); $view = $app->input->get('view'); $layout = $app->input->get('layout'); @@ -1170,7 +1173,7 @@ public static function compressJS($excludes = '') $all_scripts = $doc->_scripts; $cache_path = JPATH_ROOT . '/cache/com_templates/templates/' . self::getTemplate(); $scripts = array(); - $root_url = JURI::root(true); + $root_url = Uri::root(true); $minifiedCode = ''; $md5sum = ''; @@ -1183,7 +1186,7 @@ public static function compressJS($excludes = '') $js_file = JPATH_ROOT . $key; } - if (JFile::exists($js_file)) + if (File::exists($js_file)) { if (!self::excludeJS($key, $excludes)) { @@ -1207,28 +1210,28 @@ public static function compressJS($excludes = '') //Compress All scripts if ($minifiedCode) { - if (!JFolder::exists($cache_path)) + if (!Folder::exists($cache_path)) { - JFolder::create($cache_path, 0755); + Folder::create($cache_path, 0755); } else { $file = $cache_path . '/' . md5($md5sum) . '.js'; - if (!JFile::exists($file)) + if (!File::exists($file)) { - JFile::write($file, $minifiedCode); + File::write($file, $minifiedCode); } else { if (filesize($file) == 0 || ((filemtime($file) + $cachetime * 60) < time())) { - JFile::write($file, $minifiedCode); + File::write($file, $minifiedCode); } } - $doc->addScript(JURI::base(true) . '/cache/com_templates/templates/' . self::getTemplate() . '/' . md5($md5sum) . '.js'); + $doc->addScript(Uri::base(true) . '/cache/com_templates/templates/' . self::getTemplate() . '/' . md5($md5sum) . '.js'); } } @@ -1251,13 +1254,13 @@ public static function compressCSS() require_once(__DIR__ . '/classes/cssmin.php'); - $doc = JFactory::getDocument(); - $app = JFactory::getApplication(); + $doc = Factory::getDocument(); + $app = Factory::getApplication(); $cachetime = $app->get('cachetime', 15); $all_stylesheets = $doc->_styleSheets; $cache_path = JPATH_ROOT . '/cache/com_templates/templates/' . self::getTemplate(); $stylesheets = array(); - $root_url = JURI::root(true); + $root_url = Uri::root(true); $minifiedCode = ''; $md5sum = ''; @@ -1273,7 +1276,7 @@ public static function compressCSS() global $absolute_url; $absolute_url = $key;//absoulte path of each css file - if (JFile::exists($css_file)) + if (File::exists($css_file)) { $stylesheets[] = $key; $md5sum .= md5($key); @@ -1305,28 +1308,28 @@ function ($matches) //Compress All stylesheets if ($minifiedCode) { - if (!JFolder::exists($cache_path)) + if (!Folder::exists($cache_path)) { - JFolder::create($cache_path, 0755); + Folder::create($cache_path, 0755); } else { $file = $cache_path . '/' . md5($md5sum) . '.css'; - if (!JFile::exists($file)) + if (!File::exists($file)) { - JFile::write($file, $minifiedCode); + File::write($file, $minifiedCode); } else { if (filesize($file) == 0 || ((filemtime($file) + $cachetime * 60) < time())) { - JFile::write($file, $minifiedCode); + File::write($file, $minifiedCode); } } - $doc->addStylesheet(JURI::base(true) . '/cache/com_templates/templates/' . self::getTemplate() . '/' . md5($md5sum) . '.css'); + $doc->addStylesheet(Uri::base(true) . '/cache/com_templates/templates/' . self::getTemplate() . '/' . md5($md5sum) . '.css'); } } diff --git a/plugins/system/helix3/fields/asset.php b/plugins/system/helix3/fields/asset.php index 37e6e34..dd50937 100644 --- a/plugins/system/helix3/fields/asset.php +++ b/plugins/system/helix3/fields/asset.php @@ -6,33 +6,37 @@ * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later */ +use Joomla\CMS\Factory; +use Joomla\CMS\Form\FormField; +use Joomla\CMS\HTML\HTMLHelper; +use Joomla\CMS\Uri\Uri; + //no direct accees defined ('_JEXEC') or die ('resticted aceess'); -jimport('joomla.form.formfield'); -class JFormFieldAsset extends JFormField +class JFormFieldAsset extends FormField { protected $type = 'Asset'; protected function getInput() { $v = $this->getVersion(); - $helix_plg_url = JURI::root(true) . '/plugins/system/helix3'; - $doc = JFactory::getDocument(); - $doc->addScriptdeclaration('var layoutbuilder_base="' . JURI::root() . '";'); + $helix_plg_url = Uri::root(true) . '/plugins/system/helix3'; + $doc = Factory::getDocument(); + $doc->addScriptdeclaration('var layoutbuilder_base="' . Uri::root() . '";'); $doc->addScriptDeclaration("var basepath = '{$helix_plg_url}';"); $doc->addScriptDeclaration("var pluginVersion = '{$v}';"); //Core scripts - JHtml::_('jquery.framework'); + HTMLHelper::_('jquery.framework'); $jVersion = JVERSION < 4 ? '' : '.j4'; - if(JVERSION < 4) + if (JVERSION < 4) { - JHtml::_('jquery.ui', array('core', 'sortable')); - JHtml::_('formbehavior.chosen', 'select'); + HTMLHelper::_('jquery.ui', array('core', 'sortable')); + HTMLHelper::_('formbehavior.chosen', 'select'); } else { @@ -55,7 +59,7 @@ protected function getInput() private function getVersion() { - $db = JFactory::getDBO(); + $db = Factory::getDBO(); $query = $db->getQuery(true); $query ->select(array('*')) diff --git a/plugins/system/helix3/fields/button.php b/plugins/system/helix3/fields/button.php index bfdc473..4eb7c8d 100644 --- a/plugins/system/helix3/fields/button.php +++ b/plugins/system/helix3/fields/button.php @@ -6,12 +6,12 @@ * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later */ +use Joomla\CMS\Form\FormField; + //no direct accees defined ('_JEXEC') or die ('resticted aceess'); -jimport('joomla.form.formfield'); - -class JFormFieldButton extends JFormField +class JFormFieldButton extends FormField { protected $type = 'Button'; protected function getInput() { diff --git a/plugins/system/helix3/fields/group.php b/plugins/system/helix3/fields/group.php index b639d8f..7570cb0 100644 --- a/plugins/system/helix3/fields/group.php +++ b/plugins/system/helix3/fields/group.php @@ -6,21 +6,26 @@ * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later */ +use Joomla\CMS\Form\FormField; +use Joomla\CMS\Language\Text; + //no direct accees defined ('_JEXEC') or die ('resticted aceess'); -jimport('joomla.form.formfield'); - -class JFormFieldGroup extends JFormField { +class JFormFieldGroup extends FormField +{ protected $type = 'Group'; - public function getInput() { + + public function getInput() + { $text = (string) $this->element['title']; - $subtitle = (!empty($this->element['subtitle'])) ? '' . JText::_($this->element['subtitle']) . '':''; + $subtitle = (!empty($this->element['subtitle'])) ? '' . Text::_($this->element['subtitle']) . '':''; $group = ($this->element['group']=='no')?'no_group':'in_group'; - return '
' . JText::_($text) . $subtitle . '
'; + return '
' . Text::_($text) . $subtitle . '
'; } - public function getLabel(){ + public function getLabel() + { return false; } } diff --git a/plugins/system/helix3/fields/icon.php b/plugins/system/helix3/fields/icon.php index 4b04478..47b1253 100644 --- a/plugins/system/helix3/fields/icon.php +++ b/plugins/system/helix3/fields/icon.php @@ -6,14 +6,14 @@ * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later */ +use Joomla\CMS\Form\FormField; +use Joomla\CMS\HTML\HTMLHelper; + //no direct accees defined ('_JEXEC') or die ('resticted aceess'); -jimport('joomla.form.formfield'); - -jimport('joomla.html.html.select'); - -class JFormFieldIcon extends JFormField { +class JFormFieldIcon extends FormField +{ protected $type = 'Icon'; @@ -22,18 +22,20 @@ public function getInput() { $icons = $this->getIconsList(); $arr = array(); - $arr[] = JHtml::_('select.option', '', '' ); + $arr[] = HTMLHelper::_('select.option', '', '' ); - foreach ($icons as $value) { - $arr[] = JHtml::_('select.option', $value, str_replace('fa-', '', $value) ); + foreach ($icons as $value) + { + $arr[] = HTMLHelper::_('select.option', $value, str_replace('fa-', '', $value) ); } - return JHtml::_('select.genericlist', $arr, $this->name, 'class="form-select"', 'value', 'text', $this->value); + return HTMLHelper::_('select.genericlist', $arr, $this->name, 'class="form-select"', 'value', 'text', $this->value); } /*Icons List*/ - private static function getIconsList() { + private static function getIconsList() + { return array( 'fa-500px', 'fa-adjust', diff --git a/plugins/system/helix3/fields/layout.php b/plugins/system/helix3/fields/layout.php index 72fa57c..4130582 100644 --- a/plugins/system/helix3/fields/layout.php +++ b/plugins/system/helix3/fields/layout.php @@ -6,12 +6,14 @@ * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later */ +use Joomla\CMS\Factory; +use Joomla\CMS\Form\FormField; + //no direct accees defined ('_JEXEC') or die ('resticted aceess'); -jimport('joomla.form.formfield'); - -class JFormFieldLayout extends JFormField { +class JFormFieldLayout extends FormField +{ protected $type = 'Layout'; @@ -57,8 +59,8 @@ public function getLabel() //Get template name private static function getTemplate() { - $id = (int) JFactory::getApplication()->input->get('id', 0); - $db = JFactory::getDbo(); + $id = (int) Factory::getApplication()->input->get('id', 0); + $db = Factory::getDbo(); $query = $db->getQuery(true); $query->select($db->quoteName(array('template'))); $query->from($db->quoteName('#__template_styles')); diff --git a/plugins/system/helix3/fields/layoutlist.php b/plugins/system/helix3/fields/layoutlist.php index 3e2dadc..e0eab59 100644 --- a/plugins/system/helix3/fields/layoutlist.php +++ b/plugins/system/helix3/fields/layoutlist.php @@ -1,17 +1,19 @@ + -
  • +
  • - - - - + + + +
  • - +
  • diff --git a/plugins/system/helix3/fields/modpos.php b/plugins/system/helix3/fields/modpos.php index d44ffa6..4975929 100644 --- a/plugins/system/helix3/fields/modpos.php +++ b/plugins/system/helix3/fields/modpos.php @@ -1,15 +1,19 @@ setQuery($query); @@ -57,8 +61,8 @@ protected function getInput() $selectOption = array(); sort($selectOption); - foreach($options as $option) $selectOption[] = JHTML::_( 'select.option',$option,$option ); + foreach($options as $option) $selectOption[] = HTMLHelper::_( 'select.option',$option,$option ); - return JHTML::_('select.genericlist', $selectOption, 'jform[params]['.$this->element['name'].']', 'class="form-select '.$this->element['class'].'"', 'value', 'text', $this->value, 'jform_params_helix_'.$this->element['name']); + return HTMLHelper::_('select.genericlist', $selectOption, 'jform[params]['.$this->element['name'].']', 'class="form-select '.$this->element['class'].'"', 'value', 'text', $this->value, 'jform_params_helix_'.$this->element['name']); } } diff --git a/plugins/system/helix3/fields/optionio.php b/plugins/system/helix3/fields/optionio.php index 6acc376..bcadca0 100644 --- a/plugins/system/helix3/fields/optionio.php +++ b/plugins/system/helix3/fields/optionio.php @@ -6,18 +6,20 @@ * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later */ +use Joomla\CMS\Factory; +use Joomla\CMS\Form\FormField; +use Joomla\CMS\Language\Text; + //no direct accees defined ('_JEXEC') or die ('resticted aceess'); -jimport('joomla.form.formfield'); - -class JFormFieldOptionio extends JFormField +class JFormFieldOptionio extends FormField { protected $type = 'optionio'; protected function getInput() { - $input = JFactory::getApplication()->input; + $input = Factory::getApplication()->input; $template_id = $input->get('id',0,'INT'); $url_cureent = "//$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; @@ -26,11 +28,11 @@ protected function getInput() $output = ''; $output .= ''; $output .= '
    '; $output .= ''; - $output .= '
    '. JText::_("HELIX_SETTINGS_IMPORT") .'
    '; + $output .= '
    '. Text::_("HELIX_SETTINGS_IMPORT") .'
    '; $output .= '
    '; return $output; diff --git a/plugins/system/helix3/fields/presets.php b/plugins/system/helix3/fields/presets.php index 29746a0..fa39c9d 100644 --- a/plugins/system/helix3/fields/presets.php +++ b/plugins/system/helix3/fields/presets.php @@ -1,20 +1,21 @@ form->getValue('template'); $templatePresetsDir = JPATH_SITE.'/templates/'.$template.'/images/presets/'; - $base_url = JURI::root(true).'/templates/'.$template.'/images/presets/'; + $base_url = Uri::root(true).'/templates/'.$template.'/images/presets/'; $root_path = JPATH_SITE.'/templates/'.$template.'/images/presets/'; - $doc = JFactory::getDocument(); - $helix_url = JURI::root(true).'/plugins/system/helix3/'; + $doc = Factory::getDocument(); + $helix_url = Uri::root(true).'/plugins/system/helix3/'; - $folders = JFolder::folders($templatePresetsDir); + $folders = Folder::folders($templatePresetsDir); if( !defined('CURRENT_PRESET') ){ define('CURRENT_PRESET', $this->value); @@ -36,7 +37,7 @@ protected function getInput() } $html = ''; - $app = JFactory::getApplication(); + $app = Factory::getApplication(); $template = $app->getTemplate('shaper_helix3'); $params = $template->params; $variable = $params->get('variable'); diff --git a/plugins/system/helix3/fields/spgallery.php b/plugins/system/helix3/fields/spgallery.php index 05681a3..a582a6e 100644 --- a/plugins/system/helix3/fields/spgallery.php +++ b/plugins/system/helix3/fields/spgallery.php @@ -1,27 +1,35 @@ addScript($plg_path . '/assets/js/jquery.ui.core.min.js'); // $doc->addScript($plg_path . '/assets/js/jquery.ui.sortable.min.js'); - $plg_path = JURI::root(true) . '/plugins/system/helix3'; + $plg_path = Uri::root(true) . '/plugins/system/helix3'; $doc->addScript($plg_path . '/assets/js/jquery-ui.min.js'); $doc->addScript($plg_path . '/assets/js/spgallery.js'); $doc->addStyleSheet($plg_path . '/assets/css/spgallery.css'); @@ -43,20 +51,20 @@ protected function getInput() $data_src = $value; - $src = JURI::root(true) . '/' . $value; + $src = Uri::root(true) . '/' . $value; $basename = basename($src); - $thumbnail = JPATH_ROOT . '/' . dirname($value) . '/' . JFile::stripExt($basename) . '_thumbnail.' . JFile::getExt($basename); + $thumbnail = JPATH_ROOT . '/' . dirname($value) . '/' . File::stripExt($basename) . '_thumbnail.' . File::getExt($basename); if(file_exists($thumbnail)) { - $src = JURI::root(true) . '/' . dirname($value) . '/' . JFile::stripExt($basename) . '_thumbnail.' . JFile::getExt($basename); + $src = Uri::root(true) . '/' . dirname($value) . '/' . File::stripExt($basename) . '_thumbnail.' . File::getExt($basename); } - $small_size = JPATH_ROOT . '/' . dirname($value) . '/' . JFile::stripExt($basename) . '_small.' . JFile::getExt($basename); + $small_size = JPATH_ROOT . '/' . dirname($value) . '/' . File::stripExt($basename) . '_small.' . File::getExt($basename); if(file_exists($small_size)) { - $src = JURI::root(true) . '/' . dirname($value) . '/' . JFile::stripExt($basename) . '_small.' . JFile::getExt($basename); + $src = Uri::root(true) . '/' . dirname($value) . '/' . File::stripExt($basename) . '_small.' . File::getExt($basename); } $output .= '
  • Delete
  • '; diff --git a/plugins/system/helix3/fields/spimage.php b/plugins/system/helix3/fields/spimage.php index e4fa562..1d46dee 100644 --- a/plugins/system/helix3/fields/spimage.php +++ b/plugins/system/helix3/fields/spimage.php @@ -6,21 +6,27 @@ * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later */ +use Joomla\CMS\Factory; +use Joomla\CMS\Filesystem\File; +use Joomla\CMS\Form\FormField; +use Joomla\CMS\HTML\HTMLHelper; +use Joomla\CMS\Uri\Uri; + //no direct accees defined ('_JEXEC') or die ('resticted aceess'); -class JFormFieldSpimage extends JFormField +class JFormFieldSpimage extends FormField { protected $type = 'Spimage'; protected function getInput() { - $doc = JFactory::getDocument(); + $doc = Factory::getDocument(); - JHtml::_('jquery.framework'); + HTMLHelper::_('jquery.framework'); - $plg_path = JURI::root(true) . '/plugins/system/helix3'; + $plg_path = Uri::root(true) . '/plugins/system/helix3'; $doc->addScript($plg_path . '/assets/js/spimage.js'); $doc->addStyleSheet($plg_path . '/assets/css/spimage.css'); @@ -35,15 +41,17 @@ protected function getInput() $output = '
    '; $output .= '
    '; - if($this->value) { + if ($this->value) + { $data_src = $this->value; - $src = JURI::root(true) . '/' . $data_src; + $src = Uri::root(true) . '/' . $data_src; $basename = basename($data_src); - $thumbnail = JPATH_ROOT . '/' . dirname($data_src) . '/' . JFile::stripExt($basename) . '_thumbnail.' . JFile::getExt($basename); + $thumbnail = JPATH_ROOT . '/' . dirname($data_src) . '/' . File::stripExt($basename) . '_thumbnail.' . File::getExt($basename); - if(file_exists($thumbnail)) { - $src = JURI::root(true) . '/' . dirname($data_src) . '/' . JFile::stripExt($basename) . '_thumbnail.' . JFile::getExt($basename); + if (file_exists($thumbnail)) + { + $src = Uri::root(true) . '/' . dirname($data_src) . '/' . File::stripExt($basename) . '_thumbnail.' . File::getExt($basename); } $output .= ''; diff --git a/plugins/system/helix3/fields/typography.php b/plugins/system/helix3/fields/typography.php index 888d8a8..5d6c514 100644 --- a/plugins/system/helix3/fields/typography.php +++ b/plugins/system/helix3/fields/typography.php @@ -1,17 +1,20 @@ '; $html .= '
    '; - $html .= ''; + $html .= ''; $html .= ''; if(isset($value->fontFamily)) { @@ -85,7 +88,7 @@ protected function getInput() { //Font Subsets $html .= '
    '; - $html .= ''; + $html .= ''; $html .= ''; $html .= '
    '; @@ -140,8 +143,8 @@ private static function filterArray($items, $key) { //Get template name private static function getTemplate() { - $id = (int) JFactory::getApplication()->input->get('id', 0); - $db = JFactory::getDbo(); + $id = (int) Factory::getApplication()->input->get('id', 0); + $db = Factory::getDbo(); $query = $db->getQuery(true); $query->select($db->quoteName(array('template'))); $query->from($db->quoteName('#__template_styles')); diff --git a/plugins/system/helix3/helix3.php b/plugins/system/helix3/helix3.php index 587c6a3..6296963 100644 --- a/plugins/system/helix3/helix3.php +++ b/plugins/system/helix3/helix3.php @@ -9,17 +9,20 @@ //no direct accees defined ('_JEXEC') or die ('resticted aceess'); -jimport('joomla.plugin.plugin'); -jimport( 'joomla.event.plugin' ); -jimport('joomla.registry.registry'); - +use Joomla\CMS\Factory; +use Joomla\CMS\Uri\Uri; +use Joomla\CMS\Form\Form; +use Joomla\Registry\Registry; +use Joomla\CMS\Filesystem\File; use Joomla\CMS\HTML\HTMLHelper; +use Joomla\CMS\Plugin\CMSPlugin; -if(!class_exists('Helix3')) { - require_once (__DIR__ . '/core/helix3.php'); +if (!class_exists('Helix3')) +{ + require_once (__DIR__ . '/core/helix3.php'); } -class plgSystemHelix3 extends JPlugin +class plgSystemHelix3 extends CMSPlugin { protected $autoloadLanguage = true; @@ -48,8 +51,8 @@ public function onAfterInitialise() require_once $bootstrapPath; } - JHtml::register('bootstrap.tooltip', ['Helix3Bootstrap', 'tooltip']); - JHtml::register('bootstrap.popover', ['Helix3Bootstrap', 'popover']); + HTMLHelper::register('bootstrap.tooltip', ['Helix3Bootstrap', 'tooltip']); + HTMLHelper::register('bootstrap.popover', ['Helix3Bootstrap', 'popover']); } } } @@ -57,15 +60,16 @@ public function onAfterInitialise() // Copied style function onAfterDispatch() { - if( !JFactory::getApplication()->isClient('administrator') ) { + if (!Factory::getApplication()->isClient('api') && !Factory::getApplication()->isClient('administrator')) + { - $activeMenu = JFactory::getApplication()->getMenu()->getActive(); + $activeMenu = Factory::getApplication()->getMenu()->getActive(); - if(is_null($activeMenu)) $template_style_id = 0; + if (is_null($activeMenu)) $template_style_id = 0; else $template_style_id = (int) $activeMenu->template_style_id; if ($template_style_id > 0) { - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $query = $db->getQuery(true); $query->select(array('*')); $query->from($db->quoteName('#__template_styles')); @@ -76,7 +80,7 @@ function onAfterDispatch() { if(!empty($style->template) && !empty($style->params)) { - JFactory::getApplication()->setTemplate($style->template, $style->params); + Factory::getApplication()->setTemplate($style->template, $style->params); } } } @@ -85,13 +89,13 @@ function onAfterDispatch() { function onContentPrepareForm($form, $data) { $v = self::getVersion(); - $doc = JFactory::getDocument(); - $plg_path = JURI::root(true) . '/plugins/system/helix3'; - $plg_path2 = JURI::root() . 'plugins/system/helix3'; - JForm::addFormPath(JPATH_PLUGINS.'/system/helix3/params'); + $doc = Factory::getDocument(); + $plg_path = Uri::root(true) . '/plugins/system/helix3'; + $plg_path2 = Uri::root() . 'plugins/system/helix3'; + Form::addFormPath(JPATH_PLUGINS.'/system/helix3/params'); if ($form->getName()=='com_menus.item') { //Add Helix menu params to the menu item - JHtml::_('jquery.framework'); + HTMLHelper::_('jquery.framework'); $data = (array)$data; if($data['id'] && $data['parent_id'] == 1) @@ -101,11 +105,11 @@ function onContentPrepareForm($form, $data) $doc->addStyleSheet($plg_path . '/assets/css/modal.css?' . $v); $doc->addStyleSheet($plg_path . '/assets/css/menu.generator.css?' . $v); - JHtml::_('jquery.framework'); + HTMLHelper::_('jquery.framework'); if(JVERSION < 4) { - JHtml::_('jquery.ui', array('core', 'more', 'sortable')); + HTMLHelper::_('jquery.ui', array('core', 'more', 'sortable')); $doc->addScript($plg_path.'/assets/js/jquery-ui.draggable.min.js?' . $v); } else @@ -125,17 +129,19 @@ function onContentPrepareForm($form, $data) } //Article Post format - if ($form->getName() == 'com_content.article') { - JHtml::_('jquery.framework'); + if ($form->getName() == 'com_content.article') + { + HTMLHelper::_('jquery.framework'); $doc->addStyleSheet($plg_path.'/assets/css/font-awesome.min.css?' . $v); $doc->addScript($plg_path.'/assets/js/post-formats.js?' . $v); $tpl_path = JPATH_ROOT . '/templates/' . $this->getTemplateName(); - if(JFile::exists( $tpl_path . '/post-formats.xml' )) { - JForm::addFormPath($tpl_path); + if (File::exists( $tpl_path . '/post-formats.xml' )) + { + Form::addFormPath($tpl_path); } else { - JForm::addFormPath(JPATH_PLUGINS . '/system/helix3/params'); + Form::addFormPath(JPATH_PLUGINS . '/system/helix3/params'); } $form->loadFile('post-formats', false); @@ -149,7 +155,7 @@ public function onExtensionAfterSave($option, $data) { if ($option == 'com_templates.style' && !empty($data->id)) { - $params = new JRegistry; + $params = new Registry; $params->loadString($data->params); $email = $params->get('joomshaper_email'); @@ -162,7 +168,7 @@ public function onExtensionAfterSave($option, $data) { $extra_query = 'joomshaper_email=' . urlencode($email); $extra_query .='&joomshaper_license_key=' . urlencode($license_key); - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $fields = array( $db->quoteName('extra_query') . '=' . $db->quote($extra_query), @@ -181,17 +187,18 @@ public function onExtensionAfterSave($option, $data) { public function onAfterRoute() { - $japps = JFactory::getApplication(); + $japps = Factory::getApplication(); if ( $japps->isClient('administrator') ) { - $user = JFactory::getUser(); + $user = Factory::getUser(); - if( !in_array( 8, $user->groups ) ){ + if ( !in_array( 8, $user->groups ) ) + { return false; } - $inputs = JFactory::getApplication()->input; + $inputs = Factory::getApplication()->input; $option = $inputs->get ( 'option', '' ); $id = $inputs->get ( 'id', '0', 'INT' ); @@ -199,10 +206,10 @@ public function onAfterRoute() if ( strtolower( $option ) == 'com_templates' && $id && $helix3task == "export" ) { - $db = JFactory::getDbo(); - $query = $db->getQuery(true); + $db = Factory::getDbo(); + $query = $db->getQuery(true); - $query + $query ->select( '*' ) ->from( $db->quoteName( '#__template_styles' ) ) ->where( $db->quoteName( 'id' ) . ' = ' . $db->quote( $id ) . ' AND ' . $db->quoteName( 'client_id' ) . ' = 0' ); @@ -229,7 +236,7 @@ public function onAfterRoute() private function getTemplateName() { - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $query = $db->getQuery(true); $query->select($db->quoteName(array('template'))); $query->from($db->quoteName('#__template_styles')); @@ -241,24 +248,24 @@ private function getTemplateName() } function onAfterRender() { - $app = JFactory::getApplication(); + $app = Factory::getApplication(); - if ($app->isClient('administrator')) + if ($app->isClient('administrator')) { - return; - } - - $body = JFactory::getApplication()->getBody(); - $preset = Helix3::Preset(); - - $body = str_replace('{helix_preset}', $preset, $body); + return; + } + + $body = Factory::getApplication()->getBody(); + $preset = Helix3::Preset(); - JFactory::getApplication()->setBody($body); + $body = str_replace('{helix_preset}', $preset, $body); + + Factory::getApplication()->setBody($body); } private static function getVersion() { - $db = JFactory::getDBO(); + $db = Factory::getDBO(); $query = $db->getQuery(true); $query ->select(array('*')) diff --git a/plugins/system/helix3/layout/generated.php b/plugins/system/helix3/layout/generated.php index ce90fb4..2f33518 100644 --- a/plugins/system/helix3/layout/generated.php +++ b/plugins/system/helix3/layout/generated.php @@ -1,18 +1,22 @@
    @@ -62,8 +66,8 @@
    @@ -75,13 +79,13 @@
    - +
    • - +
        $grid){ @@ -93,9 +97,9 @@
    • -
    • -
    • -
    • +
    • +
    • +
    @@ -103,7 +107,7 @@
    -
    +
    @@ -120,7 +124,7 @@ if ($layout_data) { foreach ($layout_data as $row) { $rowSettings = RowColumnSettings::getSettings($row->settings); - $name = JText::_('HELIX_SECTION_TITLE'); + $name = Text::_('HELIX_SECTION_TITLE'); if (isset($row->settings->name)) { $name = $row->settings->name; @@ -136,7 +140,7 @@
    diff --git a/plugins/system/helix3/layout/layout-settings/fields-helper.php b/plugins/system/helix3/layout/layout-settings/fields-helper.php index 013f0d6..3515f2d 100644 --- a/plugins/system/helix3/layout/layout-settings/fields-helper.php +++ b/plugins/system/helix3/layout/layout-settings/fields-helper.php @@ -1,20 +1,22 @@ 'general', 'title'=>'', @@ -16,128 +18,128 @@ 'name' => array( 'type' => 'text', - 'title' => JText::_('HELIX_SECTION_TITLE'), - 'desc' => JText::_('HELIX_SECTION_TITLE_DESC'), + 'title' => Text::_('HELIX_SECTION_TITLE'), + 'desc' => Text::_('HELIX_SECTION_TITLE_DESC'), 'std' => '' ), 'background_color' => array( 'type' => 'color', - 'title' => JText::_('HELIX_SECTION_BACKGROUND_COLOR'), - 'desc' => JText::_('HELIX_SECTION_BACKGROUND_COLOR_DESC') + 'title' => Text::_('HELIX_SECTION_BACKGROUND_COLOR'), + 'desc' => Text::_('HELIX_SECTION_BACKGROUND_COLOR_DESC') ), 'color' => array( 'type' => 'color', - 'title' => JText::_('HELIX_SECTION_TEXT_COLOR'), - 'desc' => JText::_('HELIX_SECTION_TEXT_COLOR_DESC') + 'title' => Text::_('HELIX_SECTION_TEXT_COLOR'), + 'desc' => Text::_('HELIX_SECTION_TEXT_COLOR_DESC') ), 'background_image' => array( 'type' => 'media', - 'title' => JText::_('HELIX_SECTION_BACKGROUND_IMAGE'), - 'desc' => JText::_('HELIX_SECTION_BACKGROUND_IMAGE_DESC'), + 'title' => Text::_('HELIX_SECTION_BACKGROUND_IMAGE'), + 'desc' => Text::_('HELIX_SECTION_BACKGROUND_IMAGE_DESC'), 'std' => '', ), 'background_repeat'=>array( 'type'=>'select', - 'title'=>JText::_('HELIX_BG_REPEAT'), - 'desc'=>JText::_('HELIX_BG_REPEAT_DESC'), + 'title'=>Text::_('HELIX_BG_REPEAT'), + 'desc'=>Text::_('HELIX_BG_REPEAT_DESC'), 'values'=>array( - 'no-repeat'=>JText::_('HELIX_BG_REPEAT_NO'), - 'repeat'=>JText::_('HELIX_BG_REPEAT_ALL'), - 'repeat-x'=>JText::_('HELIX_BG_REPEAT_HORIZ'), - 'repeat-y'=>JText::_('HELIX_BG_REPEAT_VERTI'), - 'inherit'=>JText::_('HELIX_BG_REPEAT_INHERIT'), + 'no-repeat'=>Text::_('HELIX_BG_REPEAT_NO'), + 'repeat'=>Text::_('HELIX_BG_REPEAT_ALL'), + 'repeat-x'=>Text::_('HELIX_BG_REPEAT_HORIZ'), + 'repeat-y'=>Text::_('HELIX_BG_REPEAT_VERTI'), + 'inherit'=>Text::_('HELIX_BG_REPEAT_INHERIT'), ), 'std'=>'no-repeat', ), 'background_size' => array( 'type' => 'select', - 'title'=>JText::_('HELIX_BG_SIZE'), - 'desc'=>JText::_('HELIX_BG_SIZE_DESC'), + 'title'=>Text::_('HELIX_BG_SIZE'), + 'desc'=>Text::_('HELIX_BG_SIZE_DESC'), 'values'=>array( - 'cover'=>JText::_('HELIX_BG_COVER'), - 'contain'=>JText::_('HELIX_BG_CONTAIN'), - 'inherit'=>JText::_('HELIX_BG_INHERIT'), + 'cover'=>Text::_('HELIX_BG_COVER'), + 'contain'=>Text::_('HELIX_BG_CONTAIN'), + 'inherit'=>Text::_('HELIX_BG_INHERIT'), ), 'std'=>'cover', ), 'background_attachment'=>array( 'type'=>'select', - 'title'=>JText::_('HELIX_BG_ATTACHMENT'), - 'desc'=>JText::_('HELIX_BG_ATTACHMENT_DESC'), + 'title'=>Text::_('HELIX_BG_ATTACHMENT'), + 'desc'=>Text::_('HELIX_BG_ATTACHMENT_DESC'), 'values'=>array( - 'fixed'=>JText::_('HELIX_BG_ATTACHMENT_FIXED'), - 'scroll'=>JText::_('HELIX_BG_ATTACHMENT_SCROLL'), - 'inherit'=>JText::_('HELIX_BG_ATTACHMENT_INHERIT'), + 'fixed'=>Text::_('HELIX_BG_ATTACHMENT_FIXED'), + 'scroll'=>Text::_('HELIX_BG_ATTACHMENT_SCROLL'), + 'inherit'=>Text::_('HELIX_BG_ATTACHMENT_INHERIT'), ), 'std'=>'fixed', ), 'background_position' => array( 'type' => 'select', - 'title'=>JText::_('HELIX_BG_POSITION'), - 'desc'=>JText::_('HELIX_BG_POSITION_DESC'), + 'title'=>Text::_('HELIX_BG_POSITION'), + 'desc'=>Text::_('HELIX_BG_POSITION_DESC'), 'values'=>array( - '0 0'=>JText::_('HELIX_BG_POSITION_LEFT_TOP'), - '0 50%'=>JText::_('HELIX_BG_POSITION_LEFT_CENTER'), - '0 100%'=>JText::_('HELIX_BG_POSITION_LEFT_BOTTOM'), - '50% 0'=>JText::_('HELIX_BG_POSITION_CENTER_TOP'), - '50% 50%'=>JText::_('HELIX_BG_POSITION_CENTER_CENTER'), - '50% 100%'=>JText::_('HELIX_BG_POSITION_CENTER_BOTTOM'), - '100% 0'=>JText::_('HELIX_BG_POSITION_RIGHT_TOP'), - '100% 50%'=>JText::_('HELIX_BG_POSITION_RIGHT_CENTER'), - '100% 100%'=>JText::_('HELIX_BG_POSITION_RIGHT_BOTTOM'), + '0 0'=>Text::_('HELIX_BG_POSITION_LEFT_TOP'), + '0 50%'=>Text::_('HELIX_BG_POSITION_LEFT_CENTER'), + '0 100%'=>Text::_('HELIX_BG_POSITION_LEFT_BOTTOM'), + '50% 0'=>Text::_('HELIX_BG_POSITION_CENTER_TOP'), + '50% 50%'=>Text::_('HELIX_BG_POSITION_CENTER_CENTER'), + '50% 100%'=>Text::_('HELIX_BG_POSITION_CENTER_BOTTOM'), + '100% 0'=>Text::_('HELIX_BG_POSITION_RIGHT_TOP'), + '100% 50%'=>Text::_('HELIX_BG_POSITION_RIGHT_CENTER'), + '100% 100%'=>Text::_('HELIX_BG_POSITION_RIGHT_BOTTOM'), ), 'std'=>'0 0', ), 'link_color' => array( 'type' => 'color', - 'title' => JText::_('HELIX_LINK_COLOR'), - 'desc' => JText::_('HELIX_LINK_COLOR_DESC') + 'title' => Text::_('HELIX_LINK_COLOR'), + 'desc' => Text::_('HELIX_LINK_COLOR_DESC') ), 'link_hover_color' => array( 'type' => 'color', - 'title' => JText::_('HELIX_LINK_HOVER_COLOR'), - 'desc' => JText::_('HELIX_LINK_HOVER_COLOR_DESC') + 'title' => Text::_('HELIX_LINK_HOVER_COLOR'), + 'desc' => Text::_('HELIX_LINK_HOVER_COLOR_DESC') ), 'hidden_xs' => array( 'type' => 'checkbox', - 'title' => JText::_('HELIX_HIDDEN_MOBILE'), - 'desc' => JText::_('HELIX_HIDDEN_MOBILE_DESC'), + 'title' => Text::_('HELIX_HIDDEN_MOBILE'), + 'desc' => Text::_('HELIX_HIDDEN_MOBILE_DESC'), 'std' => '', ), 'hidden_sm' => array( 'type' => 'checkbox', - 'title' => JText::_('HELIX_HIDDEN_TABLET'), - 'desc' => JText::_('HELIX_HIDDEN_TABLET_DESC'), + 'title' => Text::_('HELIX_HIDDEN_TABLET'), + 'desc' => Text::_('HELIX_HIDDEN_TABLET_DESC'), 'std' => '', ), 'hidden_md' => array( 'type' => 'checkbox', - 'title' => JText::_('HELIX_HIDDEN_DESKTOP'), - 'desc' => JText::_('HELIX_HIDDEN_DESKTOP_DESC'), + 'title' => Text::_('HELIX_HIDDEN_DESKTOP'), + 'desc' => Text::_('HELIX_HIDDEN_DESKTOP_DESC'), 'std' => '', ), 'padding' => array( 'type' => 'text', - 'title' => JText::_('HELIX_PADDING'), - 'desc' => JText::_('HELIX_PADDING_DESC'), + 'title' => Text::_('HELIX_PADDING'), + 'desc' => Text::_('HELIX_PADDING_DESC'), 'std' => '' ), 'margin' => array( 'type' => 'text', - 'title' => JText::_('HELIX_MARGIN'), - 'desc' => JText::_('HELIX_MARGIN_DESC'), + 'title' => Text::_('HELIX_MARGIN'), + 'desc' => Text::_('HELIX_MARGIN_DESC'), 'std' => '' ), 'fluidrow' => array( 'type' => 'checkbox', - 'title' => JText::_('HELIX_ROW_FULL_WIDTH'), - 'desc' => JText::_('HELIX_ROW_FULL_WIDTH_DESC'), + 'title' => Text::_('HELIX_ROW_FULL_WIDTH'), + 'desc' => Text::_('HELIX_ROW_FULL_WIDTH_DESC'), 'std' => '', ), 'custom_class' => array( 'type' => 'text', - 'title' => JText::_('HELIX_CUSTOM_CLASS'), - 'desc' => JText::_('HELIX_CUSTOM_CLASS_DESC'), + 'title' => Text::_('HELIX_CUSTOM_CLASS'), + 'desc' => Text::_('HELIX_CUSTOM_CLASS_DESC'), 'std' => '' ), ) @@ -150,39 +152,39 @@ 'column_type' => array( 'type' => 'checkbox', - 'title' => JText::_('HELIX_COMPONENT'), - 'desc' => JText::_('HELIX_COMPONENT_DESC'), + 'title' => Text::_('HELIX_COMPONENT'), + 'desc' => Text::_('HELIX_COMPONENT_DESC'), 'std'=>'', ), 'name' => array( 'type' => 'select', - 'title' => JText::_('HELIX_MODULE_POSITION'), - 'desc' => JText::_('HELIX_MODULE_POSITION_DESC'), + 'title' => Text::_('HELIX_MODULE_POSITION'), + 'desc' => Text::_('HELIX_MODULE_POSITION_DESC'), 'values' => array(), 'std'=>'none', ), 'hidden_xs' => array( 'type' => 'checkbox', - 'title' => JText::_('HELIX_HIDDEN_MOBILE'), - 'desc' => JText::_('HELIX_HIDDEN_MOBILE_DESC'), + 'title' => Text::_('HELIX_HIDDEN_MOBILE'), + 'desc' => Text::_('HELIX_HIDDEN_MOBILE_DESC'), 'std' => '', ), 'hidden_sm' => array( 'type' => 'checkbox', - 'title' => JText::_('HELIX_HIDDEN_TABLET'), - 'desc' => JText::_('HELIX_HIDDEN_TABLET_DESC'), + 'title' => Text::_('HELIX_HIDDEN_TABLET'), + 'desc' => Text::_('HELIX_HIDDEN_TABLET_DESC'), 'std' => '', ), 'hidden_md' => array( 'type' => 'checkbox', - 'title' => JText::_('HELIX_HIDDEN_DESKTOP'), - 'desc' => JText::_('HELIX_HIDDEN_DESKTOP_DESC'), + 'title' => Text::_('HELIX_HIDDEN_DESKTOP'), + 'desc' => Text::_('HELIX_HIDDEN_DESKTOP_DESC'), 'std' => '', ), 'sm_col' => array( 'type' => 'select', - 'title' => JText::_('HELIX_TABLET_LAYOUT'), - 'desc' => JText::_('HELIX_TABLET_LAYOUT_DESC'), + 'title' => Text::_('HELIX_TABLET_LAYOUT'), + 'desc' => Text::_('HELIX_TABLET_LAYOUT_DESC'), 'values' => array( '' => "", 'col-sm-1' => 'col-md-1', @@ -202,8 +204,8 @@ ), 'xs_col' => array( 'type' => 'select', - 'title' => JText::_('HELIX_MOBILE_LAYOUT'), - 'desc' => JText::_('HELIX_MOBILE_LAYOUT_DESC'), + 'title' => Text::_('HELIX_MOBILE_LAYOUT'), + 'desc' => Text::_('HELIX_MOBILE_LAYOUT_DESC'), 'values' => array( '' => "", 'col-xs-1' => 'col-1', @@ -223,8 +225,8 @@ ), 'custom_class' => array( 'type' => 'text', - 'title' => JText::_('HELIX_CUSTOM_CLASS'), - 'desc' => JText::_('HELIX_CUSTOM_CLASS_DESC'), + 'title' => Text::_('HELIX_CUSTOM_CLASS'), + 'desc' => Text::_('HELIX_CUSTOM_CLASS_DESC'), 'std' => '' ), ) diff --git a/plugins/system/helix3/layout/types/color.php b/plugins/system/helix3/layout/types/color.php index 9e0d758..136b9a6 100644 --- a/plugins/system/helix3/layout/types/color.php +++ b/plugins/system/helix3/layout/types/color.php @@ -6,6 +6,8 @@ * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later */ +use Joomla\CMS\HTML\HTMLHelper; + //no direct accees defined ('_JEXEC') or die ('resticted aceess'); @@ -19,8 +21,8 @@ static function getInput($key, $attr) } // Including fallback code for HTML5 non supported browsers. - JHtml::_('jquery.framework'); - JHtml::_('script', 'system/html5fallback.js', false, true); + HTMLHelper::_('jquery.framework'); + HTMLHelper::_('script', 'system/html5fallback.js', false, true); $output = '
    '; $output .= ''; diff --git a/plugins/system/helix3/layout/types/media.php b/plugins/system/helix3/layout/types/media.php index 047fbf2..4b50ece 100644 --- a/plugins/system/helix3/layout/types/media.php +++ b/plugins/system/helix3/layout/types/media.php @@ -4,7 +4,12 @@ * @author JoomShaper https://www.joomshaper.com * @copyright (c) 2010 - 2021 JoomShaper * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later -*/ +*/ + +use Joomla\CMS\Uri\Uri; +use Joomla\CMS\Language\Text; +use Joomla\CMS\HTML\HTMLHelper; +use Joomla\CMS\Component\ComponentHelper; //no direct accees defined ('_JEXEC') or die ('resticted aceess'); @@ -20,7 +25,7 @@ static function getInput($key, $attr) } if($attr['std']!='') { - $src = 'src="' . JURI::root() . $attr['std'] . '"'; + $src = 'src="' . Uri::root() . $attr['std'] . '"'; } else { $src = ''; } @@ -33,8 +38,8 @@ static function getInput($key, $attr) // Joomla if (JVERSION < 4) { - JHtml::_('jquery.framework'); - JHtml::_('behavior.modal'); + HTMLHelper::_('jquery.framework'); + HTMLHelper::_('behavior.modal'); $output .= '
    '; $output .= ''; @@ -47,24 +52,24 @@ static function getInput($key, $attr) $url = 'index.php?option=com_media&view=media&tmpl=component'; $id = 'helix3_modal'; - $modalHTML = JHtml::_( + $modalHTML = HTMLHelper::_( 'bootstrap.renderModal', 'imageModal_' . $id, [ 'url' => $url, - 'title' => JText::_('JLIB_FORM_CHANGE_IMAGE'), + 'title' => Text::_('JLIB_FORM_CHANGE_IMAGE'), 'closeButton' => true, 'height' => '100%', 'width' => '100%', 'modalWidth' => '80', 'bodyHeight' => '60', - 'footer' => '' - . '', + 'footer' => '' + . '', ] ); $output .= ''; @@ -73,8 +78,8 @@ static function getInput($key, $attr) $output .= '
    '; $output .= ''; - $output .= ''; - $output .= ''; + $output .= ''; + $output .= ''; $output .= '
    '; $output .= '
    '; diff --git a/plugins/system/helix3/layouts/frontend/generate.php b/plugins/system/helix3/layouts/frontend/generate.php index a0afa08..dc91f37 100644 --- a/plugins/system/helix3/layouts/frontend/generate.php +++ b/plugins/system/helix3/layouts/frontend/generate.php @@ -7,16 +7,19 @@ */ defined('_JEXEC') or die('Restricted Access'); -// +use Joomla\CMS\Factory; +use Joomla\CMS\Layout\FileLayout; + //helper & model $menu_class = JPATH_ROOT . '/plugins/system/helix3/core/classes/helix3.php'; -if (file_exists($menu_class)) { +if (file_exists($menu_class)) +{ require_once($menu_class); } -$template = JFactory::getApplication()->getTemplate(); +$template = Factory::getApplication()->getTemplate(); $themepath = JPATH_THEMES . '/' . $template; $rows_file = $themepath . '/html/layouts/helix3/frontend/rows.php'; $lyt_thm_path = $themepath . '/html/layouts/helix3/'; @@ -41,7 +44,7 @@ } -$getLayout = new JLayoutFile('frontend.rows', $layout_path ); +$getLayout = new FileLayout('frontend.rows', $layout_path ); $output .= $getLayout->render($data); diff --git a/plugins/system/helix3/layouts/frontend/modules.php b/plugins/system/helix3/layouts/frontend/modules.php index 261f22c..b5a0d12 100644 --- a/plugins/system/helix3/layouts/frontend/modules.php +++ b/plugins/system/helix3/layouts/frontend/modules.php @@ -5,12 +5,16 @@ * @copyright (c) 2010 - 2021 JoomShaper * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later */ + +use Joomla\CMS\Filter\OutputFilter; + defined('_JEXEC') or die('Restricted Access'); //helper & model $menu_class = JPATH_ROOT . '/plugins/system/helix3/core/classes/helix3.php'; -if (file_exists($menu_class)) { +if (file_exists($menu_class)) +{ require_once($menu_class); } @@ -18,7 +22,7 @@ $output =''; - $output .= '
    '; + $output .= '
    '; $output .= '
    '; diff --git a/plugins/system/helix3/layouts/frontend/rows.php b/plugins/system/helix3/layouts/frontend/rows.php index 5e1d777..bfb75e7 100644 --- a/plugins/system/helix3/layouts/frontend/rows.php +++ b/plugins/system/helix3/layouts/frontend/rows.php @@ -1,20 +1,24 @@ getTemplate(); +$template = Factory::getApplication()->getTemplate(); $themepath = JPATH_THEMES . '/' . $template; $carea_file = $themepath . '/html/layouts/helix3/frontend/conponentarea.php'; $module_file = $themepath . '/html/layouts/helix3/frontend/modules.php'; @@ -79,13 +83,15 @@ $column->className = $column->className . ' ' . $responsive_class; //End Responsive Utilities - if ($column->settings->column_type){ //Component - $getLayout = new JLayoutFile('frontend.conponentarea', $layout_path_carea ); + if ($column->settings->column_type) + { //Component + $getLayout = new FileLayout('frontend.conponentarea', $layout_path_carea ); $output .= $getLayout->render($column); } - else { // Module + else + { // Module - $getLayout = new JLayoutFile('frontend.modules', $layout_path_module ); + $getLayout = new FileLayout('frontend.modules', $layout_path_module ); $output .= $getLayout->render($column); } } diff --git a/plugins/system/helix3/params/menu-child.xml b/plugins/system/helix3/params/menu-child.xml index 1449bd0..472bce6 100644 --- a/plugins/system/helix3/params/menu-child.xml +++ b/plugins/system/helix3/params/menu-child.xml @@ -3,8 +3,8 @@
    - - + + diff --git a/templates/shaper_helix3/css/template.css b/templates/shaper_helix3/css/template.css index 45539c6..3b9892c 100755 --- a/templates/shaper_helix3/css/template.css +++ b/templates/shaper_helix3/css/template.css @@ -142,7 +142,7 @@ textarea.form-control { .sp-megamenu-parent .sp-dropdown li.sp-menu-item span { display: block; padding: 10px; - color: #141414; + color: #333333; cursor: pointer; } .sp-megamenu-parent .sp-dropdown li.sp-menu-item > a.sp-group-title, @@ -1859,7 +1859,7 @@ article.item { } .helix-social-share .helix-social-share-icon ul li div a:hover, .helix-social-share .helix-social-share-icon ul li div a:focus { - background: #1061cc; + background: #3d449a; color: #fff; } .view-article nav.pagenavigation > ul { @@ -2696,7 +2696,7 @@ table.category tbody > tr td { display: none; } .badge.badge-info { - background-color: #1061cc; + background-color: #3d449a; } .btn:not([class*="btn-"]) { color: #fff; From 7ccf48491eadf0f89b75c68efaebcc572ae3239a Mon Sep 17 00:00:00 2001 From: Md Siddiqur Rahman Date: Thu, 13 Oct 2022 15:02:50 +0600 Subject: [PATCH 02/29] fix namespace issue --- plugins/ajax/helix3/classes/image.php | 2 +- plugins/ajax/helix3/helix3.php | 149 ++++++++++++++------------ 2 files changed, 80 insertions(+), 71 deletions(-) diff --git a/plugins/ajax/helix3/classes/image.php b/plugins/ajax/helix3/classes/image.php index f8371df..0facea8 100755 --- a/plugins/ajax/helix3/classes/image.php +++ b/plugins/ajax/helix3/classes/image.php @@ -11,7 +11,7 @@ class Helix3Image { - public static function createThumbs($src, $sizes = array(), $folder, $base_name, $ext) + public static function createThumbs($src, $folder, $base_name, $ext, $sizes = array()) { list($originalWidth, $originalHeight) = getimagesize($src); diff --git a/plugins/ajax/helix3/helix3.php b/plugins/ajax/helix3/helix3.php index d88fddb..7e26651 100755 --- a/plugins/ajax/helix3/helix3.php +++ b/plugins/ajax/helix3/helix3.php @@ -9,20 +9,29 @@ //no direct accees defined ('_JEXEC') or die ('resticted aceess'); -jimport('joomla.plugin.plugin'); -jimport('joomla.filesystem.folder'); -jimport('joomla.filesystem.file'); -jimport('joomla.registry.registry'); -jimport('joomla.image.image'); +use Joomla\CMS\Factory; +use Joomla\CMS\Http\Http; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Menu\SiteMenu; +use Joomla\Registry\Registry; +use Joomla\CMS\Filesystem\File; +use Joomla\CMS\Session\Session; +use Joomla\CMS\Plugin\CMSPlugin; +use Joomla\CMS\Filesystem\Folder; +use Joomla\CMS\Component\ComponentHelper; +use Joomla\CMS\Helper\MediaHelper; +use Joomla\CMS\HTML\HTMLHelper; +use Joomla\CMS\Uri\Uri; + require_once __DIR__ . '/classes/image.php'; -class plgAjaxHelix3 extends JPlugin +class plgAjaxHelix3 extends CMSPlugin { function onAjaxHelix3() { - $input = JFactory::getApplication()->input; + $input = Factory::getApplication()->input; $action = $input->post->get('action', '', 'STRING'); if($action=='upload_image') { @@ -58,7 +67,7 @@ function onAjaxHelix3() $report['action'] = 'remove'; $report['status'] = 'true'; } - $report['layout'] = JFolder::files($layoutPath, '.json'); + $report['layout'] = Folder::files($layoutPath, '.json'); break; case 'save': @@ -72,7 +81,7 @@ function onAjaxHelix3() fwrite($file, $content); fclose($file); } - $report['layout'] = JFolder::files($layoutPath, '.json'); + $report['layout'] = Folder::files($layoutPath, '.json'); break; case 'load': @@ -104,7 +113,7 @@ function onAjaxHelix3() case 'voting': - if (JSession::checkToken()) { + if (Session::checkToken()) { return json_encode($report); } @@ -124,7 +133,7 @@ function onAjaxHelix3() { $userIP = $_SERVER['REMOTE_ADDR']; - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $query = $db->getQuery(true); $query->select('*') @@ -219,10 +228,10 @@ function onAjaxHelix3() $template_path = JPATH_SITE . '/templates/' . self::getTemplate()->template . '/webfonts/webfonts.json'; $plugin_path = JPATH_PLUGINS . '/system/helix3/assets/webfonts/webfonts.json'; - if(JFile::exists( $template_path )) { - $json = JFile::read( $template_path ); + if(File::exists( $template_path )) { + $json = file_get_contents($template_path); } else { - $json = JFile::read( $plugin_path ); + $json = file_get_contents($plugin_path); } $webfonts = json_decode($json); @@ -256,25 +265,23 @@ function onAjaxHelix3() //Font variant case 'updateFonts': - jimport( 'joomla.filesystem.folder' ); - jimport('joomla.http.http'); - $template_path = JPATH_SITE . '/templates/' . self::getTemplate()->template . '/webfonts'; - if(!JFolder::exists( $template_path )) { - JFolder::create( $template_path, 0755 ); + if (!Folder::exists( $template_path )) + { + Folder::create( $template_path, 0755 ); } - $tplRegistry = new JRegistry(); + $tplRegistry = new Registry(); $tplParams = $tplRegistry->loadString(self::getTemplate()->params); $gfont_api = $tplParams->get('gfont_api', 'AIzaSyBVybAjpiMHzNyEm3ncA_RZ4WETKsLElDg'); $url = 'https://www.googleapis.com/webfonts/v1/webfonts?key='. $gfont_api; - $http = new JHttp(); + $http = new Http(); $str = $http->get($url); if($str->code == 200) { // if successfully updated - if ( JFile::write( $template_path . '/webfonts.json', $str->body )) { + if ( File::write( $template_path . '/webfonts.json', $str->body )) { echo "

    Google Webfonts list successfully updated! Please refresh your browser.

    "; } else { echo "

    Google Webfonts update failed. Please make sure that your template folder is writable.

    "; @@ -303,7 +310,7 @@ function onAjaxHelix3() $settings = $data['settings']; - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $query = $db->getQuery(true); @@ -333,7 +340,7 @@ function onAjaxHelix3() } static public function getItemRating($pk = 0){ - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $query = $db->getQuery(true); $query->select('ROUND(rating_sum / rating_count, 0) AS rating, rating_count') ->from($db->quoteName('#__content_rating')) @@ -358,7 +365,7 @@ static public function resetMenuLayout($current_menu_id = 0){ $item = $items[$current_menu_id]; } - $menuItems = new JMenuSite; + $menuItems = new SiteMenu(); $no_child = true; $count = 0; @@ -460,7 +467,7 @@ static public function resetMenuLayout($current_menu_id = 0){ static public function create_menu($current_menu_id) { $items = self::menuItems(); - $menus = new JMenuSite; + $menus = new SiteMenu(); if (isset($items[$current_menu_id])) { @@ -476,7 +483,7 @@ static public function create_menu($current_menu_id) static public function menuItems() { - $menus = new JMenuSite; + $menus = new SiteMenu(); $menus = $menus->getMenu(); $new = array(); foreach ($menus as $item) { @@ -487,7 +494,7 @@ static public function menuItems() static public function loadNewLayout($layout_data = null){ - $lang = JFactory::getLanguage(); + $lang = Factory::getLanguage(); $lang->load('tpl_' . self::getTemplate()->template, JPATH_SITE, $lang->getName(), true); ob_start(); @@ -512,7 +519,7 @@ static public function loadNewLayout($layout_data = null){ if ($layout_data) { foreach ($layout_data as $row) { $rowSettings = self::getSettings($row->settings); - $name = JText::_('HELIX_SECTION_TITLE'); + $name = Text::_('HELIX_SECTION_TITLE'); if (isset($row->settings->name)) { $name = $row->settings->name; @@ -527,7 +534,7 @@ static public function loadNewLayout($layout_data = null){
    @@ -585,24 +592,26 @@ static public function loadNewLayout($layout_data = null){ } - static public function getSettings($config = null) + static public function getSettings($config = null) { $data = ''; + if (count((array) $config)) - { + { foreach ($config as $key => $value) - { + { $data .= ' data-'.$key.'="'.$value.'"'; } } + return $data; } //Get template name - private static function getTemplate() + private static function getTemplate() { - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $query = $db->getQuery(true); $query->select($db->quoteName(array('template', 'params'))); $query->from($db->quoteName('#__template_styles')); @@ -614,40 +623,40 @@ private static function getTemplate() } // Upload File - private function upload_image() + private function upload_image() { - $input = JFactory::getApplication()->input; + $input = Factory::getApplication()->input; $image = $input->files->get('image'); $imageonly = $input->post->get('imageonly', false, 'BOOLEAN'); - $tplRegistry = new JRegistry(); + $tplRegistry = new Registry(); $tplParams = $tplRegistry->loadString(self::getTemplate()->params); $report = array(); // User is not authorised - if (!JFactory::getUser()->authorise('core.create', 'com_media')) + if (!Factory::getUser()->authorise('core.create', 'com_media')) { $report['status'] = false; - $report['output'] = JText::_('You are not authorised to upload file.'); + $report['output'] = Text::_('You are not authorised to upload file.'); echo json_encode($report); die; } if(count($image)) - { + { if ($image['error'] == UPLOAD_ERR_OK) { $error = false; - $params = JComponentHelper::getParams('com_media'); + $params = ComponentHelper::getParams('com_media'); // Total length of post back data in bytes. $contentLength = (int) $_SERVER['CONTENT_LENGTH']; // Instantiate the media helper - $mediaHelper = new JHelperMedia; + $mediaHelper = new MediaHelper; // Maximum allowed size of post back data in MB. $postMaxSize = $mediaHelper->toBytes(ini_get('post_max_size')); @@ -658,7 +667,7 @@ private function upload_image() // Check for the total size of post back data. if (($postMaxSize > 0 && $contentLength > $postMaxSize) || ($memoryLimit != -1 && $contentLength > $memoryLimit)) { $report['status'] = false; - $report['output'] = JText::_('Total size of upload exceeds the limit.'); + $report['output'] = Text::_('Total size of upload exceeds the limit.'); $error = true; echo json_encode($report); die; @@ -670,18 +679,18 @@ private function upload_image() if (($image['error'] == 1) || ($uploadMaxSize > 0 && $image['size'] > $uploadMaxSize) || ($uploadMaxFileSize > 0 && $image['size'] > $uploadMaxFileSize)) { $report['status'] = false; - $report['output'] = JText::_('This file is too large to upload.'); + $report['output'] = Text::_('This file is too large to upload.'); $error = true; } // Upload if no error found if(!$error) { // Organised folder structure - $date = JFactory::getDate(); - $folder = JHtml::_('date', $date, 'Y') . '/' . JHtml::_('date', $date, 'm') . '/' . JHtml::_('date', $date, 'd'); + $date = Factory::getDate(); + $folder = HTMLHelper::_('date', $date, 'Y') . '/' . HTMLHelper::_('date', $date, 'm') . '/' . HTMLHelper::_('date', $date, 'd'); if(!file_exists( JPATH_ROOT . '/images/' . $folder )) { - JFolder::create(JPATH_ROOT . '/images/' . $folder, 0755); + Folder::create(JPATH_ROOT . '/images/' . $folder, 0755); } $name = $image['name']; @@ -701,7 +710,7 @@ private function upload_image() } while(file_exists($dest)); // End Do not override - if(JFile::upload($path, $dest)) { + if(File::upload($path, $dest)) { $sizes = array(); @@ -721,7 +730,7 @@ private function upload_image() $sizes['large'] = explode('x', strtolower($tplParams->get('image_large_size', '600X600'))); } - $sources = Helix3Image::createThumbs($dest, $sizes, $folder, $base_name, $ext); + $sources = Helix3Image::createThumbs($dest, $folder, $base_name, $ext, $sizes); if(file_exists(JPATH_ROOT . '/images/' . $folder . '/' . $base_name . '_thumbnail.' . $ext)) { $src = 'images/' . $folder . '/' . $base_name . '_thumbnail.' . $ext; @@ -730,16 +739,16 @@ private function upload_image() $report['status'] = true; if($imageonly) { - $report['output'] = ''; + $report['output'] = ''; } else { - $report['output'] = '
  • Delete
  • '; + $report['output'] = '
  • Delete
  • '; } } } } } else { $report['status'] = false; - $report['output'] = JText::_('Upload Failed!'); + $report['output'] = Text::_('Upload Failed!'); } echo json_encode($report); @@ -748,53 +757,53 @@ private function upload_image() } // Delete File - private function remove_image() + private function remove_image() { $report = array(); - if (!JFactory::getUser()->authorise('core.delete', 'com_media')) + if (!Factory::getUser()->authorise('core.delete', 'com_media')) { $report['status'] = false; - $report['output'] = JText::_('You are not authorised to delete file.'); + $report['output'] = Text::_('You are not authorised to delete file.'); echo json_encode($report); die; } - $input = JFactory::getApplication()->input; + $input = Factory::getApplication()->input; $src = $input->post->get('src', '', 'STRING'); $path = JPATH_ROOT . '/' . $src; if(file_exists($path)) { - if(JFile::delete($path)) { + if(File::delete($path)) { $basename = basename($src); - $small = JPATH_ROOT . '/' . dirname($src) . '/' . JFile::stripExt($basename) . '_small.' . JFile::getExt($basename); - $thumbnail = JPATH_ROOT . '/' . dirname($src) . '/' . JFile::stripExt($basename) . '_thumbnail.' . JFile::getExt($basename); - $medium = JPATH_ROOT . '/' . dirname($src) . '/' . JFile::stripExt($basename) . '_medium.' . JFile::getExt($basename); - $large = JPATH_ROOT . '/' . dirname($src) . '/' . JFile::stripExt($basename) . '_large.' . JFile::getExt($basename); + $small = JPATH_ROOT . '/' . dirname($src) . '/' . File::stripExt($basename) . '_small.' . File::getExt($basename); + $thumbnail = JPATH_ROOT . '/' . dirname($src) . '/' . File::stripExt($basename) . '_thumbnail.' . File::getExt($basename); + $medium = JPATH_ROOT . '/' . dirname($src) . '/' . File::stripExt($basename) . '_medium.' . File::getExt($basename); + $large = JPATH_ROOT . '/' . dirname($src) . '/' . File::stripExt($basename) . '_large.' . File::getExt($basename); if(file_exists($small)) { - JFile::delete($small); + File::delete($small); } if(file_exists($thumbnail)) { - JFile::delete($thumbnail); + File::delete($thumbnail); } if(file_exists($medium)) { - JFile::delete($medium); + File::delete($medium); } if(file_exists($large)) { - JFile::delete($large); + File::delete($large); } $report['status'] = true; } else { $report['status'] = false; - $report['output'] = JText::_('Delete failed'); + $report['output'] = Text::_('Delete failed'); } } else { $report['status'] = true; From e77c264d6206fae4ded02f6b1f640e58425f4fa5 Mon Sep 17 00:00:00 2001 From: Md Siddiqur Rahman Date: Fri, 14 Oct 2022 13:12:48 +0600 Subject: [PATCH 03/29] update namespace --- templates/shaper_helix3/comingsoon.php | 23 +- templates/shaper_helix3/component.php | 10 +- templates/shaper_helix3/error.php | 21 +- templates/shaper_helix3/features/logo.php | 18 +- templates/shaper_helix3/features/menu.php | 8 +- .../shaper_helix3/features/preloader.php | 9 +- templates/shaper_helix3/features/title.php | 7 +- .../mod_articles_categories/default_items.php | 12 +- .../html/mod_articles_latest/default.php | 5 +- .../html/mod_breadcrumbs/default.php | 4 +- .../shaper_helix3/html/mod_login/default.php | 51 ++-- .../html/mod_login/default_logout.php | 17 +- .../shaper_helix3/html/mod_menu/default.php | 6 +- .../html/mod_menu/default_heading.php | 4 +- .../html/mod_menu/default_separator.php | 4 +- .../html/mod_menu/default_url.php | 4 +- .../shaper_helix3/html/mod_search/default.php | 4 +- .../html/mod_tags_popular/cloud.php | 9 +- .../html/mod_tags_popular/default.php | 7 +- .../html/mod_tags_similar/default.php | 10 +- templates/shaper_helix3/html/pagination.php | 10 +- templates/shaper_helix3/index.php | 21 +- templates/shaper_helix3/offline.php | 32 +-- .../addons/call_to_action/admin.php | 143 ++++++------ .../addons/image_content/admin.php | 221 +++++++++--------- .../addons/image_content/site.php | 20 +- .../addons/testimonialpro/admin.php | 83 +++---- .../addons/testimonialpro/site.php | 16 +- 28 files changed, 443 insertions(+), 336 deletions(-) diff --git a/templates/shaper_helix3/comingsoon.php b/templates/shaper_helix3/comingsoon.php index be02fe7..0ca01b8 100755 --- a/templates/shaper_helix3/comingsoon.php +++ b/templates/shaper_helix3/comingsoon.php @@ -7,8 +7,15 @@ */ defined('_JEXEC') or die; -$doc = JFactory::getDocument(); -$app = JFactory::getApplication(); + +use Joomla\CMS\Factory; +use Joomla\CMS\Uri\Uri; +use Joomla\CMS\Image\Image; +use Joomla\CMS\Language\Text; +use Joomla\CMS\HTML\HTMLHelper; + +$doc = Factory::getDocument(); +$app = Factory::getApplication(); //Load Helix $helix3_path = JPATH_PLUGINS.'/system/helix3/core/helix3.php'; @@ -28,7 +35,7 @@ //Comingsoon Logo if ($logo_image = $this->params->get('comingsoon_logo')) { - $logo = JURI::root() . '/' . $logo_image; + $logo = Uri::root() . '/' . $logo_image; $path = JPATH_ROOT . '/' . $logo_image; } else @@ -39,7 +46,7 @@ if (file_exists($path)) { - $image = new JImage( $path ); + $image = new Image( $path ); $logo_width = $image->getWidth(); $logo_height = $image->getHeight(); } @@ -58,7 +65,7 @@ $comingsoon_date = explode('-', $this->params->get("comingsoon_date")); //Load jQuery -JHtml::_('jquery.framework'); +HTMLHelper::_('jquery.framework'); ?> @@ -68,7 +75,7 @@ helix3->getParam('favicon')) { - $doc->addFavicon( JURI::base(true) . '/' . $favicon); + $doc->addFavicon( Uri::base(true) . '/' . $favicon); } else { @@ -108,7 +115,7 @@ $hascs_bg = ''; if ($cs_bg = $this->params->get('comingsoon_bg')) { - $comingsoon_bg = JURI::root() . $cs_bg; + $comingsoon_bg = Uri::root() . $cs_bg; $hascs_bg = 'has-background'; } ?> @@ -211,7 +218,7 @@ diff --git a/templates/shaper_helix3/component.php b/templates/shaper_helix3/component.php index f342e12..c561459 100755 --- a/templates/shaper_helix3/component.php +++ b/templates/shaper_helix3/component.php @@ -7,6 +7,10 @@ */ //no direct accees defined ('_JEXEC') or die ('resticted aceess'); + +use Joomla\CMS\Factory; +use Joomla\CMS\Uri\Uri; + //Load Helix $helix3_path = JPATH_PLUGINS . '/system/helix3/core/helix3.php'; @@ -20,7 +24,7 @@ die('Please install and activate helix plugin'); } -$app = JFactory::getApplication(); +$app = Factory::getApplication(); $input = $app->input; $option = str_replace('_', '-', $input->get('option', '', 'STRING')); @@ -33,10 +37,10 @@ params->get('favicon')) { - $doc->addFavicon( JURI::base(true) . '/' . $favicon); + $doc->addFavicon( Uri::base(true) . '/' . $favicon); } else { diff --git a/templates/shaper_helix3/error.php b/templates/shaper_helix3/error.php index ef63204..d7c834d 100755 --- a/templates/shaper_helix3/error.php +++ b/templates/shaper_helix3/error.php @@ -9,12 +9,17 @@ //no direct accees defined ('_JEXEC') or die ('resticted aceess'); -$doc = JFactory::getDocument(); -$params = JFactory::getApplication()->getTemplate('true')->params; +use Joomla\CMS\Document\Renderer\Html\HeadRenderer; +use Joomla\CMS\Factory; +use Joomla\CMS\Uri\Uri; +use Joomla\CMS\Language\Text; + +$doc = Factory::getDocument(); +$params = Factory::getApplication()->getTemplate('true')->params; //Error Logo if ($logo_image = $params->get('error_logo')) { - $logo = JURI::root() . '/' . $logo_image; + $logo = Uri::root() . '/' . $logo_image; $path = JPATH_ROOT . '/' . $logo_image; } else { $logo = $this->baseurl . '/templates/' . $this->template . '/images/presets/preset1/logo.png'; @@ -23,7 +28,7 @@ //Favicon if($favicon = $params->get('favicon')) { - $doc->addFavicon( JURI::base(true) . '/' . $favicon); + $doc->addFavicon( Uri::base(true) . '/' . $favicon); } else { $doc->addFavicon( $this->baseurl . '/templates/' . $this->template . '/images/favicon.ico' ); } @@ -46,14 +51,14 @@ require_once($head); } } -$header_renderer = new JDocumentRendererHead($doc); +$header_renderer = new HeadRenderer($doc); $header_contents = $header_renderer->render(null); //background image $error_bg = ''; $hascs_bg = ''; if ($err_bg = $params->get('error_bg')) { - $error_bg = JURI::root() . $err_bg; + $error_bg = Uri::root() . $err_bg; $hascs_bg = 'has-background'; } @@ -89,7 +94,7 @@ setError($this->_error->getPrevious()); ?> -

    +

    _error->getMessage(), ENT_QUOTES, 'UTF-8'); ?>

    renderBacktrace(); ?> setError($this->_error->getPrevious()); ?> @@ -100,7 +105,7 @@
    - + getBuffer('modules', '404', array('style' => 'sp_xhtml')); ?>
    diff --git a/templates/shaper_helix3/features/logo.php b/templates/shaper_helix3/features/logo.php index 98d0bc4..a7fd232 100755 --- a/templates/shaper_helix3/features/logo.php +++ b/templates/shaper_helix3/features/logo.php @@ -8,6 +8,10 @@ //no direct accees defined ('_JEXEC') or die('resticted aceess'); +use Joomla\CMS\Factory; +use Joomla\CMS\Image\Image; +use Joomla\CMS\Uri\Uri; + class Helix3FeatureLogo { private $helix3; @@ -24,8 +28,6 @@ public function renderFeature() //Retina Image if( $this->helix3->getParam('logo_type') == 'image' ) { - jimport('joomla.image.image'); - if( $this->helix3->getParam('logo_image') ) { $path = JPATH_ROOT . '/' . $this->helix3->getParam('logo_image'); } else { @@ -33,7 +35,7 @@ public function renderFeature() } if(file_exists($path)) { - $image = new JImage( $path ); + $image = new Image( $path ); $width = $image->getWidth(); $height = $image->getHeight(); } else { @@ -45,7 +47,7 @@ public function renderFeature() $html = ''; $custom_logo_class = ''; - $sitename = JFactory::getApplication()->get('sitename'); + $sitename = Factory::getApplication()->get('sitename'); if( $this->helix3->getParam('mobile_logo') ) { $custom_logo_class = ' d-none d-lg-block'; @@ -54,7 +56,7 @@ public function renderFeature() if( $this->helix3->getParam('logo_type') == 'image' ) { if( $this->helix3->getParam('logo_image') ) { $html .= ''; } else { $html .= ' diff --git a/templates/shaper_helix3/html/mod_breadcrumbs/default.php b/templates/shaper_helix3/html/mod_breadcrumbs/default.php index c12dd1e..895e757 100755 --- a/templates/shaper_helix3/html/mod_breadcrumbs/default.php +++ b/templates/shaper_helix3/html/mod_breadcrumbs/default.php @@ -6,6 +6,8 @@ * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later */ +use Joomla\CMS\Language\Text; + defined('_JEXEC') or die; ?> @@ -13,7 +15,7 @@ get('showHere', 1)) { - echo '' . JText::_('MOD_BREADCRUMBS_HERE') . ' '; + echo '' . Text::_('MOD_BREADCRUMBS_HERE') . ' '; } else { diff --git a/templates/shaper_helix3/html/mod_login/default.php b/templates/shaper_helix3/html/mod_login/default.php index 085ceef..1c2c659 100755 --- a/templates/shaper_helix3/html/mod_login/default.php +++ b/templates/shaper_helix3/html/mod_login/default.php @@ -6,17 +6,24 @@ * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later */ +use Joomla\CMS\Uri\Uri; +use Joomla\CMS\Router\Route; +use Joomla\CMS\Language\Text; +use Joomla\CMS\HTML\HTMLHelper; +use Joomla\CMS\Plugin\PluginHelper; +use Joomla\CMS\Component\ComponentHelper; + defined('_JEXEC') or die; require_once JPATH_SITE . '/components/com_users/helpers/route.php'; -JHtml::_('behavior.keepalive'); -JHtml::_('bootstrap.tooltip'); +HTMLHelper::_('behavior.keepalive'); +HTMLHelper::_('bootstrap.tooltip'); -$usersConfig = JComponentHelper::getParams('com_users'); +$usersConfig = ComponentHelper::getParams('com_users'); ?> -
    + get('pretext')) : ?>

    get('pretext'); ?>

    @@ -27,12 +34,12 @@ get('usetext')) : ?>
    - + - +
    - +
    @@ -41,12 +48,12 @@ get('usetext')) : ?>
    - + - +
    - +
    @@ -55,47 +62,47 @@
    get('usetext')) : ?>
    - + - +
    - +
    - +
    - +
    - + get('allowUserRegistration')) : ?> - +
    - + get('posttext')) : ?>
    diff --git a/templates/shaper_helix3/html/mod_login/default_logout.php b/templates/shaper_helix3/html/mod_login/default_logout.php index 598b7e8..87c144d 100755 --- a/templates/shaper_helix3/html/mod_login/default_logout.php +++ b/templates/shaper_helix3/html/mod_login/default_logout.php @@ -6,25 +6,30 @@ * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later */ +use Joomla\CMS\Uri\Uri; +use Joomla\CMS\Router\Route; +use Joomla\CMS\Language\Text; +use Joomla\CMS\HTML\HTMLHelper; + defined('_JEXEC') or die; -JHtml::_('behavior.keepalive'); +HTMLHelper::_('behavior.keepalive'); ?> - + get('greeting')) : ?>
    - + - +
    diff --git a/templates/shaper_helix3/html/mod_menu/default.php b/templates/shaper_helix3/html/mod_menu/default.php index 69ac490..beb164e 100755 --- a/templates/shaper_helix3/html/mod_menu/default.php +++ b/templates/shaper_helix3/html/mod_menu/default.php @@ -6,6 +6,8 @@ * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later */ +use Joomla\CMS\Helper\ModuleHelper; + defined('_JEXEC') or die; if($module->position == 'offcanvas') { @@ -85,11 +87,11 @@ case 'url': case 'component': case 'heading': - require JModuleHelper::getLayoutPath('mod_menu', 'default_' . $item->type); + require ModuleHelper::getLayoutPath('mod_menu', 'default_' . $item->type); break; default: - require JModuleHelper::getLayoutPath('mod_menu', 'default_url'); + require ModuleHelper::getLayoutPath('mod_menu', 'default_url'); break; endswitch; diff --git a/templates/shaper_helix3/html/mod_menu/default_heading.php b/templates/shaper_helix3/html/mod_menu/default_heading.php index a650e0d..8c02641 100755 --- a/templates/shaper_helix3/html/mod_menu/default_heading.php +++ b/templates/shaper_helix3/html/mod_menu/default_heading.php @@ -8,6 +8,8 @@ defined('_JEXEC') or die; +use Joomla\CMS\HTML\HTMLHelper; + $title = $item->anchor_title ? ' title="' . $item->anchor_title . '"' : ''; $anchor_css = $item->anchor_css ? $item->anchor_css : ''; @@ -15,7 +17,7 @@ if ($item->menu_image) { - $linktype = JHtml::_('image', $item->menu_image, $item->title); + $linktype = HTMLHelper::_('image', $item->menu_image, $item->title); if ($item->getParams()->get('menu_text', 1)) { diff --git a/templates/shaper_helix3/html/mod_menu/default_separator.php b/templates/shaper_helix3/html/mod_menu/default_separator.php index 53a87d5..515c3d8 100755 --- a/templates/shaper_helix3/html/mod_menu/default_separator.php +++ b/templates/shaper_helix3/html/mod_menu/default_separator.php @@ -6,6 +6,8 @@ * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later */ +use Joomla\CMS\HTML\HTMLHelper; + defined('_JEXEC') or die; $title = $item->anchor_title ? ' title="' . $item->anchor_title . '"' : ''; @@ -15,7 +17,7 @@ if ($item->menu_image) { - $linktype = JHtml::_('image', $item->menu_image, $item->title); + $linktype = HTMLHelper::_('image', $item->menu_image, $item->title); if ($item->getParams()->get('menu_text', 1)) { diff --git a/templates/shaper_helix3/html/mod_menu/default_url.php b/templates/shaper_helix3/html/mod_menu/default_url.php index 63d9a14..8999531 100755 --- a/templates/shaper_helix3/html/mod_menu/default_url.php +++ b/templates/shaper_helix3/html/mod_menu/default_url.php @@ -6,6 +6,8 @@ * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later */ +use Joomla\CMS\Filter\OutputFilter; + defined('_JEXEC') or die; // Note. It is important to remove spaces between elements. @@ -29,7 +31,7 @@ } $flink = $item->flink; -$flink = JFilterOutput::ampReplace(htmlspecialchars($flink)); +$flink = OutputFilter::ampReplace(htmlspecialchars($flink)); switch ($item->browserNav) : default: diff --git a/templates/shaper_helix3/html/mod_search/default.php b/templates/shaper_helix3/html/mod_search/default.php index 455a905..f7aef57 100755 --- a/templates/shaper_helix3/html/mod_search/default.php +++ b/templates/shaper_helix3/html/mod_search/default.php @@ -7,9 +7,11 @@ */ defined('_JEXEC') or die; + +use Joomla\CMS\Router\Route; ?>
    diff --git a/templates/shaper_helix3/html/com_mailto/mailto/default.php b/templates/shaper_helix3/html/com_mailto/mailto/default.php index 6b06c5b..643b746 100755 --- a/templates/shaper_helix3/html/com_mailto/mailto/default.php +++ b/templates/shaper_helix3/html/com_mailto/mailto/default.php @@ -7,13 +7,19 @@ * @license GNU General Public License version 2 or later; see LICENSE.txt */ +use Joomla\CMS\Factory; +use Joomla\CMS\HTML\HTMLHelper; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Router\Router; +use Joomla\CMS\Uri\Uri; + defined('_JEXEC') or die; -JHtml::_('behavior.core'); -JHtml::_('behavior.keepalive'); +HTMLHelper::_('behavior.core'); +HTMLHelper::_('behavior.keepalive'); $data = $this->get('data'); -JFactory::getDocument()->addScriptDeclaration(" +Factory::getDocument()->addScriptDeclaration(" Joomla.submitbutton = function(pressbutton) { var form = document.getElementById('mailtoForm'); @@ -21,7 +27,7 @@ // do field validation if (form.mailto.value == '' || form.from.value == '') { - alert('" . JText::_('COM_MAILTO_EMAIL_ERR_NOINFO') . "'); + alert('" . Text::_('COM_MAILTO_EMAIL_ERR_NOINFO') . "'); return false; } form.submit(); @@ -32,11 +38,11 @@

    - +

    - +
    form->getFieldset('') as $field) : ?> hidden) : ?> @@ -45,10 +51,10 @@
    @@ -57,37 +63,37 @@ - + -
    +
    - +
    - +
    - +
    - +
    @@ -96,7 +102,7 @@ - +
    \ No newline at end of file diff --git a/templates/shaper_helix3/html/com_search/search/default_form.php b/templates/shaper_helix3/html/com_search/search/default_form.php index 61396b9..0ff8560 100644 --- a/templates/shaper_helix3/html/com_search/search/default_form.php +++ b/templates/shaper_helix3/html/com_search/search/default_form.php @@ -6,20 +6,25 @@ * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later */ +use Joomla\CMS\Factory; +use Joomla\CMS\HTML\HTMLHelper; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Router\Route; + defined('_JEXEC') or die; -JHtml::_('bootstrap.tooltip'); +HTMLHelper::_('bootstrap.tooltip'); -$lang = JFactory::getLanguage(); +$lang = Factory::getLanguage(); $upper_limit = $lang->getUpperLimitSearchWord(); ?> -
    +
    - -
    @@ -28,7 +33,7 @@
    searchword)) : ?>

    - ' . $this->total . ''); ?> + ' . $this->total . ''); ?>

    @@ -39,7 +44,7 @@ params->get('search_phrases', 1)) : ?>
    - + lists['searchphrase']; ?>
    @@ -48,13 +53,13 @@ params->get('search_areas', 1)) : ?>
    - +
    searchareas['search'] as $val => $txt) : ?> searchareas['active']) && in_array($val, $this->searchareas['active']) ? 'checked="checked"' : ''; ?>
    diff --git a/templates/shaper_helix3/html/com_users/login/default_login.php b/templates/shaper_helix3/html/com_users/login/default_login.php index 8478d2d..17f2c39 100644 --- a/templates/shaper_helix3/html/com_users/login/default_login.php +++ b/templates/shaper_helix3/html/com_users/login/default_login.php @@ -7,9 +7,15 @@ * @license GNU General Public License version 2 or later; see LICENSE.txt */ +use Joomla\CMS\Router\Route; +use Joomla\CMS\Language\Text; +use Joomla\CMS\HTML\HTMLHelper; +use Joomla\CMS\Plugin\PluginHelper; +use Joomla\CMS\Component\ComponentHelper; + defined('_JEXEC') or die; -JHtml::_('behavior.keepalive'); +HTMLHelper::_('behavior.keepalive'); ?>
    @@ -30,19 +36,19 @@ params->get('login_image') != '')) :?> - + params->get('logindescription_show') == 1 && str_replace(' ', '', $this->params->get('login_description')) != '') || $this->params->get('login_image') != '') : ?>
    - + form->setFieldAttribute( 'username', 'hint', JText::_('COM_USERS_LOGIN_USERNAME_LABEL') ); - $this->form->setFieldAttribute( 'password', 'hint', JText::_('JGLOBAL_PASSWORD') ); - $this->form->setFieldAttribute( 'secretkey', 'hint', JText::_('JGLOBAL_SECRETKEY') ); + $this->form->setFieldAttribute( 'username', 'hint', Text::_('COM_USERS_LOGIN_USERNAME_LABEL') ); + $this->form->setFieldAttribute( 'password', 'hint', Text::_('JGLOBAL_PASSWORD') ); + $this->form->setFieldAttribute( 'secretkey', 'hint', Text::_('JGLOBAL_SECRETKEY') ); ?> form->getFieldset('credentials') as $field) : ?> @@ -59,41 +65,41 @@
    - +
    - +
    form->getValue('return', '', $this->params->get('login_redirect_url', $this->params->get('login_redirect_menuitem'))); ?> - - + +
    diff --git a/templates/shaper_helix3/html/com_users/registration/default.php b/templates/shaper_helix3/html/com_users/registration/default.php index a9947f8..e1b28ae 100755 --- a/templates/shaper_helix3/html/com_users/registration/default.php +++ b/templates/shaper_helix3/html/com_users/registration/default.php @@ -7,10 +7,14 @@ * @license GNU General Public License version 2 or later; see LICENSE.txt */ +use Joomla\CMS\HTML\HTMLHelper; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Router\Route; + defined('_JEXEC') or die; -JHtml::_('behavior.keepalive'); -JHtml::_('behavior.formvalidator'); +HTMLHelper::_('behavior.keepalive'); +HTMLHelper::_('behavior.formvalidator'); ?>
    @@ -19,7 +23,7 @@

    escape($this->params->get('page_heading')); ?>

    -
    + form->getFieldsets() as $fieldset): // Iterate through the form fieldsets and display each one.?> form->getFieldset($fieldset->name);?> @@ -31,7 +35,7 @@
    label; ?> required && $field->type != 'Spacer') : ?> - + input; ?> @@ -42,12 +46,12 @@
    - - + +
    - +
    diff --git a/templates/shaper_helix3/html/com_users/remind/default.php b/templates/shaper_helix3/html/com_users/remind/default.php index 8e2f2cb..4eb27e4 100755 --- a/templates/shaper_helix3/html/com_users/remind/default.php +++ b/templates/shaper_helix3/html/com_users/remind/default.php @@ -7,10 +7,14 @@ * @license GNU General Public License version 2 or later; see LICENSE.txt */ +use Joomla\CMS\HTML\HTMLHelper; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Router\Route; + defined('_JEXEC') or die; -JHtml::_('behavior.keepalive'); -JHtml::_('behavior.formvalidator'); +HTMLHelper::_('behavior.keepalive'); +HTMLHelper::_('behavior.formvalidator'); ?>
    @@ -21,9 +25,9 @@ -
    + form->getFieldsets() as $fieldset) : ?> -

    label); ?>

    +

    label); ?>

    form->getFieldset($fieldset->name) as $name => $field) : ?>
    label; ?> @@ -32,9 +36,9 @@
    - +
    - +
    diff --git a/templates/shaper_helix3/html/com_users/reset/complete.php b/templates/shaper_helix3/html/com_users/reset/complete.php index 9303087..2e53e21 100755 --- a/templates/shaper_helix3/html/com_users/reset/complete.php +++ b/templates/shaper_helix3/html/com_users/reset/complete.php @@ -7,10 +7,14 @@ * @license GNU General Public License version 2 or later; see LICENSE.txt */ +use Joomla\CMS\HTML\HTMLHelper; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Router\Route; + defined('_JEXEC') or die; -JHtml::_('behavior.keepalive'); -JHtml::_('behavior.formvalidation'); +HTMLHelper::_('behavior.keepalive'); +HTMLHelper::_('behavior.formvalidation'); ?>
    @@ -21,10 +25,10 @@ -
    + form->getFieldsets() as $fieldset) : ?> form->getFieldset($fieldset->name) as $name => $field) : ?> -

    label); ?>

    +

    label); ?>

    label; ?> input; ?> @@ -33,9 +37,9 @@
    - +
    - +
    diff --git a/templates/shaper_helix3/html/com_users/reset/confirm.php b/templates/shaper_helix3/html/com_users/reset/confirm.php index f46524f..6c59240 100755 --- a/templates/shaper_helix3/html/com_users/reset/confirm.php +++ b/templates/shaper_helix3/html/com_users/reset/confirm.php @@ -7,10 +7,14 @@ * @license GNU General Public License version 2 or later; see LICENSE.txt */ +use Joomla\CMS\HTML\HTMLHelper; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Router\Route; + defined('_JEXEC') or die; -JHtml::_('behavior.keepalive'); -JHtml::_('behavior.formvalidation'); +HTMLHelper::_('behavior.keepalive'); +HTMLHelper::_('behavior.formvalidation'); ?>
    @@ -22,9 +26,9 @@ -
    + form->getFieldsets() as $fieldset) : ?> -

    label); ?>

    +

    label); ?>

    form->getFieldset($fieldset->name) as $name => $field) : ?>
    label; ?> @@ -34,9 +38,9 @@
    - +
    - +
    diff --git a/templates/shaper_helix3/html/com_users/reset/default.php b/templates/shaper_helix3/html/com_users/reset/default.php index 3f2624f..7a4d99b 100755 --- a/templates/shaper_helix3/html/com_users/reset/default.php +++ b/templates/shaper_helix3/html/com_users/reset/default.php @@ -7,10 +7,14 @@ * @license GNU General Public License version 2 or later; see LICENSE.txt */ +use Joomla\CMS\HTML\HTMLHelper; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Router\Route; + defined('_JEXEC') or die; -JHtml::_('behavior.keepalive'); -JHtml::_('behavior.formvalidator'); +HTMLHelper::_('behavior.keepalive'); +HTMLHelper::_('behavior.formvalidator'); ?>
    @@ -21,9 +25,9 @@ -
    + form->getFieldsets() as $fieldset) : ?> -

    label); ?>

    +

    label); ?>

    form->getFieldset($fieldset->name) as $name => $field) : ?>
    label; ?> @@ -33,9 +37,9 @@
    - +
    - +
    diff --git a/templates/shaper_helix3/html/layouts/joomla/content/blog_style_default_item_title.php b/templates/shaper_helix3/html/layouts/joomla/content/blog_style_default_item_title.php index b1539d3..68da776 100755 --- a/templates/shaper_helix3/html/layouts/joomla/content/blog_style_default_item_title.php +++ b/templates/shaper_helix3/html/layouts/joomla/content/blog_style_default_item_title.php @@ -6,23 +6,28 @@ * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later */ +use Joomla\CMS\Factory; +use Joomla\CMS\HTML\HTMLHelper; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Router\Route; + defined('_JEXEC') or die; // Create a shortcut for params. $params = $displayData->params; $canEdit = $displayData->params->get('access-edit'); -JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html'); +HTMLHelper::addIncludePath(JPATH_COMPONENT.'/helpers/html'); -$currentDate = JFactory::getDate()->format('Y-m-d H:i:s'); +$currentDate = Factory::getDate()->format('Y-m-d H:i:s'); $isNotPublishedYet = $displayData->publish_up > $currentDate; -$isExpired = JVERSION < 4 ? $displayData->publish_down < $currentDate && $displayData->publish_down !== JFactory::getDbo()->getNullDate() : !is_null($displayData->publish_down) && $displayData->publish_down < $currentDate; +$isExpired = JVERSION < 4 ? $displayData->publish_down < $currentDate && $displayData->publish_down !== Factory::getDbo()->getNullDate() : !is_null($displayData->publish_down) && $displayData->publish_down < $currentDate; ?> get('show_title') || $displayData->state == 0 || ($params->get('show_author') && !empty($displayData->author ))) : ?> get('show_title')) : ?>

    get('link_titles') && $params->get('access-view')) : ?> - escape($displayData->title); ?> @@ -31,12 +36,12 @@ state == 0 : $displayData->state == Joomla\Component\Content\Administrator\Extension\ContentComponent::CONDITION_UNPUBLISHED) : ?> - + - + - + diff --git a/templates/shaper_helix3/html/layouts/joomla/content/blog_style_default_links.php b/templates/shaper_helix3/html/layouts/joomla/content/blog_style_default_links.php index e0e7cf0..cc18693 100755 --- a/templates/shaper_helix3/html/layouts/joomla/content/blog_style_default_links.php +++ b/templates/shaper_helix3/html/layouts/joomla/content/blog_style_default_links.php @@ -7,11 +7,14 @@ */ defined('_JEXEC') or die; + +use Joomla\CMS\Router\Route; + ?>

    @@ -60,7 +64,7 @@ get('children') && $displayData->maxLevel != 0) : ?>

    - +

    loadTemplate('children'); ?> diff --git a/templates/shaper_helix3/html/layouts/joomla/content/comments/comments.php b/templates/shaper_helix3/html/layouts/joomla/content/comments/comments.php index 9fe33dd..438dbe9 100755 --- a/templates/shaper_helix3/html/layouts/joomla/content/comments/comments.php +++ b/templates/shaper_helix3/html/layouts/joomla/content/comments/comments.php @@ -6,19 +6,24 @@ * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later */ +use Joomla\CMS\Factory; +use Joomla\CMS\Layout\LayoutHelper; +use Joomla\CMS\Router\Route; +use Joomla\CMS\Uri\Uri; + //no direct access defined('_JEXEC') or die('Restricted Access'); -$params = JFactory::getApplication()->getTemplate(true)->params; +$params = Factory::getApplication()->getTemplate(true)->params; if ($params->get('commenting_engine') != 'disabled') { - $url = JRoute::_(ContentHelperRoute::getArticleRoute($displayData->id . ':' . $displayData->alias, $displayData->catid, $displayData->language)); - $root = JURI::base(); - $root = new JURI($root); + $url = Route::_(ContentHelperRoute::getArticleRoute($displayData->id . ':' . $displayData->alias, $displayData->catid, $displayData->language)); + $root = Uri::base(); + $root = new Uri($root); $url = $root->getScheme() . '://' . $root->getHost() . $url; echo '
    '; - echo JLayoutHelper::render('joomla.content.comments.engine.comments.' . $params->get('commenting_engine'), array('item' => $displayData, 'params' => $params, 'url' => $url)); + echo LayoutHelper::render('joomla.content.comments.engine.comments.' . $params->get('commenting_engine'), array('item' => $displayData, 'params' => $params, 'url' => $url)); echo '
    '; } \ No newline at end of file diff --git a/templates/shaper_helix3/html/layouts/joomla/content/comments/comments_count.php b/templates/shaper_helix3/html/layouts/joomla/content/comments/comments_count.php index ebdaf0f..95a5c92 100755 --- a/templates/shaper_helix3/html/layouts/joomla/content/comments/comments_count.php +++ b/templates/shaper_helix3/html/layouts/joomla/content/comments/comments_count.php @@ -6,19 +6,24 @@ * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later */ +use Joomla\CMS\Factory; +use Joomla\CMS\Layout\LayoutHelper; +use Joomla\CMS\Router\Route; +use Joomla\CMS\Uri\Uri; + //no direct access defined('_JEXEC') or die('Restricted Access'); -$params = JFactory::getApplication()->getTemplate(true)->params; +$params = Factory::getApplication()->getTemplate(true)->params; if (($params->get('commenting_engine') != 'disabled') && ($params->get('comments_count'))) : - $url = JRoute::_(ContentHelperRoute::getArticleRoute($displayData['item']->id . ':' . $displayData['item']->alias, $displayData['item']->catid, $displayData['item']->language)); - $root = JURI::base(); - $root = new JURI($root); + $url = Route::_(ContentHelperRoute::getArticleRoute($displayData['item']->id . ':' . $displayData['item']->alias, $displayData['item']->catid, $displayData['item']->language)); + $root = Uri::base(); + $root = new Uri($root); $url = $root->getScheme() . '://' . $root->getHost() . $url; ?>
    - get('commenting_engine'), array( 'item' => $displayData, 'params' => $params, 'url' => $url)); ?> + get('commenting_engine'), array( 'item' => $displayData, 'params' => $params, 'url' => $url)); ?>
    \ No newline at end of file diff --git a/templates/shaper_helix3/html/layouts/joomla/content/comments/engine/count/disqus.php b/templates/shaper_helix3/html/layouts/joomla/content/comments/engine/count/disqus.php index 321ce9d..0a82916 100755 --- a/templates/shaper_helix3/html/layouts/joomla/content/comments/engine/count/disqus.php +++ b/templates/shaper_helix3/html/layouts/joomla/content/comments/engine/count/disqus.php @@ -6,12 +6,14 @@ * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later */ +use Joomla\CMS\Factory; + //no direct access defined('_JEXEC') or die('Restricted Access'); if ($displayData['params']->get('disqus_subdomain') != '') { - $doc = JFactory::getDocument(); + $doc = Factory::getDocument(); if (!defined('HELIX_COMMENTS_DISQUS_COUNT')) { diff --git a/templates/shaper_helix3/html/layouts/joomla/content/comments/engine/count/facebook.php b/templates/shaper_helix3/html/layouts/joomla/content/comments/engine/count/facebook.php index a409662..0a6861a 100755 --- a/templates/shaper_helix3/html/layouts/joomla/content/comments/engine/count/facebook.php +++ b/templates/shaper_helix3/html/layouts/joomla/content/comments/engine/count/facebook.php @@ -6,12 +6,15 @@ * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later */ +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; + //no direct access defined('_JEXEC') or die('Restricted Access'); if ($displayData['params']->get('fb_appID') != '') { - $doc = JFactory::getDocument(); + $doc = Factory::getDocument(); if (!defined('HELIX_COMMENTS_FACEBOOK_COUNT')) { @@ -21,7 +24,7 @@ ?> - > + > get('access-edit'); @@ -17,7 +19,7 @@
    - +
    @@ -34,20 +36,20 @@
    - +
    diff --git a/templates/shaper_helix3/html/layouts/joomla/content/icons/create.php b/templates/shaper_helix3/html/layouts/joomla/content/icons/create.php index a87631e..7aeed9d 100644 --- a/templates/shaper_helix3/html/layouts/joomla/content/icons/create.php +++ b/templates/shaper_helix3/html/layouts/joomla/content/icons/create.php @@ -6,13 +6,15 @@ * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later */ +use Joomla\CMS\Language\Text; + defined('_JEXEC') or die; $params = $displayData['params']; ?> get('show_icons')) : ?> - + - + diff --git a/templates/shaper_helix3/html/layouts/joomla/content/icons/edit.php b/templates/shaper_helix3/html/layouts/joomla/content/icons/edit.php index 46987a5..f7d45dc 100644 --- a/templates/shaper_helix3/html/layouts/joomla/content/icons/edit.php +++ b/templates/shaper_helix3/html/layouts/joomla/content/icons/edit.php @@ -6,13 +6,16 @@ * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later */ +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; + defined('_JEXEC') or die; $article = $displayData['article']; -$currentDate = JFactory::getDate()->format('Y-m-d H:i:s'); +$currentDate = Factory::getDate()->format('Y-m-d H:i:s'); $isUnpublished = ($article->publish_up > $currentDate) - || ($article->publish_down < $currentDate && $article->publish_down !== JFactory::getDbo()->getNullDate()); + || ($article->publish_down < $currentDate && $article->publish_down !== Factory::getDbo()->getNullDate()); $icon = $article->state ? 'edit' : 'eye-close'; @@ -22,4 +25,4 @@ } ?> - \ No newline at end of file + \ No newline at end of file diff --git a/templates/shaper_helix3/html/layouts/joomla/content/icons/edit_lock.php b/templates/shaper_helix3/html/layouts/joomla/content/icons/edit_lock.php index 4e409e9..197985b 100644 --- a/templates/shaper_helix3/html/layouts/joomla/content/icons/edit_lock.php +++ b/templates/shaper_helix3/html/layouts/joomla/content/icons/edit_lock.php @@ -6,9 +6,12 @@ * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later */ +use Joomla\CMS\HTML\HTMLHelper; +use Joomla\CMS\Language\Text; + defined('_JEXEC') or die; $tooltip = $displayData['tooltip']; ?> - - \ No newline at end of file + + \ No newline at end of file diff --git a/templates/shaper_helix3/html/layouts/joomla/content/icons/email.php b/templates/shaper_helix3/html/layouts/joomla/content/icons/email.php index 98ad9e7..06e58f0 100644 --- a/templates/shaper_helix3/html/layouts/joomla/content/icons/email.php +++ b/templates/shaper_helix3/html/layouts/joomla/content/icons/email.php @@ -6,13 +6,15 @@ * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later */ +use Joomla\CMS\Language\Text; + defined('_JEXEC') or die; $params = $displayData['params']; ?> get('show_icons')) : ?> - + - + diff --git a/templates/shaper_helix3/html/layouts/joomla/content/icons/print_popup.php b/templates/shaper_helix3/html/layouts/joomla/content/icons/print_popup.php index afe0680..cc48fe0 100644 --- a/templates/shaper_helix3/html/layouts/joomla/content/icons/print_popup.php +++ b/templates/shaper_helix3/html/layouts/joomla/content/icons/print_popup.php @@ -6,6 +6,9 @@ * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later */ +use Joomla\CMS\HTML\HTMLHelper; +use Joomla\CMS\Language\Text; + defined('_JEXEC') or die; $params = $displayData['params']; @@ -15,11 +18,11 @@ get('show_icons')) : ?> - + - + - + diff --git a/templates/shaper_helix3/html/layouts/joomla/content/icons/print_screen.php b/templates/shaper_helix3/html/layouts/joomla/content/icons/print_screen.php index afe0680..cc48fe0 100644 --- a/templates/shaper_helix3/html/layouts/joomla/content/icons/print_screen.php +++ b/templates/shaper_helix3/html/layouts/joomla/content/icons/print_screen.php @@ -6,6 +6,9 @@ * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later */ +use Joomla\CMS\HTML\HTMLHelper; +use Joomla\CMS\Language\Text; + defined('_JEXEC') or die; $params = $displayData['params']; @@ -15,11 +18,11 @@ get('show_icons')) : ?> - + - + - + diff --git a/templates/shaper_helix3/html/layouts/joomla/content/info_block/author.php b/templates/shaper_helix3/html/layouts/joomla/content/info_block/author.php index e946b26..82e8e43 100755 --- a/templates/shaper_helix3/html/layouts/joomla/content/info_block/author.php +++ b/templates/shaper_helix3/html/layouts/joomla/content/info_block/author.php @@ -6,15 +6,18 @@ * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later */ +use Joomla\CMS\HTML\HTMLHelper; +use Joomla\CMS\Language\Text; + defined('JPATH_BASE') or die; ?> get('show_author') && !empty($displayData['item']->author )) : ?> - + get('show_parent_category') && !empty($displayData['item']->parent_slug)) : ?> - + get('show_category')) : ?> - + - + get('show_publish_date')) : ?> - + @@ -41,15 +43,15 @@ || $displayData['position'] == 'below' && ($blockPosition == 1 || $blockPosition == 2) ) : ?> get('show_create_date')) : ?> - + get('show_modify_date')) : ?> - + get('show_hits')) : ?> - + diff --git a/templates/shaper_helix3/html/layouts/joomla/content/info_block/category.php b/templates/shaper_helix3/html/layouts/joomla/content/info_block/category.php index 0e6978c..8f2993e 100755 --- a/templates/shaper_helix3/html/layouts/joomla/content/info_block/category.php +++ b/templates/shaper_helix3/html/layouts/joomla/content/info_block/category.php @@ -6,6 +6,9 @@ * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later */ +use Joomla\CMS\Language\Text; +use Joomla\CMS\Router\Route; + defined('JPATH_BASE') or die; if (!isset($displayData['item']->catslug)) @@ -18,8 +21,8 @@ escape($displayData['item']->category_title); ?> get('link_category') && $displayData['item']->catslug) : ?> - catslug)) . '" itemprop="genre" data-toggle="tooltip" title="' . JText::_('COM_CONTENT_CONTENT_TYPE_CATEGORY') . '">' . $title . ''; ?> + catslug)) . '" itemprop="genre" data-toggle="tooltip" title="' . Text::_('COM_CONTENT_CONTENT_TYPE_CATEGORY') . '">' . $title . ''; ?> - ' . $title . ''; ?> + ' . $title . ''; ?> \ No newline at end of file diff --git a/templates/shaper_helix3/html/layouts/joomla/content/info_block/create_date.php b/templates/shaper_helix3/html/layouts/joomla/content/info_block/create_date.php index 8756714..23c6dab 100755 --- a/templates/shaper_helix3/html/layouts/joomla/content/info_block/create_date.php +++ b/templates/shaper_helix3/html/layouts/joomla/content/info_block/create_date.php @@ -6,12 +6,14 @@ * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later */ +use Joomla\CMS\HTML\HTMLHelper; + defined('JPATH_BASE') or die; ?>
    -
    \ No newline at end of file diff --git a/templates/shaper_helix3/html/layouts/joomla/content/info_block/hits.php b/templates/shaper_helix3/html/layouts/joomla/content/info_block/hits.php index 12d88c0..1f5f0ae 100755 --- a/templates/shaper_helix3/html/layouts/joomla/content/info_block/hits.php +++ b/templates/shaper_helix3/html/layouts/joomla/content/info_block/hits.php @@ -6,11 +6,13 @@ * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later */ +use Joomla\CMS\Language\Text; + defined('JPATH_BASE') or die; ?>
    - hits); ?> + hits); ?>
    \ No newline at end of file diff --git a/templates/shaper_helix3/html/layouts/joomla/content/info_block/modify_date.php b/templates/shaper_helix3/html/layouts/joomla/content/info_block/modify_date.php index 71341db..9a163f7 100755 --- a/templates/shaper_helix3/html/layouts/joomla/content/info_block/modify_date.php +++ b/templates/shaper_helix3/html/layouts/joomla/content/info_block/modify_date.php @@ -6,12 +6,15 @@ * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later */ +use Joomla\CMS\HTML\HTMLHelper; +use Joomla\CMS\Language\Text; + defined('JPATH_BASE') or die; ?>
    -
    \ No newline at end of file diff --git a/templates/shaper_helix3/html/layouts/joomla/content/info_block/parent_category.php b/templates/shaper_helix3/html/layouts/joomla/content/info_block/parent_category.php index 0d1f645..5c6f050 100755 --- a/templates/shaper_helix3/html/layouts/joomla/content/info_block/parent_category.php +++ b/templates/shaper_helix3/html/layouts/joomla/content/info_block/parent_category.php @@ -6,6 +6,9 @@ * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later */ +use Joomla\CMS\Language\Text; +use Joomla\CMS\Router\Route; + defined('JPATH_BASE') or die; ?> @@ -13,8 +16,8 @@ escape($displayData['item']->parent_title); ?> get('link_parent_category') && !empty($displayData['item']->parent_slug)) : ?> - parent_slug)) . '" itemprop="genre" data-toggle="tooltip" title="' . JText::sprintf('COM_CONTENT_PARENT', '') . '">' . $title . ''; ?> + parent_slug)) . '" itemprop="genre" data-toggle="tooltip" title="' . Text::sprintf('COM_CONTENT_PARENT', '') . '">' . $title . ''; ?> - ' . $title . ''; ?> + ' . $title . ''; ?> \ No newline at end of file diff --git a/templates/shaper_helix3/html/layouts/joomla/content/info_block/publish_date.php b/templates/shaper_helix3/html/layouts/joomla/content/info_block/publish_date.php index 1702df8..5899b65 100755 --- a/templates/shaper_helix3/html/layouts/joomla/content/info_block/publish_date.php +++ b/templates/shaper_helix3/html/layouts/joomla/content/info_block/publish_date.php @@ -6,11 +6,14 @@ * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later */ +use Joomla\CMS\HTML\HTMLHelper; +use Joomla\CMS\Language\Text; + defined('JPATH_BASE') or die; ?>
    -
    \ No newline at end of file diff --git a/templates/shaper_helix3/html/layouts/joomla/content/intro_image.php b/templates/shaper_helix3/html/layouts/joomla/content/intro_image.php index eaa9dac..777f1e5 100755 --- a/templates/shaper_helix3/html/layouts/joomla/content/intro_image.php +++ b/templates/shaper_helix3/html/layouts/joomla/content/intro_image.php @@ -6,8 +6,14 @@ * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later */ +use Joomla\CMS\Factory; +use Joomla\CMS\Filesystem\File; +use Joomla\CMS\Router\Route; +use Joomla\CMS\Uri\Uri; + defined('_JEXEC') or die; -$tplParams = JFactory::getApplication()->getTemplate(true)->params; + +$tplParams = Factory::getApplication()->getTemplate(true)->params; $params = $displayData->params; $attribs = json_decode($displayData->attribs); $images = json_decode($displayData->images); @@ -25,11 +31,11 @@ { $intro_image = $attribs->spfeatured_image; $basename = basename($intro_image); - $list_image = JPATH_ROOT . '/' . dirname($intro_image) . '/' . JFile::stripExt($basename) . '_'. $imgsize .'.' . JFile::getExt($basename); + $list_image = JPATH_ROOT . '/' . dirname($intro_image) . '/' . File::stripExt($basename) . '_'. $imgsize .'.' . File::getExt($basename); if(file_exists($list_image)) { - $intro_image = JURI::root(true) . '/' . dirname($intro_image) . '/' . JFile::stripExt($basename) . '_'. $imgsize .'.' . JFile::getExt($basename); + $intro_image = Uri::root(true) . '/' . dirname($intro_image) . '/' . File::stripExt($basename) . '_'. $imgsize .'.' . File::getExt($basename); } } @@ -61,7 +67,7 @@ float_intro) ? $params->get('float_intro') : $images->float_intro; ?>
    get('link_titles') && $params->get('access-view')) : ?> - + image_intro_caption) && $images->image_intro_caption): diff --git a/templates/shaper_helix3/html/layouts/joomla/content/options_default.php b/templates/shaper_helix3/html/layouts/joomla/content/options_default.php index a200498..0ed9b49 100755 --- a/templates/shaper_helix3/html/layouts/joomla/content/options_default.php +++ b/templates/shaper_helix3/html/layouts/joomla/content/options_default.php @@ -6,9 +6,11 @@ * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later */ +use Joomla\CMS\HTML\HTMLHelper; + defined('_JEXEC') or die; -JHtml::_('behavior.framework'); +HTMLHelper::_('behavior.framework'); ?>
    @@ -27,8 +29,8 @@ $showon = $displayData->form->getFieldAttribute($field->fieldname, 'showon'); if (!empty($showon)) { - JHtml::_('jquery.framework'); - JHtml::_('script', 'jui/cms.js', false, true); + HTMLHelper::_('jquery.framework'); + HTMLHelper::_('script', 'jui/cms.js', false, true); $id = $displayData->form->getFormControl(); $showon = explode(':', $showon, 2); diff --git a/templates/shaper_helix3/html/layouts/joomla/content/post_formats/icons.php b/templates/shaper_helix3/html/layouts/joomla/content/post_formats/icons.php index ded1e03..37bdc79 100755 --- a/templates/shaper_helix3/html/layouts/joomla/content/post_formats/icons.php +++ b/templates/shaper_helix3/html/layouts/joomla/content/post_formats/icons.php @@ -8,7 +8,9 @@ defined('JPATH_BASE') or die; -$params = JFactory::getApplication()->getTemplate(true)->params; +use Joomla\CMS\Factory; + +$params = Factory::getApplication()->getTemplate(true)->params; $format = $displayData; if ($params->get('show_post_format')) : ?> @@ -29,4 +31,5 @@ - \ No newline at end of file + + diff --git a/templates/shaper_helix3/html/layouts/joomla/content/rating.php b/templates/shaper_helix3/html/layouts/joomla/content/rating.php index 2e5bf30..ce7cef0 100755 --- a/templates/shaper_helix3/html/layouts/joomla/content/rating.php +++ b/templates/shaper_helix3/html/layouts/joomla/content/rating.php @@ -6,12 +6,15 @@ * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later */ +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; + defined('JPATH_BASE') or die; if($displayData['params']->get('show_vote')) { $rating = (int) $displayData['item']->rating; -$layout = JFactory::getApplication()->input->get('view', 'article'); +$layout = Factory::getApplication()->input->get('view', 'article'); $rating_count = $displayData['item']->rating_count; if ($rating_count == '') @@ -27,7 +30,7 @@ } ?>
    - :
    + :
    - ( 1) ? $rating_count . ' ' . JText::_('HELIX3_COUNT_RATINGS') : $rating_count . ' ' . JText::_('HELIX3_COUNT_RATING'); ?> ) + ( 1) ? $rating_count . ' ' . Text::_('HELIX3_COUNT_RATINGS') : $rating_count . ' ' . Text::_('HELIX3_COUNT_RATING'); ?> )
    @@ -13,16 +16,16 @@

    \ No newline at end of file diff --git a/templates/shaper_helix3/html/layouts/joomla/content/social_share/share.php b/templates/shaper_helix3/html/layouts/joomla/content/social_share/share.php index 9842ea0..3c96cc5 100755 --- a/templates/shaper_helix3/html/layouts/joomla/content/social_share/share.php +++ b/templates/shaper_helix3/html/layouts/joomla/content/social_share/share.php @@ -6,21 +6,26 @@ * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later */ +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Router\Route; +use Joomla\CMS\Uri\Uri; + defined('JPATH_BASE') or die; -$url = JRoute::_(ContentHelperRoute::getArticleRoute($displayData->id . ':' . $displayData->alias, $displayData->catid, $displayData->language)); -$root = JURI::base(); -$root = new JURI($root); +$url = Route::_(ContentHelperRoute::getArticleRoute($displayData->id . ':' . $displayData->alias, $displayData->catid, $displayData->language)); +$root = Uri::base(); +$root = new Uri($root); $url = $root->getScheme() . '://' . $root->getHost() . $url; -$params = JFactory::getApplication()->getTemplate(true)->params; +$params = Factory::getApplication()->getTemplate(true)->params; if ($params->get('social_share')) : ?> - 1): ?> -
    - get('usetext')) : ?> -
    - - - - -
    - -
    - -
    + + 1): ?> +
    + get('usetext')) : ?> +
    + + + + +
    + +
    + +
    + +
    -
    @@ -84,17 +84,17 @@
    get('allowUserRegistration')) : ?> - +
    diff --git a/templates/shaper_helix3/offline.php b/templates/shaper_helix3/offline.php index 5d9ac63..56883a0 100755 --- a/templates/shaper_helix3/offline.php +++ b/templates/shaper_helix3/offline.php @@ -10,17 +10,22 @@ defined ('_JEXEC') or die ('resticted aceess'); use Joomla\CMS\Factory; -use Joomla\CMS\HTML\HTMLHelper; use Joomla\CMS\Uri\Uri; -use Joomla\CMS\Language\Text; use Joomla\CMS\Router\Route; +use Joomla\CMS\Language\Text; +use Joomla\CMS\HTML\HTMLHelper; +use Joomla\CMS\Helper\AuthenticationHelper; $doc = Factory::getDocument(); $app = Factory::getApplication(); -require_once JPATH_ADMINISTRATOR . '/components/com_users/helpers/users.php'; +$twofactormethods = []; + +if(version_compare(JVERSION, '4.2.0', '<')) +{ + $twofactormethods = AuthenticationHelper::getTwoFactorMethods(); +} -$twofactormethods = UsersHelper::getTwoFactorMethods(); ?> From 3b09efed4825bf2b0bd90037f8f4d37a0113170e Mon Sep 17 00:00:00 2001 From: Md Siddiqur Rahman Date: Mon, 17 Oct 2022 10:08:44 +0600 Subject: [PATCH 07/29] Update content helper namespace --- .../html/com_content/category/blog_item.php | 5 +++-- .../html/com_content/category/blog_links.php | 3 ++- .../html/com_content/featured/default_item.php | 11 ++++++----- .../html/com_content/featured/default_links.php | 4 +++- 4 files changed, 14 insertions(+), 9 deletions(-) diff --git a/templates/shaper_helix3/html/com_content/category/blog_item.php b/templates/shaper_helix3/html/com_content/category/blog_item.php index 0593b96..83be563 100755 --- a/templates/shaper_helix3/html/com_content/category/blog_item.php +++ b/templates/shaper_helix3/html/com_content/category/blog_item.php @@ -13,6 +13,7 @@ use Joomla\CMS\Layout\LayoutHelper; use Joomla\CMS\Router\Route; use Joomla\CMS\Uri\Uri; +use Joomla\Component\Content\Site\Helper\RouteHelper; defined('_JEXEC') or die; @@ -72,13 +73,13 @@ get('show_readmore') && $this->item->readmore) : if ($params->get('access-view')) : - $link = Route::_(ContentHelperRoute::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language)); + $link = Route::_(RouteHelper::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language)); else : $menu = Factory::getApplication()->getMenu(); $active = $menu->getActive(); $itemId = $active->id; $link1 = Route::_('index.php?option=com_users&view=login&Itemid=' . $itemId); - $returnURL = Route::_(ContentHelperRoute::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language)); + $returnURL = Route::_(RouteHelper::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language)); $link = new Uri($link1); $link->setVar('return', base64_encode($returnURL)); endif; ?> diff --git a/templates/shaper_helix3/html/com_content/category/blog_links.php b/templates/shaper_helix3/html/com_content/category/blog_links.php index 80f9c58..1b2bf16 100755 --- a/templates/shaper_helix3/html/com_content/category/blog_links.php +++ b/templates/shaper_helix3/html/com_content/category/blog_links.php @@ -10,6 +10,7 @@ defined('_JEXEC') or die; use Joomla\CMS\Router\Route; +use Joomla\Component\Content\Site\Helper\RouteHelper; ?> @@ -18,7 +19,7 @@ foreach ($this->link_items as &$item) : ?>
  • - + title; ?>
  • diff --git a/templates/shaper_helix3/html/com_content/featured/default_item.php b/templates/shaper_helix3/html/com_content/featured/default_item.php index f44ed3f..a234a0c 100755 --- a/templates/shaper_helix3/html/com_content/featured/default_item.php +++ b/templates/shaper_helix3/html/com_content/featured/default_item.php @@ -8,10 +8,11 @@ */ use Joomla\CMS\Factory; -use Joomla\CMS\Layout\LayoutHelper; -use Joomla\CMS\Router\Router; use Joomla\CMS\Uri\Uri; +use Joomla\CMS\Router\Route; use Joomla\Registry\Registry; +use Joomla\CMS\Layout\LayoutHelper; +use Joomla\Component\Content\Site\Helper\RouteHelper; defined('_JEXEC') or die; @@ -74,13 +75,13 @@ get('show_readmore') && $this->item->readmore) : if ($params->get('access-view')) : - $link = Router::_(ContentHelperRoute::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language)); + $link = Route::_(RouteHelper::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language)); else : $menu = Factory::getApplication()->getMenu(); $active = $menu->getActive(); $itemId = $active->id; - $link1 = Router::_('index.php?option=com_users&view=login&Itemid=' . $itemId); - $returnURL = Router::_(ContentHelperRoute::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language)); + $link1 = Route::_('index.php?option=com_users&view=login&Itemid=' . $itemId); + $returnURL = Route::_(RouteHelper::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language)); $link = new Uri($link1); $link->setVar('return', base64_encode($returnURL)); endif; ?> diff --git a/templates/shaper_helix3/html/com_content/featured/default_links.php b/templates/shaper_helix3/html/com_content/featured/default_links.php index 12a637a..0b30761 100755 --- a/templates/shaper_helix3/html/com_content/featured/default_links.php +++ b/templates/shaper_helix3/html/com_content/featured/default_links.php @@ -10,11 +10,13 @@ defined('_JEXEC') or die; use Joomla\CMS\Router\Route; +use Joomla\Component\Content\Site\Helper\RouteHelper; + ?>
      link_items as &$item) : ?>
    1. - + title; ?>
    2. From ed4d3e4f3e48d153b7240220749bd2d712b0a9ed Mon Sep 17 00:00:00 2001 From: Md Siddiqur Rahman Date: Mon, 17 Oct 2022 16:40:25 +0600 Subject: [PATCH 08/29] update archive override file --- .../html/com_content/archive/default.php | 25 +++++++++++-------- .../com_content/archive/default_items.php | 16 +++++++++--- .../mod_articles_categories/default_items.php | 6 ++--- 3 files changed, 29 insertions(+), 18 deletions(-) diff --git a/templates/shaper_helix3/html/com_content/archive/default.php b/templates/shaper_helix3/html/com_content/archive/default.php index ac9900b..2f6823d 100755 --- a/templates/shaper_helix3/html/com_content/archive/default.php +++ b/templates/shaper_helix3/html/com_content/archive/default.php @@ -3,28 +3,31 @@ * @package Joomla.Site * @subpackage com_content * - * @copyright Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2022 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ +defined('_JEXEC') or die; use Joomla\CMS\Router\Route; use Joomla\CMS\Language\Text; use Joomla\CMS\HTML\HTMLHelper; -defined('_JEXEC') or die; - -HTMLHelper::addIncludePath(JPATH_COMPONENT . '/helpers'); -HTMLHelper::_('formbehavior.chosen', 'select'); -// HTMLHelper::_('behavior.caption'); +if (version_compare(JVERSION, '4.0.0', '<')) +{ + HTMLHelper::addIncludePath(JPATH_COMPONENT . '/helpers'); + HTMLHelper::_('formbehavior.chosen', 'select'); + HTMLHelper::_('behavior.caption'); +} ?>
      params->get('show_page_heading', 1)) : ?> - + +
      params->get('show_advanced', 1)) : ?> +
      + +
      + params->get('show_advanced_tips', 1)) : ?>
      diff --git a/templates/shaper_helix3/html/com_finder/search/default_results.php b/templates/shaper_helix3/html/com_finder/search/default_results.php index 1818092..7cd4028 100644 --- a/templates/shaper_helix3/html/com_finder/search/default_results.php +++ b/templates/shaper_helix3/html/com_finder/search/default_results.php @@ -17,7 +17,7 @@ ?> suggested && $this->params->get('show_suggested_query', 1)) || ($this->explained && $this->params->get('show_explained_query', 1))) : ?> -
      +
      suggested && $this->params->get('show_suggested_query', 1)) : ?> @@ -45,11 +45,27 @@ query->highlight) && $this->params->get('highlight_terms', 1)) : ?> - query->highlight); ?> + query->highlight); + } + else + { + $this->document->getWebAssetManager()->useScript('highlight'); + $this->document->addScriptOptions( + 'highlight', + [[ + 'class' => 'js-highlight', + 'highLight' => $this->query->highlight, + ]] + ); + } + ?>
      -
        +
          baseUrl = Uri::getInstance()->toString(array('scheme', 'host', 'port')); ?> results as $result) : ?> result = &$result; ?> From 41085ce5073b78d50c5bfa5b882b601c9ef355d4 Mon Sep 17 00:00:00 2001 From: Md Siddiqur Rahman Date: Mon, 21 Nov 2022 12:26:48 +0600 Subject: [PATCH 23/29] fix logout page issue --- templates/shaper_helix3/html/com_users/login/default_login.php | 2 +- templates/shaper_helix3/html/com_users/login/default_logout.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/shaper_helix3/html/com_users/login/default_login.php b/templates/shaper_helix3/html/com_users/login/default_login.php index 7348bee..aff7359 100644 --- a/templates/shaper_helix3/html/com_users/login/default_login.php +++ b/templates/shaper_helix3/html/com_users/login/default_login.php @@ -79,7 +79,7 @@
      form->getValue('return', '', $this->params->get('login_redirect_url', $this->params->get('login_redirect_menuitem'))); ?> - +
      diff --git a/templates/shaper_helix3/html/com_users/login/default_logout.php b/templates/shaper_helix3/html/com_users/login/default_logout.php index 8d85000..60bcf8a 100644 --- a/templates/shaper_helix3/html/com_users/login/default_logout.php +++ b/templates/shaper_helix3/html/com_users/login/default_logout.php @@ -46,7 +46,7 @@ params->get('logout_redirect_url')) : ?> - + From cff756cb7ec68efbedb9a21085b715967039d68c Mon Sep 17 00:00:00 2001 From: Md Siddiqur Rahman Date: Mon, 21 Nov 2022 20:58:29 +0600 Subject: [PATCH 24/29] update HTMLHelper function --- plugins/system/helix3/fields/layoutlist.php | 5 +- plugins/system/helix3/layout/types/color.php | 2 +- templates/shaper_helix3/comingsoon.php | 2 +- .../css/font-awesome-v4-shims.min.css | 5 +- templates/shaper_helix3/css/frontend-edit.css | 72 + .../css/joomla-fontawesome.min.css | 7800 +---------------- templates/shaper_helix3/css/template.css | 3 - .../shaper_helix3/fonts/fa-brands-400.eot | Bin 134346 -> 134294 bytes .../shaper_helix3/fonts/fa-brands-400.svg | 82 +- .../shaper_helix3/fonts/fa-brands-400.ttf | Bin 134040 -> 133988 bytes .../shaper_helix3/fonts/fa-brands-400.woff | Bin 90060 -> 89988 bytes .../shaper_helix3/fonts/fa-brands-400.woff2 | Bin 76764 -> 76736 bytes .../shaper_helix3/fonts/fa-regular-400.eot | Bin 34034 -> 34034 bytes .../shaper_helix3/fonts/fa-regular-400.svg | 4 +- .../shaper_helix3/fonts/fa-regular-400.ttf | Bin 33736 -> 33736 bytes .../shaper_helix3/fonts/fa-regular-400.woff | Bin 16276 -> 16276 bytes .../shaper_helix3/fonts/fa-regular-400.woff2 | Bin 13276 -> 13224 bytes .../shaper_helix3/fonts/fa-solid-900.eot | Bin 203030 -> 203030 bytes .../shaper_helix3/fonts/fa-solid-900.svg | 4 +- .../shaper_helix3/fonts/fa-solid-900.ttf | Bin 202744 -> 202744 bytes .../shaper_helix3/fonts/fa-solid-900.woff | Bin 101652 -> 101648 bytes .../shaper_helix3/fonts/fa-solid-900.woff2 | Bin 78196 -> 78268 bytes .../html/com_content/form/edit.php | 24 +- templates/shaper_helix3/templateDetails.xml | 2 +- 24 files changed, 198 insertions(+), 7807 deletions(-) diff --git a/plugins/system/helix3/fields/layoutlist.php b/plugins/system/helix3/fields/layoutlist.php index 52ca92a..1c9886e 100644 --- a/plugins/system/helix3/fields/layoutlist.php +++ b/plugins/system/helix3/fields/layoutlist.php @@ -10,6 +10,7 @@ defined ('_JEXEC') or die ('resticted aceess'); use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; use Joomla\CMS\Form\FormField; use Joomla\CMS\Filesystem\Folder; @@ -34,8 +35,8 @@ public function getInput() } $htmls .= '
      '; - $htmls .= ''; + $htmls .= ''; return $htmls; } diff --git a/plugins/system/helix3/layout/types/color.php b/plugins/system/helix3/layout/types/color.php index 136b9a6..d8b0d54 100644 --- a/plugins/system/helix3/layout/types/color.php +++ b/plugins/system/helix3/layout/types/color.php @@ -22,7 +22,7 @@ static function getInput($key, $attr) // Including fallback code for HTML5 non supported browsers. HTMLHelper::_('jquery.framework'); - HTMLHelper::_('script', 'system/html5fallback.js', false, true); + HTMLHelper::_('script', 'system/html5fallback.js', array('version' => 'auto', 'relative' => true, 'conditional' => 'lt IE 9')); $output = '
      '; $output .= ''; diff --git a/templates/shaper_helix3/comingsoon.php b/templates/shaper_helix3/comingsoon.php index 0ca01b8..28ecb6a 100755 --- a/templates/shaper_helix3/comingsoon.php +++ b/templates/shaper_helix3/comingsoon.php @@ -217,7 +217,7 @@