Add X13 WebP module for image conversion to next-generation formats

- Implemented the main module class with essential properties and methods.
- Added translation support for various user interface strings.
- Created XML configuration file for module versioning.
- Ensured compatibility with different PHP versions and PrestaShop versions.
This commit is contained in:
2025-10-16 21:30:24 +02:00
parent d220e35c31
commit 3b29a79921
235 changed files with 40220 additions and 189 deletions

View File

@@ -0,0 +1,13 @@
<?php
class ImageManager extends ImageManagerCore {
public static function resize($src_file, $dst_file, $dst_width = null, $dst_height = null, $file_type = 'jpg', $force_type = false, &$error = 0, &$targetWidth = null, &$targetHeight = null, $quality = 5, &$sourceWidth = null, &$sourceHeight = null){
$parent = parent::resize($src_file, $dst_file, $dst_width, $dst_height, $file_type, $force_type, $error, $targetWidth, $targetHeight, $quality, $sourceWidth, $sourceHeight);
Hook::exec('actionOnImageResizeAfter', ['dst_file' => $dst_file, 'file_type' => $file_type]);
return $parent;
}
}

View File

@@ -0,0 +1,17 @@
<?php
class FrontController extends FrontControllerCore
{
public function smartyOutputContent($content)
{
ob_start();
parent::smartyOutputContent($content);
$html = ob_get_contents();
ob_clean();
Hook::exec('actionOutputHTMLBefore', array('html' => &$html));
echo $html;
}
}