Skip to content

Instantly share code, notes, and snippets.

@jamalkhan2k6
Last active February 19, 2016 11:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jamalkhan2k6/ef10156cd20b75fc7673 to your computer and use it in GitHub Desktop.
Save jamalkhan2k6/ef10156cd20b75fc7673 to your computer and use it in GitHub Desktop.
Change the Filemanager Default Folder Path
//Line 312 and 313:
$newdir = str_replace("\\", "/", $upload_dir['basedir'].'/'.$user->user_login.'/');
$newurl = str_replace("\\", "/", $upload_dir['baseurl'].'/'.$user->user_login.'/');
//TO:
$newdir = str_replace("\\", "/", $upload_dir['basedir'].'/users/'.$user->user_login.'/');
$newurl = str_replace("\\", "/", $upload_dir['baseurl'].'/users/'.$user->user_login.'/');
//AND
//Line 198 and 199:
$newdir = str_replace("\\", "/", $upload_dir['basedir'].'/'.$user->user_login.'/');
$newurl = str_replace("\\", "/", $upload_dir['baseurl'].'/'.$user->user_login.'/');
//TO:
$newdir = str_replace("\\", "/", $upload_dir['basedir'].'/users/'.$user->user_login.'/');
$newurl = str_replace("\\", "/", $upload_dir['baseurl'].'/users/'.$user->user_login.'/');
@JMDP1
Copy link

JMDP1 commented Feb 19, 2016

Hi,
i'm discovering your plugin "File Manager Plugin For Wordpress" on CodeCanyon which could "Make my day".

I'm to set-up an intranet for pre-sales department.
They'd like to upload their file via the front-end to archive quotations, FAQs, Technical request etc. so they build a knowledge database.
And when they have a new quotation to make, having often the same question, they browse through keywords through previous business cases.

I'm using Search WP Engine, which is the only one I found to index and search with pdf (lots of our request are sent in pdf format).
But it is only indexing and searching files in the classical:

  • *wp upload storage uploads/year/month *
    but *_NOT *_in other folders such as
  • "/wp-content/uploads/filebase or /wp-content/uploads/download-manager-files

*Does you plugin can handle that so that files are uploaded in uploads/year/month? *(dynamically? I mean like any other files and uploaded media?). Or any other maneer?
Search WP says it can't index files stored elsewhere that in its own folder which is the WP uploads/year/month.
And other files managers only work with their own directories.

So, my day is a very bad day :-/

Should it be the case, you'd be the big big Boss !!!

PS: By the way, it could be good for the of you to bring such a "complementary" bundled solution. Just a thought.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment