Last modified: 2012-08-16 14:37:20 UTC
See the thread at support desk: http://www.mediawiki.org/wiki/Thread:Project:Support_desk/Need_to_replace_redirect_file_File:Redirect_arrow_without_text.svg Basically someone asked how to change the redirect arrow that displays with #redirect syntax so that it works with their green on black skin. I advised them to just replace the image file, as we don't really have any method of overriding those images in a skin (short of some really hacky CSS). However, really skins should be able to override such images, as we don't want skin designers patching core. Perhaps some method in the Skin class getURLForImage, core code does stuff like $context->getUser()->getSkin()->getURLForImage( 'redirect arrow' ) which returns the appropriate url of either redirectarrowltr or redirectarrowrtl depending on the directionality of interface (Thus as added bonsu, hiding details of LTR vs RTL from core parts).
Btw, it's just $context->getSkin() there's no getUser() involved. We probably will need something like this. Though it will be a little tricky with the parser. We'll definitely need to fragment the cache by skin for this. In that area we're going to need to double check the code we use to deal with parser keys. We are really going to want to make sure we have code working that will understand when to fragment and when not to fragment.
(In reply to comment #1) > Btw, it's just $context->getSkin() there's no getUser() involved. Ah, I was thinking back to the days of $wgUser->getSkin(). Clearly I haven't done enough MediaWiki coding recently > > We probably will need something like this. Though it will be a little tricky > with the parser. We'll definitely need to fragment the cache by skin for this. > > In that area we're going to need to double check the code we use to deal with > parser keys. We are really going to want to make sure we have code working that > will understand when to fragment and when not to fragment. I think that work is mostly done - we already have lots of code to deal with $parser->getUserLangObj() situation. However in this particular case, I don't think that's even neccesary as redirect pages aren't currently saved in the parser cache (Which is kind of odd given we still seem to parse on each view, guess not too many people visit them) and the arrow is added outside of the parsing process.