Home
The Toolkit for Online Communities
17243 Community Members, 0 members online, 2037 visitors today
Log In Register
OpenACS Home : Forums : OpenACS Development : system-wide static parameter

Forum OpenACS Development: system-wide static parameter

Icon of envelope Request notifications

Collapse
Posted by Michael Totschnig on
I am adding a feature (displaying numbers of unread messages per forum to user) to the forums package which we want to commmit to CVS Head. It should be possible to activate the feature with a site-wide parameter, i.e. all packages should have the same value for the parameter. This is because otherwise it would be possible to have a reasonable behaviour for the forums-portlet when it aggregates information about different packages, and probably it makes more sense to switch this feature on and off for the whole system.
If I understand it right, the package paramters are stored per instance. Is it possible to set a paramter for all instances of a package somehow?
Collapse
Posted by Nima Mazloumi on
You would need to extend the data model and APM to store a parameter type for each parameter like "local" and "global" and also the requivalent parameter::get method. I think you have to TIP to the OCT before you commit, because you want to extend oacs core.
Collapse
Posted by Michael Totschnig on
Thank you that's what I feared with respect to the package parameters. I thought maybe there might be an alternative approach without extending oacs core.
Collapse
Posted by Nima Mazloumi on
No need to be afraid of. I believe that this feature is important and really needed. Just make a proposal. And make sure that the default behavior is not changed. This way your TIP - if designed properly - will go through more easily.
Collapse
Posted by Dave Bauer on
This TIP has already been approved but not implemented.

I think it would be great if this could get into the next openacs release.

I think the design in this TIP covers your needs and most other uses of parameters.

http://openacs.org/forums/message-view?message_id=271910

Collapse
Posted by Michael Totschnig on
I have implemented the part concerning parameter scope for postgres and submitted the patch for it:
http://openacs.org/bugtracker/openacs/patch?patch%5fnumber=845
Collapse
Posted by Michael Totschnig on
Forgot to say: There is no upgrade script so far, can write one, if this is accepted for commital to CVS head.
Collapse
Posted by Michael Totschnig on
Another point: I submitted a second version of the patch, since in the first one I missed retrieving the value.
Even now, I did not yet find a way how to change the parameter::get function, since it does some fairly complex stuff already. For the moment, I only changed parameter::get_from_package_key.
Collapse
Posted by Nima Mazloumi on
great