The look of Admin Console can be changed (e.g. to match company color scheme) from "Tools > Admin Skins" section. In there it's possible to:
- upload logo images for Admin Console header
- upload logo image for Admin Console login screen
- specify color values for predefined UI elements (e.g. sub-section color, odd/even grid row colors, etc.)
- directly change CSS template
Upon saving changes specified parameters would be applied to CSS template and a CSS file would be created. Produced filename looks like this:
/system/user_files/admin-default-1489913856.css
where:
- "default" is lowercased name of the skin
- "1489913856" is compilation timestamp
The file naming scheme however doesn't match general compiled asset scheme used, where filename is static and compilation timestamp is added to URL of the assets during usage time. This might not seem a big problem, but later path to skin file is used to create final CSS used in Admin Console where used file paths form filename of compiled asset:
<inp2:adm_AdminSkin file_only="1" result_to_var="skin_css"/> <link rel="stylesheet" href="<inp2:m_Compress files=' js/jquery/ui-lightness/jquery-ui-1.10.3.custom.css| js/jquery/thickbox/thickbox.css| js/calendar/calendar-blue.css| $skin_css| {module_path}/img/toolbar/toolbar-sprite.css '/>" type="text/css" media="screen" />
This way each time skin configuration is changed the filename of produced asset is changed as well.
Solution
- change "SkinHelper::compile" method to:
- don't include timestamp into compiled filename
- don't delete previous version of skin file
- delete "SkinHelper::SKIN_REGEXP" constant
- delete "SkinHelper::isSkinFile" method
- delete "SkinHelper::_getLastCompiled" method
- change "SkinHelper::AdminSkinTag" to compile file, when missing and return it in either case