Skin:Vector/Customize

= Custom HTML = Up to MediaWiki 1.35 there are no easy way to customize skin. Most of the changes should be made by modifying the skin code only. The exceptions are Sidebar and interface labels and messages. As a result, any engine update will delete any changes, since skin files would be replaced. The current approach is to keep custom HTML (Javascript, PHP, etc.) code in separate files and add them in VectorTemplate.php.

Below are some examples on adding custom HTML code in different places of VectorTemplate.php (skins/Vector/includes/). Consider that the skin code depends on MediaWiki version and could differ.

Sidebar. Custom search portal
To add search field of an external search engine (or several), we should copy the code generated by that service into new file 'custom-search.htm' (skins/Vector/includes/) and find the lines:

It is in function buildSidebar. Replace these two lines with the following code:

This code will appear in sidebar as set in page Special:Sidebar by the following line: * SEARCH

Footer. Custom row
Row in footer is an area below wiki page content as wide as content is. To add 'custom-footer.htm' right below content find these lines:

And replace them with:

Footer. Custom icon
Icon in footer is an image like MediaWiki banner. Some counters or partnership logos could use such images. It is at the very bottom of a footer. To add 'custom-icons.htm' before MediaWiki banner (but to the same row) find these lines in getFooterData function:

And replace them with: