From c7a22428e5524afb27c1b4dddda5e040a8570564 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=81Z=C3=81R=20Imre=20AI=20Agent?= Date: Sun, 19 Jul 2026 13:13:23 +0200 Subject: [PATCH] fix(helix3): restore live customization to baseline, drop cloaking backdoor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit deployed/helix3 held only a minimal 227-line variant, missing the live docroot customization (Google Analytics gtag, warehouse-menu logic, HTTP_HOST domain branches) — so the malware-remediation restore stripped these from the live site. Replace with the byte-exact live version (792 lines) with the seo-cloaking backdoor line (google-UA C2 exfil) removed. Assisted-by: claude-code@claude-opus-4-8 --- .../helix3/templates/shaper_helix3/index.php | 781 +++++++++++++++--- 1 file changed, 673 insertions(+), 108 deletions(-) diff --git a/deployed/helix3/templates/shaper_helix3/index.php b/deployed/helix3/templates/shaper_helix3/index.php index 383108ce..e36cbdbb 100644 --- a/deployed/helix3/templates/shaper_helix3/index.php +++ b/deployed/helix3/templates/shaper_helix3/index.php @@ -1,4 +1,5 @@ _scripts[$this->baseurl . '/media/jui/js/bootstrap.min.js']); // Rem $helix3_path = JPATH_PLUGINS . '/system/helix3/core/helix3.php'; if (file_exists($helix3_path)) { - require_once($helix3_path); - $this->helix3 = helix3::getInstance(); + require_once($helix3_path); + $this->helix3 = helix3::getInstance(); } else { - die('Please install and activate helix plugin'); + die('Please install and activate helix plugin'); } //Coming Soon if ($this->helix3->getParam('comingsoon_mode')) - header("Location: " . $this->baseUrl . "?tmpl=comingsoon"); + header("Location: " . $this->baseUrl . "?tmpl=comingsoon"); //Class Classes $body_classes = ''; if ($this->helix3->getParam('sticky_header')) { - $body_classes .= ' sticky-header'; + $body_classes .= ' sticky-header'; } $body_classes .= ($this->helix3->getParam('boxed_layout', 0)) ? ' layout-boxed' : ' layout-fluid'; @@ -47,182 +48,746 @@ if (isset($menu) && $menu) { //Body Background Image if ($bg_image = $this->helix3->getParam('body_bg_image')) { - $body_style = 'background-image: url(' . JURI::base(true) . '/' . $bg_image . ');'; - $body_style .= 'background-repeat: ' . $this->helix3->getParam('body_bg_repeat') . ';'; - $body_style .= 'background-size: ' . $this->helix3->getParam('body_bg_size') . ';'; - $body_style .= 'background-attachment: ' . $this->helix3->getParam('body_bg_attachment') . ';'; - $body_style .= 'background-position: ' . $this->helix3->getParam('body_bg_position') . ';'; - $body_style = 'body.site {' . $body_style . '}'; + $body_style = 'background-image: url(' . JURI::base(true) . '/' . $bg_image . ');'; + $body_style .= 'background-repeat: ' . $this->helix3->getParam('body_bg_repeat') . ';'; + $body_style .= 'background-size: ' . $this->helix3->getParam('body_bg_size') . ';'; + $body_style .= 'background-attachment: ' . $this->helix3->getParam('body_bg_attachment') . ';'; + $body_style .= 'background-position: ' . $this->helix3->getParam('body_bg_position') . ';'; + $body_style = 'body.site {' . $body_style . '}'; - $doc->addStyledeclaration($body_style); + $doc->addStyledeclaration($body_style); } //Body Font $webfonts = array(); if ($this->params->get('enable_body_font')) { - $webfonts['body'] = $this->params->get('body_font'); + $webfonts['body'] = $this->params->get('body_font'); } //Heading1 Font if ($this->params->get('enable_h1_font')) { - $webfonts['h1'] = $this->params->get('h1_font'); + $webfonts['h1'] = $this->params->get('h1_font'); } //Heading2 Font if ($this->params->get('enable_h2_font')) { - $webfonts['h2'] = $this->params->get('h2_font'); + $webfonts['h2'] = $this->params->get('h2_font'); } //Heading3 Font if ($this->params->get('enable_h3_font')) { - $webfonts['h3'] = $this->params->get('h3_font'); + $webfonts['h3'] = $this->params->get('h3_font'); } //Heading4 Font if ($this->params->get('enable_h4_font')) { - $webfonts['h4'] = $this->params->get('h4_font'); + $webfonts['h4'] = $this->params->get('h4_font'); } //Heading5 Font if ($this->params->get('enable_h5_font')) { - $webfonts['h5'] = $this->params->get('h5_font'); + $webfonts['h5'] = $this->params->get('h5_font'); } //Heading6 Font if ($this->params->get('enable_h6_font')) { - $webfonts['h6'] = $this->params->get('h6_font'); + $webfonts['h6'] = $this->params->get('h6_font'); } //Navigation Font if ($this->params->get('enable_navigation_font')) { - $webfonts['.sp-megamenu-parent'] = $this->params->get('navigation_font'); + $webfonts['.sp-megamenu-parent'] = $this->params->get('navigation_font'); } //Custom Font if ($this->params->get('enable_custom_font') && $this->params->get('custom_font_selectors')) { - $webfonts[$this->params->get('custom_font_selectors')] = $this->params->get('custom_font'); + $webfonts[$this->params->get('custom_font_selectors')] = $this->params->get('custom_font'); } $this->helix3->addGoogleFont($webfonts); //Custom CSS if ($custom_css = $this->helix3->getParam('custom_css')) { - $doc->addStyledeclaration($custom_css); + // TODO: + // $doc->addStyledeclaration($custom_css); } //Custom JS if ($custom_js = $this->helix3->getParam('custom_js')) { - $doc->addScriptdeclaration($custom_js); + // TODO: + // $doc->addScriptdeclaration($custom_js); } +$menuArray = array(124, 693); + //preloader & goto top $doc->addScriptdeclaration("\nvar sp_preloader = '" . $this->params->get('preloader') . "';\n"); $doc->addScriptdeclaration("\nvar sp_gotop = '" . $this->params->get('goto_top') . "';\n"); $doc->addScriptdeclaration("\nvar sp_offanimation = '" . $this->params->get('offcanvas_animation') . "';\n"); + +$warehouseId = array('730', '729', '745', '744'); +$isWarehouseLink = strpos($url, '/warehouse') !== false || in_array($_GET['Itemid'], $warehouseId); ?> - + - - - - helix3->getParam('favicon')) { - $doc->addFavicon(JURI::base(true) . '/' . $favicon); - } else { - $doc->addFavicon($this->helix3->getTemplateUri() . '/images/favicon.ico'); - } - ?> - - - helix3->PresetParam('_megabg')) ? $this->helix3->PresetParam('_megabg') : '#ffffff'; - $megabgtx = ($this->helix3->PresetParam('_megatx')) ? $this->helix3->PresetParam('_megatx') : '#333333'; - $preloader_bg = ($this->helix3->getParam('preloader_bg')) ? $this->helix3->getParam('preloader_bg') : '#f5f5f5'; - $preloader_tx = ($this->helix3->getParam('preloader_tx')) ? $this->helix3->getParam('preloader_tx') : '#f5f5f5'; + + + + + + + + + + helix3->getParam('favicon')) { + $doc->addFavicon(JURI::base(true) . '/' . $favicon); + } else { + $doc->addFavicon($this->helix3->getTemplateUri() . '/images/favicon.ico'); + } + ?> + + + helix3->PresetParam('_megabg')) ? $this->helix3->PresetParam('_megabg') : '#ffffff'; + $megabgtx = ($this->helix3->PresetParam('_megatx')) ? $this->helix3->PresetParam('_megatx') : '#333333'; + + $preloader_bg = ($this->helix3->getParam('preloader_bg')) ? $this->helix3->getParam('preloader_bg') : '#f5f5f5'; + $preloader_tx = ($this->helix3->getParam('preloader_tx')) ? $this->helix3->getParam('preloader_tx') : '#f5f5f5'; + + // load css, less and js + $this->helix3->addCSS('bootstrap.min.css, font-awesome.min.css') // CSS Files + ->addJS('bootstrap.min.js, jquery.sticky.js, main.js') // JS Files + ->lessInit()->setLessVariables(array( + 'preset' => $this->helix3->Preset(), + 'bg_color' => $this->helix3->PresetParam('_bg'), + 'text_color' => $this->helix3->PresetParam('_text'), + 'major_color' => $this->helix3->PresetParam('_major'), + 'megabg_color' => $megabgcolor, + 'megatx_color' => $megabgtx, + 'preloader_bg' => $preloader_bg, + 'preloader_tx' => $preloader_tx, + )) + ->addLess('legacy/bootstrap', 'legacy') + ->addLess('master', 'template'); + + //RTL + if ($this->direction == 'rtl') { + $this->helix3->addCSS('bootstrap-rtl.min.css') + ->addLess('rtl', 'rtl'); + } + + $this->helix3->addLess('presets', 'presets/' . $this->helix3->Preset(), array('class' => 'preset')); + + //Before Head + if ($before_head = $this->helix3->getParam('before_head')) { + // TODO: + // echo $before_head . "\n"; + } + ?> + + + + + + + + + + + + + + - - params->get('goto_top')) { ?> - + +
+
+ helix3->generatelayout(); ?> +
+
+ + + +
+ +
+ helix3->countModules('offcanvas')) { ?> + + +

+ +

+
+
+ + + + + + + + params->get('compress_css')) { + $this->helix3->compressCSS(); + } + + $tempOption = $app->input->get('option'); + // $tempView = $app->input->get('view'); + + if ($this->params->get('compress_js') && $tempOption != 'com_config') { + $this->helix3->compressJS($this->params->get('exclude_js')); + } + + //before body + if ($before_body = $this->helix3->getParam('before_body')) { + // TODO: + // echo $before_body . "\n"; + } + ?> + + + + + + + + params->get('goto_top')) { ?> + + + + + + + + + + + + + + + + load(903); + ?> + + + + + + + + + + + + + + + + + + + - \ No newline at end of file