WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.6 is now available!


Will it continue with WB? It goes on! | Geht es mit WB weiter? Es geht weiter!
https://forum.websitebaker.org/index.php/topic,32340.msg226702.html#msg226702


The forum email address board@websitebaker.org is working again
https://forum.websitebaker.org/index.php/topic,32358.0.html


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • General Community »
  • Global WebsiteBaker 2.8.x discussion »
  • ?? Setting to allow/deny editing of module settings
  • Print
Pages: [1]   Go Down

Author Topic: ?? Setting to allow/deny editing of module settings  (Read 8246 times)

Offline crnogorac081

  • Posts: 2161
  • Gender: Male
?? Setting to allow/deny editing of module settings
« on: December 04, 2009, 10:11:40 PM »
Hi,

I was wondering is it planed in some further version that in Advanced Group Settings can be checked option that the group can access module settings in Pages.

It would be a new variable like $allow_edit_settings  (for example if checked { show button for accessing settings} )  so it will be used as new standard for module coders..

For example I want to ban certain groups to access Settings options in news module, members module etc.. I want to let them just to edit posts and not to change settings..

(or maybe something like this already exist and I missed it, or there is some work around)
What do you think ?

cheers
I
 
« Last Edit: December 04, 2009, 10:17:24 PM by crnogorac081 »
Logged
Web developer

Offline Stefek

  • Posts: 6177
  • Gender: Male
  • ("ړ)
Re: ?? Setting to allow/deny editing of module settings
« Reply #1 on: December 05, 2009, 02:56:26 AM »
Hello Crnogorac,

Here is a complete solution for you:
https://forum.WebsiteBaker.org/index.php/topic,15540.msg100480.html#msg100480

 :-)
Stefek
Logged
"Gemeinsam schafft man mehr."

gemeinsam
1. mehreren Personen oder Dingen in gleicher Weise gehörend, eigen
2. in Gemeinschaft [unternommen, zu bewältigen]; zusammen, miteinander
#Duden

erpe0812

  • Guest
Re: ?? Setting to allow/deny editing of module settings
« Reply #2 on: December 05, 2009, 09:45:54 AM »
Has someone opened a feature ticket for this?

Seems to be an interesting solution.
Or soemthing similar to droplets, that only admin can edit the settings?

rgds

erpe
Logged

doc

  • Guest
Re: ?? Setting to allow/deny editing of module settings
« Reply #3 on: December 05, 2009, 09:52:24 AM »
Hi,

if I remember right, some modules available in the forum use WB authentification to allow certain settings etc. only for the admin group. So nothing new about it. 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.

Regards doc
« Last Edit: December 05, 2009, 09:54:50 AM by doc »
Logged

Offline crnogorac081

  • Posts: 2161
  • Gender: Male
Re: ?? Setting to allow/deny editing of module settings
« Reply #4 on: December 05, 2009, 01:52:29 PM »
@ Stefek

Great, it is a nice workaround. But, now I would need to edit all modules I am using to enable this feature :)

@ Doc

Yes, and this code which Stefek pointed me works only for group 1. I was thinking more that this become a standard in Group advanced settings.

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..

@ Erpe

I will write a ticket, if community thinks it would be useful for further development of WB.

Cheers
« Last Edit: December 05, 2009, 01:55:03 PM by crnogorac081 »
Logged
Web developer

Offline Stefek

  • Posts: 6177
  • Gender: Male
  • ("ړ)
Re: ?? Setting to allow/deny editing of module settings
« Reply #5 on: December 05, 2009, 04:07:18 PM »
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 :
Code: [Select]
<?php 
if ($_SESSION[&#39;GROUP_ID&#39;] == 0) {
$classvisible = "";
} 
else {
$classvisible = &#39;class="adminonly&#39;";
}?>

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.

Quote from: crnogorac081 on December 05, 2009, 01:52:29 PM
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:
Quote from: doc on December 05, 2009, 09:52:24 AM
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


Logged
"Gemeinsam schafft man mehr."

gemeinsam
1. mehreren Personen oder Dingen in gleicher Weise gehörend, eigen
2. in Gemeinschaft [unternommen, zu bewältigen]; zusammen, miteinander
#Duden

Offline crnogorac081

  • Posts: 2161
  • Gender: Male
Re: ?? Setting to allow/deny editing of module settings
« Reply #6 on: December 05, 2009, 07:15:31 PM »
Yes, it would be nice to make it standard, and also to make guide lines for further module development.

cheers
Logged
Web developer

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • General Community »
  • Global WebsiteBaker 2.8.x discussion »
  • ?? Setting to allow/deny editing of module settings
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2