Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author thomstark

    (@thomstark)

    put prettify="off" in your shortcode.

    It’s in the manual, for future reference.

    Thread Starter soegaard2000

    (@soegaard2000)

    Thank you for quick support ??

    Hello Mr. Dev,

    Is it possible somehow to display dots in directory names? I have previous releases folders like 10.2.1 and the dots get stripped, though it’s important and conventional to keep them.

    Thanks!

    Plugin Author thomstark

    (@thomstark)

    If you can manage a small change to the source code for the time being:

    Open up wp-content/plugins/file-away/lib/inc/inc.directories.php

    Scroll to line 111 and replace this:

    $prettyfolder = str_replace(array('~', '--', '_', '.', '*'), ' ', "$folder");
    $prettyfolder = preg_replace('/(?<=\D)-(?=\D)/', ' ', "$prettyfolder");
    $prettyfolder = preg_replace('/(?<=\D)-(?=\d)/', ' ', "$prettyfolder");
    $prettyfolder = preg_replace('/(?<=\d)-(?=\D)/', ' ', "$prettyfolder");
    $prettyfolder = fileaway_utility::strtotitle($prettyfolder);

    with this:

    if($prettify)
    {
    	$prettyfolder = str_replace(array('~', '--', '_', '.', '*'), ' ', "$folder");
    	$prettyfolder = preg_replace('/(?<=\D)-(?=\D)/', ' ', "$prettyfolder");
    	$prettyfolder = preg_replace('/(?<=\D)-(?=\d)/', ' ', "$prettyfolder");
    	$prettyfolder = preg_replace('/(?<=\d)-(?=\D)/', ' ', "$prettyfolder");
    	$prettyfolder = fileaway_utility::strtotitle($prettyfolder);
    }
    else $prettyfolder = $folder;

    Then add prettify=off to your shortcode.

    If you want to prettify the filenames but not the folders, then for the time being just replace this:

    $prettyfolder = str_replace(array('~', '--', '_', '.', '*'), ' ', "$folder");
    $prettyfolder = preg_replace('/(?<=\D)-(?=\D)/', ' ', "$prettyfolder");
    $prettyfolder = preg_replace('/(?<=\D)-(?=\d)/', ' ', "$prettyfolder");
    $prettyfolder = preg_replace('/(?<=\d)-(?=\D)/', ' ', "$prettyfolder");
    $prettyfolder = fileaway_utility::strtotitle($prettyfolder);

    with this:

    $prettyfolder = $folder;

    Many thanks for such a quick help!

    Since I want to use the prettify feature (pretty sleek) but keep the dots in folder, I just decided to remove ‘.’ from the array (line 111). Will it have any nasty side effects that I am missing? So far, it looks good and nothing is broken.

    And another thing, dot-stripped folder still shows in crumbs. Could you please point me to the script that handles crumbs so that i modify it accordingly?

    Plugin Author thomstark

    (@thomstark)

    That works too. So that first line should look like this then:

    $prettyfolder = str_replace(array('~', '--', '_', '*'), ' ', "$folder");

    For the crumbs, you can do the same thing in inc.directories-nav.php on line 14.

    Plugin Author thomstark

    (@thomstark)

    i.e.,

    $prettycrumb = str_replace(array('~', '--', '_', '*'), ' ', $crumb);

    Already done:) Thank a lot – awesome plugin, awesome author!

    Plugin Author thomstark

    (@thomstark)

    Good deal. Thanks!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Dot character in dynamic listing’ is closed to new replies.