Hello Ivan,
I am going the easy way while setting up the modules for customers.
I open the backend.css and write a new css rule into it like:
.adminonly { display:none; }Then I open the
modify.php of this module and look for the areas I don't want them to see, pick them up and add
class="adminonly" to this areas (buttons, divs, whatever).
That's it.
While working in this backend, I can always disable this css rule like:
/* .adminonly { display:none; } */This goes very fast, also if I need to upgrade a module, I can make this changes in means of minutes.
A better way would be to add this lines into your
modify.php :
<?php
if ($_SESSION['GROUP_ID'] == 0) {
$classvisible = "";
}
else {
$classvisible = 'class="adminonly'";
}?>
then look up for the areas you do not want to show and add
<?php echo $classvisible ;?> to them.
This way you dont need to open the backend.css file anytime you want to work whith this module yourself.
For example, instead of one checkbox in module access at the bottom of advanced group settings page to have 2 checkboxes, like:
Module access:
WYSIWYG: ⊗ View/edit o Manage Settings <--- Only edit content
News: ⊗ View/edit ⊗ Manage Settings <---- Both view/edit and edit settings
Code: o View/edit o Manage sections <---- No access
And so on..
This would be nice for future versions, but it would mean that only modules enabled with this technique would provide this option via the group access settings. But in fact a nice if this feature would be documented here:
Maybe add the code linked to the
module section on the WB help project or tutorial so module authors become aware of this kind of option.
... so module developers could follow the "how to" (a working solution) to enable this feature in their modules (or a team would do).
Kind regards,
Stefek