2 blueyed May 22, 2006 15:33

Ok, the real solution has been to use
function getDefaultSettings()
{
$r = array(
// default settings
);
if( isset($this->Settings) )
{ // Settings get queried again to get displayed in "edit settings"
// manipulate $r, according to $this->Settings->get(...)
}
return $;
}
Yep done via;
if( isset ( $this->Settings ) && $this->Settings->get('Resize_Style') == 'none' ) {
$Settings['ResizeAt_Width']['disabled'] = true;
$Settings['ResizeAt_Height']['disabled'] = true;
}
return $Settings;
}
Although the realtime hook during runtime would be pretty sweet....
"id", "onclick" and other useful JS handlers now get passed through to the edit settings form.
See the Test plugin (just updated), where I've added an example for it.
You might want to look at Plugin::PluginSettingsValidateSet() and Plugin::PluginSettingsUpdateAction().
I'll look into allowing "onclick" as a param for settings also, which would allow to handle this dynamically, too.