I'm not sure if this is really a support request or a feature request.

I'd like to have a general place where users go to access the "file manager".

I know they can go to /imce but that shows no theme so they're likely to get lost if they go there.

They can go to /user/uid/imce. That's okay although that shows the public theme so there can be a problem with the width of the content area. We're not using user specific folders so that kind of feels like the wrong place.

They can access IMCE within a wysiwyg editor which works well but they often want to just "manage files" without editing a page.

For me the ideal thing would be for IMCE to show in the the admin theme. Is that possible?

The elFinder module adds a "Files" menu tab to /admin/content. That's exactly what I wish IMCE would do although I prefer IMCE for several reasons.

I guess I can add a tab to /admin/content and use some Javascript to make IMCE popup in a window.

Looking back, I see that I asked something similar over a year ago when I was using Drupal 6.

Thanks

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Juhani’s picture

I decided to create a general place like this for my users. It's not a good idea to link the path /imce directly anywhere as there's no theme included. So, I added a new content type "system" that I will dedicate to small system-level customizations like this. Then I created a new file browser node that contains iframe for /imce, similar that exist on each user account page. I provide them administration menu, so I linked this node as a subitem of the content tab.

With this code IMCE can be added anywhere:
<iframe frameborder="0" class="imce-frame" style="border: 1px solid #eee; width: 99%; height: 520px" src="/imce"></iframe>

ladybug_3777’s picture

I agree that this would be an important thing to add. The /user/uid/imce page really doesn't lend itself to ease of use in my site's Theme. I've had to go out of my way to suppress blocks so I could get a larger width out of my theme for that page, but now I'm having issues with the height being kind of small. It seems odd that "admin" area doesn't exist.

mesr01’s picture

It does indeed make a lot of sense. This patch may do the trick. Now the menu link can be customized by going at admin/config/media/imce, under "Common settings".

mesr01’s picture

Version: 7.x-1.5 » 7.x-1.7
Category: support » feature
Status: Active » Needs review
mesr01’s picture

Here's an improved version of the patch. The new custom link is now independant of the default menu tab in the user pages (i.e. both links can be toggled independently).

notbear’s picture

Issue summary: View changes

Hello, the path works well in most cases. But I was getting warnings on pl/admin/content view. It was about $account imce_user_page_access callback which was getting string in $account variable instead of object, so it was impossible to get any property from that.

So in this part:

function imce_user_page_access($account = FALSE, $user = FALSE) {
...
  if ($account === FALSE) {
   $account = $user;
}...

my suggestion is:

if ($account === FALSE || gettype($account) !== "object") {
  $account = $user;
}
thalles’s picture

Status: Needs review » Needs work

needs reroll

thalles’s picture

Status: Needs work » Needs review
FileSize
1.17 KB

Follow a patch!

paulocs’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
53.3 KB

It looks good. Now we have the possibility to open IMCE just to browser.

paulocs’s picture

Status: Reviewed & tested by the community » Needs work

I'll create a configuration option to enable the link.

paulocs’s picture

Status: Needs work » Needs review
FileSize
2.43 KB

Hello @thalles,
I just create a configuration option so the user can choose if he will create the menu link or not.
Thanks!

paulocs’s picture

FileSize
2.39 KB

Please review patch #12

  • thalles committed dad5734 on 7.x-1.x authored by paulocs
    Issue #1437704 by paulocs, mesr01, thalles: A general place for IMCE in...
thalles’s picture

Status: Needs review » Fixed

Looks good to me, thanks all!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.