[GH-ISSUE #528] Filter certain folder names #389

Closed
opened 2026-03-02 15:58:22 +03:00 by kerem · 9 comments
Owner

Originally created by @huntson on GitHub (Apr 16, 2021).
Original GitHub issue: https://github.com/prasathmani/tinyfilemanager/issues/528

Is there a way to hide folders matching certain strings? For example, I am trying to run this on a Synology unit and they are littered with the '@eaDir' folders. It would be nice to be able to prevent the users from seeing those.

Originally created by @huntson on GitHub (Apr 16, 2021). Original GitHub issue: https://github.com/prasathmani/tinyfilemanager/issues/528 Is there a way to hide folders matching certain strings? For example, I am trying to run this on a Synology unit and they are littered with the '@eaDir' folders. It would be nice to be able to prevent the users from seeing those.
kerem 2026-03-02 15:58:22 +03:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@prasathmani commented on GitHub (Apr 16, 2021):

check this out https://github.com/prasathmani/tinyfilemanager/wiki/Exclude-Files-&-Folders

<!-- gh-comment-id:821718912 --> @prasathmani commented on GitHub (Apr 16, 2021): check this out https://github.com/prasathmani/tinyfilemanager/wiki/Exclude-Files-&-Folders
Author
Owner

@huntson commented on GitHub (Apr 17, 2021):

Not working.

Screen Shot 2021-04-16 at 8 20 29 PM
Screen Shot 2021-04-16 at 8 20 16 PM

<!-- gh-comment-id:821733592 --> @huntson commented on GitHub (Apr 17, 2021): Not working. ![Screen Shot 2021-04-16 at 8 20 29 PM](https://user-images.githubusercontent.com/38994011/115095951-36491c00-9ef1-11eb-92c7-dd364a82b39a.png) ![Screen Shot 2021-04-16 at 8 20 16 PM](https://user-images.githubusercontent.com/38994011/115095952-36491c00-9ef1-11eb-8119-f400995a0b9c.png)
Author
Owner

@prasathmani commented on GitHub (Apr 17, 2021):

make your your setting configuration in config.php

The default configuration will be loaded from config.php, it is an additional configuration file, Feel free to remove completely this file and configure "tinyfilemanager.php" as a single file application.

<!-- gh-comment-id:821774510 --> @prasathmani commented on GitHub (Apr 17, 2021): make your your setting configuration in `config.php` -- The default configuration will be loaded from config.php, it is an additional configuration file, Feel free to remove completely this file and configure "tinyfilemanager.php" as a single file application.
Author
Owner

@huntson commented on GitHub (Apr 17, 2021):

I'm not sure how what you wrote helps me. I showed you a screenshot of my config file which is set to, according to my understanding, filter out '@eaDir' yet when I load your application up in a web browser, as per the other screenshot, it shows the '@eaDir' folder.

<!-- gh-comment-id:821872611 --> @huntson commented on GitHub (Apr 17, 2021): I'm not sure how what you wrote helps me. I showed you a screenshot of my config file which is set to, according to my understanding, filter out '@eaDir' yet when I load your application up in a web browser, as per the other screenshot, it shows the '@eaDir' folder.
Author
Owner

@prasathmani commented on GitHub (Apr 18, 2021):

in which file your setting $exclude_items ?
basically the tinyfilemanager load configuration form config.php if config.php file not available, then it use tinyfilemanager.php, so if you have config.php, make sure your setting all configurations in config.php file.

I tried in my local environment with same folder name it is working fine

<!-- gh-comment-id:822008122 --> @prasathmani commented on GitHub (Apr 18, 2021): in which file your setting `$exclude_items` ? basically the tinyfilemanager load configuration form `config.php` if `config.php` file not available, then it use `tinyfilemanager.php`, so if you have `config.php`, make sure your setting all configurations in `config.php` file. I tried in my local environment with same folder name it is working fine
Author
Owner

@huntson commented on GitHub (Apr 18, 2021):

I am setting $exclude_items in config.php. In the same file I was able to set $use_auth = false and tinyfilemanager.php is behaving properly and honoring that argument. Is it possible that my syntax for $exclude_items is wrong?

<!-- gh-comment-id:822009883 --> @huntson commented on GitHub (Apr 18, 2021): I am setting `$exclude_items` in `config.php.` In the same file I was able to set `$use_auth = false` and tinyfilemanager.php is behaving properly and honoring that argument. Is it possible that my syntax for `$exclude_items` is wrong?
Author
Owner

@prasathmani commented on GitHub (Apr 20, 2021):

I am setting $exclude_items in config.php. In the same file I was able to set $use_auth = false and tinyfilemanager.php is behaving properly and honoring that argument. Is it possible that my syntax for $exclude_items is wrong?

No syntax error

<!-- gh-comment-id:823244814 --> @prasathmani commented on GitHub (Apr 20, 2021): > I am setting `$exclude_items` in `config.php.` In the same file I was able to set `$use_auth = false` and tinyfilemanager.php is behaving properly and honoring that argument. Is it possible that my syntax for `$exclude_items` is wrong? No syntax error
Author
Owner

@prasathmani commented on GitHub (Apr 28, 2021):

replace following code in fm_is_exclude_items function

function fm_is_exclude_items($file) {
    global $exclude_items;
    $ext = strtolower(pathinfo($file, PATHINFO_EXTENSION));
    if(!in_array($file, $exclude_items) && !in_array("*.$ext", $exclude_items)) {
        return true;
    }
    return false;
}
<!-- gh-comment-id:828353148 --> @prasathmani commented on GitHub (Apr 28, 2021): replace following code in `fm_is_exclude_items` function ```php function fm_is_exclude_items($file) { global $exclude_items; $ext = strtolower(pathinfo($file, PATHINFO_EXTENSION)); if(!in_array($file, $exclude_items) && !in_array("*.$ext", $exclude_items)) { return true; } return false; } ```
Author
Owner

@prasathmani commented on GitHub (May 17, 2021):

fix is available in latest code

<!-- gh-comment-id:842057086 --> @prasathmani commented on GitHub (May 17, 2021): fix is available in latest code
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/tinyfilemanager#389
No description provided.