2

Does anyone know how to change Joomla's media manger base bath dynamically?

Or conversely if I specify a folder with the URL, can I set that to be the base path and stop users going further up in the directory?

For example, images is the base and I set the folder as apples in the URL. This displays the images/apples folder, can I stop users going back to images? Because the folder apples will be declared dynamically from within my component?

Thanks!

2
  • Hi Lee. You need each user access only his folder?
    – Max
    Commented Sep 8, 2015 at 13:44
  • Hi, no, not an individual user, it wasn't that easy unfortunately. I ended up writing a complete media manager using the aliases in my component. Thanks. Lee Commented Sep 17, 2015 at 1:38

1 Answer 1

1

The COM_MEDIA_BASE and COM_MEDIA_BASEURL constants are both defined in:

administrator/components/com_media/media.php

On line 42 and 43.

I suppose you could redefined them:

http://php.net/manual/en/function.runkit-constant-redefine.php

However, please be very careful with this if used! Constants are not supposed to be redefined, hence the name. If you do go down this road, it must be redefined back to its original value at the bottom of your function

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.