• Hi

    Very nice and simple plugin – thank you for that! But i’ve found an issue:

    My code:
    [MMFileList removeextension=true removesize=true folder=”test” format=”table types=”pdf”]

    Name of the file:
    “ABC_test.pdf”

    what i get:
    “A B C test”

    What i expected:
    “ABC test”

    The parameter i’ve use is “removeextension”, but it doesn’t only remove the file extension. For me, it looks like a bug. Or what is the reason for that?

    Thanks for an answer
    Michael

Viewing 2 replies - 1 through 2 (of 2 total)
  • I have the same issue and seems that it affects the uppercase letters only.

    I’m having the same issue. Fantastic little plug-in otherwise. :]

    ETA: It looks to be intentional. The hands-on solution would be to comment out $output = preg_replace('/(?<!\ )[A-Z]/', ' $0', $output); on line 403 in mm_filelist_plugin.php like below:

        function _regex_remove($str="", $regex, $replacememnt=" ")
        {
            $output = preg_replace($regex, $replacememnt, $str);
    
            //Add space before cap borrowed from: https://stackoverflow.com/a/1089681/4621469
            // $output = preg_replace('/(?<!\ )[A-Z]/', ' $0', $output);
    
            // Trim whitespace
            return trim($output);        
        }
    • This reply was modified 4 years, 4 months ago by kaffemyers.
    • This reply was modified 4 years, 4 months ago by kaffemyers.
    • This reply was modified 4 years, 4 months ago by kaffemyers.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘removeextension change file name’ is closed to new replies.