[geeklog-devel] [geeklog-cvs] Geeklog-1.x/system/classes config.class.php, 1.16, 1.17

Blaine Lang devel at portalparts.com
Sun Jan 20 17:05:58 EST 2008


Dirk,

I was wondering why we need a new config type and not just check for the 
existance of a configmanager_fieldname function?

I was thinking we need to check for a function to feed the values to a 
config parm as well as validate upon save. The validate function could 
do any post processing like convert days to seconds (if a field wanted 
to present a update frequency in days and field needed to be saved as 
seconds).

configmanager_fieldname_preprocess() and 
configmanager_fieldname_postprocess()

Most likely the preprocess function would only be used for checkboxes, 
select and radio fields but postprocess may be used or any config parm.

Blaine

Dirk Haun wrote:
> Dirk Haun wrote:
>
>   
>> Log Message:
>> Introduced a new config type 'fn:' that calls a specified function to
>> provide contents of a dropdown at runtime, e.g. for the language and
>> theme selection
>>     
>
> Can I have some opinions on this, please? Aaron, Blaine, anyone?
>
> In a nutshell, this introduces a new config type 'fn:' which, when
> written as "fn:something" calls a function configmanager_something,
> expecting it to return the selection array. In other words, it's a
> dynamic version of the 'select' type.
>
> I've already implemented it for the two obvious candidates: The site's
> default language and theme. As others have pointed out, we already have
> functions that provide dropdowns for those, so why not use them in the
> configuration (well, they both needed small wrapper functions ...).
>
> Is the function name okay or should it start with "CONF_" instead? Any
> room for improvements?
>
> bye, Dirk
>
>
>   



More information about the geeklog-devel mailing list