This is a great extra and I have it functioning with one exception. ...Sorry I missed this your post.
I attempted to add the usergroup in like this:
...But it didn't change so I commented the entire section out. Not being a programmer, I figure I have done this erroneously. I gather the name is just a name and it doesn't really identify the id of the group? Or is it that group name has spaces? How does one do this properly?if ($modx->user->isMember('Administrator','Content Editor'))
$modx->user->isMember(array('Administrator','Content Editor'));
//limit access to File Manager, by usergroup or any other criterion you like if ($modx->user->isMember('Administrator','Content Editor')) { } else { die('<div style="position: fixed; margin: auto;width: 400px;height:200px;text-align:center;top:0;bottom:0;left:0;right:0;"><h1>IT SEEMS YOU DO NOT HAVE PERMISSION TO USE THIS COOL MANAGER</h1>BEG SOMEONE TO ADD YOU TO THE ADMINISTRATOR USERGROUP</div>'); }
Thanks, the check user link is what I used for a reference to attempt to get it to work, so I had:You are still forgetting the word array Look at my above response.
//limit access to File Manager, by usergroup or any other criterion you like if ($modx->user->isMember('Administrator','Content Editor')) { } else { die('<div style="position: fixed; margin: auto;width: 400px;height:200px;text-align:center;top:0;bottom:0;left:0;right:0;"><h1>IT SEEMS YOU DO NOT HAVE PERMISSION TO USE THIS COOL MANAGER</h1>BEG SOMEONE TO ADD YOU TO THE ADMINISTRATOR USERGROUP</div>');
}
if ($modx->user->isMember('Administrator') || $modx->user->isMember('Content Editor')) { }
I figured that TinymceWrapper ought not to be intrusive.
Many people (including me) want their code to be left alone until otherwise declared.
The shock of seeing an RTE load automatically and garble up your code can be deadly.
The plugin reads the Rich Text checkbox value of an existing Resource.
A new resource is not a valid resource (at least not yet) until saved, even if the checkbox is clicked automatically.
I can add this as an option.
if (isset($scriptProperties['resource']) && $resource->get('richtext')) {
if ($modx->getOption('richtext_default')) {
This might be a quick fix, it works but I have not tested it to see if it breaks any other features.
In plugin code, find:if (isset($scriptProperties['resource']) && $resource->get('richtext')) {
Replace with:if ($modx->getOption('richtext_default')) {
If user has richtext_default set to yes, in System Settings TinyMCE with load for all resources, existing and new.
Please test.
Will add it as option in future release.