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

Mark R. Evans mevans at ecsnet.com
Sun Jan 20 18:04:08 EST 2008


I would recommend that if you check for the existence of the function, you 
use a slightly different naming convention.  Instead of 
configmanager_fieldname, use configmanager_core/pluginnumae_fieldname, 
this will prevent plugins that might take advantage of this from worrying 
about duplicate field names.

Also, I prefer to see 'geeklog' instead of Core, at least in the text 
prompts.  For the non-technical folks using Geeklog, I think it would make 
more sense.

Thanks!
Mark

On Sun, 20 Jan 2008, Blaine Lang wrote:

> 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
>> 
>>
>> 
> _______________________________________________
> geeklog-devel mailing list
> geeklog-devel at lists.geeklog.net
> http://eight.pairlist.net/mailman/listinfo/geeklog-devel
>
>



More information about the geeklog-devel mailing list