Comments (7)
Ok, so after a little research on this I found that the behavior has always been this way dating back to the introduction of profile photos nearly 10 years ago. The source combo was purposely hidden and a system setting (photo_profile_source
) was added into the conditional that defines which source the media browser should use (in the context of profile photo insertion):
{
id: 'modx-user-photo'
,fieldLabel: _('user_photo')
,name: 'photo'
,xtype: 'modx-combo-browser'
,hideFiles: true
,source: MODx.config['photo_profile_source'] || MODx.config.default_media_source
,hideSourceCombo: true
,anchor: '100%'
}
@rtripault was the author of the original code and may be able to shed some light on that decision (maybe ... it's been an awfully long time!).
Before proceeding on any changes, the question arises: Is this a bug, a missing feature, or a move made (to limit the source to the two settings-defined options) for good reason that we should stick with?
from revolution.
Ah, I was hoping there was a system setting but couldn't find it. That kind of makes sense, but I don't know why just using the normal media manager setup wouldn't work. I assume access to media sources would be limited by permissions set on each source, as it is in every other context of using the media manager. If anything is preventing that from being the case for profile photos, then I can see why a system setting would be needed. What would be nicest is to make the system setting optional: if something is entered there, then only show that media source; and if it's empty then show the full list in the browser.
from revolution.
That's an old one indeed!
Not sure what was the old me thinking back then... i guess ease of being able to render pictures in the frontend then... but having ability to pick the source definitely makes sense!
With current implementation, you might end up having a media source configured which some user might not have access too.
from revolution.
Alright, sounds like there's no reason not to add the sources dropdown. It'll involve a handful of adjustments and additions, which I could dig into in the next week or two...
from revolution.
After thinking on this a little more and batting it around with @opengeek, I've concluded that the best course of action would be:
- Show a disabled source dropdown in the media browser. This would keep the UI more consistent; I could also add a little hint via a tooltip or simply via a title attribute re the ability to customize the source via the
photo_profile_source
system setting. (That setting has always been available for choosing a photo source other than thedefault_media_source
, but never installed.); and - Add (install) the
photo_profile_source
setting into the predefined system settings. Right now, that special source is taken into account but, because it was never made available otherwise, one would never know it was there to take advantage of.
This should offer plenty of granularity via user group, context, and/or user settings.
BTW, the reason to not enable the sources dropdown: If we did that, we'd need to persist that source via a new column in the user profile; not a big deal, but it's really not the type of data we want to be storing there.
from revolution.
That setting has always been available for choosing a photo source other than the default_media_source, but never installed
Well no wonder I coudn't find it!
from revolution.
BTW, in the submitted PR I elected to not add a disabled source dropdown as, after another survey of how the Media Browser appears in other instances, it was more consistent to hide it than not.
from revolution.
Related Issues (20)
- Formatting of fields added to "modx-resource-main-right" through form customization isn't ideal.
- Show username in menu HOT 2
- [Form Customization] Set information and fields not active if modx-page-settings region disabled HOT 2
- Strange indentation appears when clicking on the "Help" button HOT 2
- [MODX 3] Media browser uploads file to incorrect path when media source is changed HOT 3
- Static resources assigned certain types of templates fail to output a binary static file HOT 1
- Proxy system setting ignored in MODX3
- [3.x] [2.x] welcome_screen_url language need to be i18n-ed
- [3.x] [2.x] Help popup's pages language in manager need to be i18n-ed HOT 1
- MODX 2.8.5 - Workspace not found - Packages are not installing locally HOT 7
- [3.x] File extension drops in media manager when friendly url pattern restricts dot HOT 4
- UNINSTALL_OBJECT not working correctly in transport packages HOT 2
- Changes to a Roleβs definition do not carry through to related ACL entries
- [2.x] Dynamic property modConnectorResponse::$response PHP8 HOT 1
- Login button in manager login form is not displayed HOT 1
- [2.x] site_url returns IP address instead of domain url HOT 3
- The asterisk is missing in the TV header for required fields HOT 3
- Reset button inside Add-on's search field
- Why is sorting needed in resource tree? HOT 1
- Title is not displayed in the document hierarchy HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from revolution.