marekrei / encode-explorer

http://encode-explorer.siineiolekala.net
236 stars 120 forks source link

How to hide all files which starts with "._" at the beginning? #82

Open INDIGI-CO-UK opened 3 years ago

INDIGI-CO-UK commented 3 years ago

I have problem with MacOS hidden files. They starts with "._". How to hide them?

tonycstech commented 3 years ago

Look into $_CONFIG['hidden_files'] I have $_CONFIG['hidden_files'] = array(".ftpquota", "index.php", "index.php~", ".htaccess", ".htpasswd", ".php", "*.html"); You may need $_CONFIG['hiddenfiles'] = array("."); as simple as that

INDIGI-CO-UK commented 3 years ago

Look into $_CONFIG['hidden_files'] I have $_CONFIG['hidden_files'] = array(".ftpquota", "index.php", "index.php~", ".htaccess", ".htpasswd", ".php", "*.html"); You may need $_CONFIG['hiddenfiles'] = array("."); as simple as that

MacOS generate a hidden file with a dot for ALL files in the folder. So, what should I do if I have 20000+ files with different names?

tonycstech commented 3 years ago

Use ._ Or . To hide all files with . in front of them.

On Nov 25, 2020 2:22 PM, "Pawel Piotrowski" notifications@github.com wrote:

Look into $_CONFIG['hidden_files'] I have $_CONFIG['hidden_files'] = array(".ftpquota", "index.php", "index.php~", ".htaccess", ".htpasswd", ".php", ".html"); You may need $CONFIG['hidden_files'] = array(".*"); as simple as that

MacOS generate a hidden file with a dot for ALL files in the folder. So, what should I do if I have 20000+ files with different names?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/marekrei/encode-explorer/issues/82#issuecomment-733971754, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOUZUBS62XK5UGEQCTCYUI3SRV7TJANCNFSM4SLHXCWQ .

INDIGI-CO-UK commented 3 years ago

Use ._ Or . To hide all files with . in front of them.

Did't work.

But I fixed it by changing function:

else if(!in_array($object, EncodeExplorer::getConfig('hidden_files')) && !preg_match('/^._.*/i', $object)) $this->files[] = new File($object, $this->location);

instead of

else if(!in_array($object, EncodeExplorer::getConfig('hidden_files'))) $this->files[] = new File($object, $this->location);

tonycstech commented 3 years ago

Awesome. I don't speak javascript, I just assumed wildcard character would do the trick.

On Wed, Nov 25, 2020, 2:38 PM Pawel Piotrowski notifications@github.com wrote:

Use ._ Or . To hide all files with . in front of them. … <#m1252172582494216206>

Did't work.

But I fixed it by changing function:

else if(!in_array($object, EncodeExplorer::getConfig('hidden_files')) && !pregmatch('/^..*/i', $object)) $this->files[] = new File($object, $this->location);

instead of

else if(!in_array($object, EncodeExplorer::getConfig('hidden_files'))) $this->files[] = new File($object, $this->location);

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/marekrei/encode-explorer/issues/82#issuecomment-733976434, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOUZUBVGEJIBPMBBCWKPL73SRWBQDANCNFSM4SLHXCWQ .

tonycstech commented 3 years ago

Hey if you are so smart, maybe you can help me figure out how to post clicked file link to external php file ? I want to use different image viewing script so I need to find a way to $_POST it somehow when I click the file

On Wed, Nov 25, 2020, 2:38 PM Pawel Piotrowski notifications@github.com wrote:

Use ._ Or . To hide all files with . in front of them. … <#m1252172582494216206>

Did't work.

But I fixed it by changing function:

else if(!in_array($object, EncodeExplorer::getConfig('hidden_files')) && !pregmatch('/^..*/i', $object)) $this->files[] = new File($object, $this->location);

instead of

else if(!in_array($object, EncodeExplorer::getConfig('hidden_files'))) $this->files[] = new File($object, $this->location);

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/marekrei/encode-explorer/issues/82#issuecomment-733976434, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOUZUBVGEJIBPMBBCWKPL73SRWBQDANCNFSM4SLHXCWQ .