I'd like to allow a user to use IMCE in conjunction with TinyMCE but I don't want the 'Personal Files' tab appearing on their user profile page. I know I can hide the tab using template.php, however the code is still being run and I think this is a bit inefficient.

Is there a way to only use IMCE with TinyMCE?

Comments

nath’s picture

Subscribing

nokes’s picture

Status: Active » Needs review
StatusFileSize
new992 bytes

Hi...

I know this thread is pretty old, but I have a client that requested this same thing, so I looked into it briefly. I came up with the following (very basic) patch. It just adds another permissions flag ("access imce personal files") which is available in the Access Control area (like "access imce" and "administer imce"). If the permission is not granted, and the user does not have "administer imce", then they don't see the Personal files tab anymore.

I hope it still helps someone.

peace,
Nokes

ao5357’s picture

Can we get this for 6.x?

ao5357’s picture

Ok, so in D6 I got the tab to not show up by commenting out function imce_user_page_access() and

/* $items['user/%user/imce'] = array(
    'title' => 'File browser',
    'page callback' => 'imce_user_page',
    'page arguments' => array(1),
    'access callback' => 'imce_user_page_access',
    'access arguments' => array(1),
    'file' => 'inc/page.inc',
    'type' => MENU_LOCAL_TASK,
    'weight' => 10,
  ); */

which can be found at the very end of imce_menu().
I make no claim to the effectiveness or reliability of this, but it made the thing go away while still letting me use the button through BUEditor. Just to let you know.

weseze’s picture

I would recommend making a small module to do this. If the IMCE module is updated the above won't work anymore since the code will be overwritten.

function mymodule_menu_alter(&$items)
{
  unset($items['user/%user/imce']);
}
askibinski’s picture

You can easily modify tabs in your template.php, but this may also be possible with this new module:
http://drupal.org/project/tabtamer

Haven't checked it out yet though.

xurizaemon’s picture

#5 is a good workaround, but +1 for addition of an additional permission OR per-profile option to make this easily configurable sitewide without having to add custom code on each site.

I like that the implementation in #2 on this thread appears to check roles in a way which allows removing the tab from UID=1's user page also.

Can we bump this ticket to 6.x, or is this issue for 5.x hardcore folks? ;)

crabcakes’s picture

This works, thanks!

ufku’s picture

Version: 5.x-1.x-dev » 6.x-1.x-dev

Thank you all for your interest.
Here is the patch for 6.x-1.x branch which makes File browser tab optional. It's now a profile option as suggested.

This patch also makes the tab link open as a standalone page(not embedded), which is a required step for solving many issues of theme js and css interference.

I regret to inform 5.x users that there won't be any new features for it.

ps: run update.php after applying the patch. otherwise all profiles(except user#1) will have the tab disabled, which is the only side effect of not updating immediately.

ufku’s picture

StatusFileSize
new3.63 KB

the patch.

ufku’s picture

StatusFileSize
new3.14 KB

this one retains Id texts.

jippie1948’s picture

The patch seems to work fine. Thanks!

ufku’s picture

Status: Needs review » Fixed

committed. thanks.

jvieille’s picture

Works perfectly.
Will it be in the next module release?

extrarumeno’s picture

How to upload direcly image with Bueditor in the path IMCE without browse ?

So it is more simple for user.

and this is lacking in these two modules (really perfect)

Thanks!

Status: Fixed » Closed (fixed)

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

DanilaD’s picture

Thank you, this patch helped me.

IT100’s picture

As suggested in #6

I tested TabTamer: this is a excellent update proof solution.
Just hide 'filebrowser' in the user settings section

100IT

Traveler777’s picture

Can confirm that. TabTamer works perfectly so far.

trkest’s picture

The ICME file browser settings can be controlled from here:
/admin/config/media/imce

x7ian’s picture

I dont see any option for controlling the users file browser tab.

x7ian’s picture

Oh, found it!
Its inside each profile configuration,
thank you!