Last modified: 2012-08-16 14:37:20 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T41426, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 39426 - Skins should have a way of overriding interface images used in core like the redirect arrow
Skins should have a way of overriding interface images used in core like the ...
Status: NEW
Product: MediaWiki
Classification: Unclassified
Interface (Other open bugs)
1.20.x
All All
: Low minor (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-16 12:57 UTC by Bawolff (Brian Wolff)
Modified: 2012-08-16 14:37 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Bawolff (Brian Wolff) 2012-08-16 12:57:30 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).
Comment 1 Daniel Friesen 2012-08-16 14:25:12 UTC
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.
Comment 2 Bawolff (Brian Wolff) 2012-08-16 14:37:20 UTC
(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.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links