CMS MADE SIMPLE FORGE

CGSmartImage

 

[#11891] Incl.fix: {cgsi_convert} does not support class parameter

avatar
Created By: Matthijs de Bruin (mldebee)
Date Submitted: Wed Sep 12 06:32:39 -0400 2018

Assigned To:
Version: 1.22.2
CMSMS Version: 2.2.6
Severity: Minor
Resolution: Fixed
State: Open
Summary:
Incl.fix: {cgsi_convert} does not support class parameter
Detailed Description:
cgsi_convert does not replace the class (and alt, as reported by adrien jaures
in 11377) parameters. Can be fixed by adding:

(This is meant as a suggestion)

case 'alt':
    $value = trim($value);
    if($value) $sxe[$key] = trim($value);
    break;
 case 'class':
    $value = trim($value);
    if ($value && substr($value,0,1) == "+") {
        $sxe[$key] = trim($sxe[$key] . " " . substr($value,1));
    } elseif ($value) {
        $sxe[$key] = $value;
    }
    break;

@ line # 976 of lib/class.cgsi_utils.php of version 1.22.2

{cgsi_convert class="+new-class"} would then append the class name(s), while
omitting the + sign will replace the img class attribute.


History

Comments
avatar
Date: 2018-09-22 12:17
Posted By: Robert Campbell (calguy1000)

fixed in svn
      
Updates

Updated: 2018-09-22 12:17
resolution_id: 5 => 7

Updated: 2018-09-12 06:35
description: cgsi_convert does not replace the class (and alt, as reported by adrien jaures in 11377) parameters. Can be fixed by adding: (This is meant as a suggestion) case 'alt': $value = trim($value); if($value) $sxe[$key] = trim($value); brea => cgsi_convert does not replace the class (and alt, as reported by adrien jaures in 11377) parameters. Can be fixed by adding: (This is meant as a suggestion) case 'alt': $value = trim($value); if($value) $sxe[$key] = trim($value); brea
resolution_id: => 5