Hi how can I add options in skin that allows me to lets the user choose the default logo or use there own because I doint know how to add options in skins.
Topic on Project:Support desk
Skins should only get options, saved for the user, not set some. In your skin template you can use $this->getUser()->getOption() to get an Option (e.g. "skin" to get the skin name).
With an Extension you can add Useroptions to save some values you want.
Ok. How do I add options like they are in default setting.php but just for the skin.
Hello,
not in DefaultSettings.php :) You need to create a new extension, which handles this. It can add options to a User with $user->setOption() and the skin can (while initialisation) read this values with $user->getOption(). The functions (and all other) is documented here:
https://doc.wikimedia.org/mediawiki-core/master/php/html/classUser.html#
How you can develop an Extension, you can read here:
Ok but I thought you can create options in the skin without needing to add them to an extension or in the core of Mediawiki.
It's possible, too, but i would suggest to do not add too much funtionality into a skin. If you want to set the options with cookies, for example, you can use the WebRequest class.
Hi um well I just need to add options so that the user can decide if they want the default logo or choose there own or if they want search bar on the sidebar or on the top bar.
Hi what I mean is settings.