-
☆ A M B ☆
- 45 Posts
Hi Bob,
thanks for your good ideas - didn't work, but lead me to a solution.
To hide the Help-Button from every user:
Open for edit:
[mysite]/manager/templates/default/css/index.css
At the end of the file, add:
#modx-abtn-help { display:none !important; }
Save. Refresh Manager. Done.
Very rewarding, indeed
If that works, this version of my code should work to hide it from everyone.
$css = '<style>#modx-abtn-help {
display:none !important;
}</style>';
$modx->regClientCSS($css);
return '';
The advantage being that it won't be overwritten every time you upgrade MODX.
-
☆ A M B ☆
- 45 Posts
Hi Bob,
where should I put your code? Not in a website template, right? In a manager template? And if so, how prevent from beeing overwritten on update? In a plugin? I never tried one before.
Please help me through the jungle ;-)
Brigitte
It would have to go in a plugin attached to a Manager Page System Event. I've tested it with OnManagerPageBeforeRender and it works.
Be aware that any Syntax Error in the plugin will probably break the entire Manager, and you'd have to edit the plugin code in the DB with PhpMyAdmin to get it back.
The code above is correct, so if you paste it, you should be fine.
The plugin will execute on every Manager page, even those without the Help button, which is kind of wasteful, but it should be harmless. This is fixable with a modification to the plugin, but it's a little tricky, and I'm not sure it's worth the effort.
-
☆ A M B ☆
- 45 Posts
My new Plugin "hidehelp" on event OnManagerPageBeforeRender:
if(! $modx->user->isMember('Administrator')) {
$css = '<style>#modx-abtn-help {
display:none !important;
}</style>';
$modx->regClientCSS($css);
}
return '';
Thanks a lot, Bob, it is great fun to learn from you :-D
I'm glad I could help.