[pLog-svn] r4934 - plog/branches/lifetype-1.2/templates/admin

Jon Daley plogworld at jon.limedaley.com
Sat Mar 3 08:43:54 EST 2007


 	If I fill in all of the values, it does work correctly.  I wonder 
how hard it would be to grey-out or otherwise provide a reason to the user 
why he isn't able to change the settings that are marked as "user can't 
override", instead of just saying, "settings saved successfully", and 
reverting the user's change.

On Sat, 3 Mar 2007, Jon Daley wrote:

> 	Ah, I see.  Perhaps plugins should provide defaults if the values
> are blank, since you are basically forcing the admins to set all of the
> defaults the first time they go to that page anyway.
>
> On Sat, 3 Mar 2007, Oscar Renalias wrote:
>> But that's the way it's supposed to be :-)
>>
>> When the plugin reports the parameters it exposes for global
>> administration it also defines a class that will do the validation.
>> If the validator is so strict that it doesn't accept empty values,
>> then the validation class should be checked in case empty values
>> should be allowed. And I would also say that it would be beneficial
>> if site admins defined default values for those settings. If the
>> parameter is set to be overrideable by users, having a default value
>> in there will only affect the starting value of the plugin parameter
>> and it will overwritten by the user's value later on when the user
>> updates the plugin settings in his/her blog.
>>
>> On 3 Mar 2007, at 14:59, Jon Daley wrote:
>>
>>>  	Okay, I hadn't realized it was a valid function.  Have you tried
>>> this page with more than one plugin?  It doesn't work.
>>> I have openid, authimage and recentcomments installed, and unless
>>> you set
>>> values for all plugins, you get an error, and nothing is updated.
>>>
>>>
>>> On Sat, 3 Mar 2007, Oscar Renalias wrote:
>>>> This check in is not correct, {assignvar} is a valid smarty function
>>>> that I created, you'll find the code for it under class/template/
>>>> smarty/plugins/fuction.assignvar.php. This function is equivalent to
>>>> PHP's $key=$$template_var, which I found no other way to implement in
>>>> Smarty.
>>>>
>>>> I'm not sure if you're already familiar with how this feature works,
>>>> but it's only meant for administrators to be able to set global
>>>> values for plugins, and then those values will be used by all blogs
>>>> regardless of the current blog settings (of course depending on
>>>> whether administrators allow users to override those settings or not,
>>>> that's defined by the drop-down list on the right of each parameter)
>>>>
>>>> If the plugins don't have a default value for those settings, it's
>>>> fine. As long as the setting is set to be "overrideable", it won't
>>>> cause a problem except for the validation when submitting the form.
>>>> If that's a problem, all site admins have to do is set a reasonable
>>>> default, or if it is a problem, then the plugin developer should make
>>>> sure that the validator used to validate the global parameter doesn't
>>>> reject empty values.
>>>>
>>>> Regarding the translation of the parameters, I hadn't thought about
>>>> getting them translated but it can be easily done.
>>>>
>>>> On 2 Mar 2007, at 21:08, Jon Daley wrote:
>>>>
>>>>>  	I am not sure what this is supposed to do.  Right now, the
>>>>> blog_setting value is directly used as the parameter name,
>>>>> untranslated.
>>>>>  	Now that I removed the smarty typo, the configuration values are
>>>>> actually getting set to something, and that value is incorrect.
>>>>>  	It seems like we need a table to store the global values, and then
>>>>> grab the value from there, rather than from the plugin, since the
>>>>> plugin
>>>>> might have a useful default value, but doesn't know what the current
>>>>> globally set value is.
>>>>>  	As far as translating goes, it seems that we either have to
>>>>> enforce that plugins have a translation for their configuration
>>>>> settings,
>>>>> named exactly the same thing, which probably isn't a bad idea,
>>>>> otherwise,
>>>>> they would have to provide the translation key in the
>>>>> getPluginConfigurationKeys array.
>>>>>
>>>>> On Fri, 2 Mar 2007, jondaley at devel.lifetype.net wrote:
>>>>>
>>>>>> Author: jondaley
>>>>>> Date: 2007-03-02 14:05:20 -0500 (Fri, 02 Mar 2007)
>>>>>> New Revision: 4934
>>>>>>
>>>>>> Modified:
>>>>>>   plog/branches/lifetype-1.2/templates/admin/
>>>>>> pluginsettings.template
>>>>>> Log:
>>>>>> typo
>>>>>>
>>>>>> Modified: plog/branches/lifetype-1.2/templates/admin/
>>>>>> pluginsettings.template
>>>>>> ===================================================================
>>>>>> --- plog/branches/lifetype-1.2/templates/admin/
>>>>>> pluginsettings.template	2007-03-02 19:02:21 UTC (rev 4933)
>>>>>> +++ plog/branches/lifetype-1.2/templates/admin/
>>>>>> pluginsettings.template	2007-03-02 19:05:20 UTC (rev 4934)
>>>>>> @@ -21,7 +21,7 @@
>>>>>> 		{assign var=pluginsettings value=$plugin-
>>>>>>> getPluginConfigurationKeys()}
>>>>>> 		{foreach from=$pluginsettings item=setting}
>>>>>> 		 <tr>
>>>>>> -			{assignvar var=key value=$setting.name}
>>>>>> +			{assign var=key value=$setting.name}
>>>>>> 			{assign var=name value=$setting.name}
>>>>>> 			{assign var=overrideValue value=$canOverride[$setting.name]}
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> pLog-svn mailing list
>>>>>> pLog-svn at devel.lifetype.net
>>>>>> http://limedaley.com/mailman/listinfo/plog-svn
>>>>>>
>>>>>
>>>>> --
>>>>> Jon Daley
>>>>> http://jon.limedaley.com/
>>>>>
>>>>> I haven't lost my mind; I have a tape backup somewhere.
>>>>> _______________________________________________
>>>>> pLog-svn mailing list
>>>>> pLog-svn at devel.lifetype.net
>>>>> http://limedaley.com/mailman/listinfo/plog-svn
>>>>>
>>>>
>>>> _______________________________________________
>>>> pLog-svn mailing list
>>>> pLog-svn at devel.lifetype.net
>>>> http://limedaley.com/mailman/listinfo/plog-svn
>>>>
>>>
>>> --
>>> Jon Daley
>>> http://jon.limedaley.com/
>>>
>>> You are only as wise as others perceive you to be.
>>> -- M. Shawn Cole
>>> _______________________________________________
>>> pLog-svn mailing list
>>> pLog-svn at devel.lifetype.net
>>> http://limedaley.com/mailman/listinfo/plog-svn
>>>
>>
>> _______________________________________________
>> pLog-svn mailing list
>> pLog-svn at devel.lifetype.net
>> http://limedaley.com/mailman/listinfo/plog-svn
>>
>
> -- 
> Jon Daley
> http://jon.limedaley.com/
>
> The most amazing achievement of the computer software industry is its
> continuing cancellation of the steady and staggering gains made by the
> computer hardware industry.
> -- Henry Petroski
> _______________________________________________
> pLog-svn mailing list
> pLog-svn at devel.lifetype.net
> http://limedaley.com/mailman/listinfo/plog-svn
>

-- 
Jon Daley
http://jon.limedaley.com/

Don't tell people how to do things.
Tell them what to do and let them surprise you with their results.
-- George Patton


More information about the pLog-svn mailing list