Done !
| Server IP : 46.105.57.169 / Your IP : 216.73.216.67 Web Server : Apache System : Linux webm002.cluster120.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64 User : verseaumee ( 152031) PHP Version : 8.5.7 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/verseaumee/zenit/components/com_sppagebuilder/parser/ |
Upload File : |
<?php
/**
* @package SP Page Builder
* @author JoomShaper http://www.joomshaper.com
* @copyright Copyright (c) 2010 - 2021 JoomShaper
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later
*/
//no direct accees
defined ('_JEXEC') or die ('Restricted access');
jimport('joomla.filesystem.file');
abstract class SppagebuilderAddons {
public function __construct( $addon )
{
if ( !$addon ) {
return false;
}
$this->addon = $addon;
}
/**
* Check placeholder file path for each media image
*/
protected function get_image_placeholder($src) {
$config = JComponentHelper::getParams('com_sppagebuilder');
$lazyload = $config->get('lazyloadimg', '0');
if ($lazyload) {
$filename = basename($src);
$mediaPath = 'media/com_sppagebuilder/placeholder';
$basePath = JPATH_ROOT . '/'. $mediaPath . '/' .$filename;
if(JFile::exists($basePath)) {
return $mediaPath . '/' . $filename;
} else {
return $config->get('lazyplaceholder', '');
}
}
return false;
}
/**
* Get any valid image dimension
* @return Array
*/
protected function get_image_dimension($src) {
preg_match('/\__(.*?)\./', $src, $match);
if(count($match)>1) {
$dimension = explode('x',$match[1]);
return ['width="'.$dimension[0].'"', 'height="'.$dimension[1].'"'];
}
return [];
}
}