View Single Post
  #1  
Old 07-23-2017, 10:38 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default SimpleCMS module - site logo

Just a warning for everyone relying on SimpleCMS module to change their site logo.

The module is coded so to change the image name you are uploading as logo and Apple icon.

It will prepend "logo_" and "appleIcon_" to the uploaded image name.

So if you are uploading site logo as "my-site-logo.png" the image will be uploaded, saved and shown as "logo_my-site-logo.png"

Now I am sorry but why in the world you would do this? XC?
Images names matter. Do not change them like this.

The offensive file is - classes/XLite/Module/CDev/SimpleCMS/View/Model/Settings.php

PHP Code:
/**
     * Additional preparations for images.
     * Upload them into specific directory
     *
     * @param string $optionValue Option value
     * @param string $imageType   Image type
     *
     * @return string
     */
    
protected function prepareImageData($optionValue$imageType)
    {
        .............
            
$realName $imageType '_' $realName;

................... 
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote