Someone can feel free to correct me if I'm wrong, but currently user preferences uses an HTMLForm object to handle everything, and new preferences can be added arbitrarily using the GetPreferences hook. I'd imagine this will definitely be supported in the future as it is the primary way for extensions to add new user preferences.
As such, the only real restriction on the key size is that of the database, which is currently varbinary(32). Since each preference gets its own row, there is no limit on how many extensions can be added (unless you count limits on the size of the database).
*--* *Tyler Romeo* Stevens Institute of Technology, Class of 2015 Major in Computer Science www.whizkidztech.com | tylerromeo@gmail.com
On Sun, Sep 9, 2012 at 8:37 PM, MZMcBride z@mzmcbride.com wrote:
Forwarding from https://bugzilla.wikimedia.org/show_bug.cgi?id=40124#c0:
A lot more functionality around user preferences was added with https://gerrit.wikimedia.org/r/#/c/5126/
Thank you for that.
Recently I found that one can add new options (''keys''). This is very useful for Community scripts. So I hope this was intentional behaviour and this bug is about clarifying that.
What in particular, I'd like to know is:
Will it be supported in future?
Which max. size (i.e. how many bytes) can the pref have?
How many prefs can be added?
Is it possible to remove one particular pref without having to reset all?
Again, it would be really useful if I could get started using this feature. Currently I have to publicly store user prefs for my scripts using ( https://commons.wikimedia.org/wiki/MediaWiki:Gadget-SettingsManager.js ) in their common or <skin>.js. Having a private place to store them would be great, especially because one can retrieve them with both, the API and they are by default in mw.user.options JavaScript RL module.
Any help in answering these questions on this list and/or on the bug would be great.
MZMcBride
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l