PDA

View Full Version : [Plugin authors] SC 7.1 - change in settings handler



mherger
2008-04-25, 06:23
Following a discussion on this forum (http://forums.slimdevices.com/showthread.php?t=40665) we decided to change the settings page handler. In order to prevent collisions of SC internal HTTP keywords (eg. command, p0 etc.) with your own settings we're now adding a prefix to the prefs in the settings pages.

What does this mean for you?

- in your settings page template prepend any reference to a setting with "pref_":
-> input field name: eg. "pref_username" instead of "username"
-> TT variable: "pref.pref_username" instead of "pref.username"

- if you're using your custom page handler, you'll have to change references to the above variables, too

Plugins without this change will still work in 7.1, but a warning will be logged. I've left some code in the settings page handler to be backward compatible. But as soon as 7.0 can be considered obsolete, this code will be removed. Thus if you want to have a plugin compatible with both 7.0.x and 7.1+, you can leave it as is. If you're preparing for 7.1+ only, please add the above change to your code.

Thanks for your understanding.

--

Michael