On 11-02-03 01:52 PM, Brion Vibber wrote:
On Thu, Feb 3, 2011 at 1:19 PM, Dan Nessettdnessett@yahoo.com wrote:
Our site has 4 skins that display the logo - 3 standard and 1 site- specific. The site-specific skin uses rounded edges for the individual page area frames, while the standard skins use square edges. This means a logo with square edges looks fine for the standard skins, but not for the site-specific skin. A logo with rounded edges has the opposite characteristic.
The programmer who designed the site-specific skin solved this problem with a hack. The absolute url to a different logo with rounded edges is hardwired into the skin code. Therefore, if we want to reorganize where we keep the site logos (which we have done once already), we have to modify the site-specific skin code.
While it is possible that no one else has this problem, I would imagine there are skins out there that would look better if they were able to use a skin specific logo (e.g., using a different color scheme or a different font).
My question is: has this issue been addressed before? If so, and there is a good solution, I would appreciate hearing of it.
A couple ideas off the top of my head:
- You could use CSS to apply rounded corners with border-radius and its
-vendor-* variants. (May not work on all browsers, but requires no upkeep other than double-checking that the rounded variant still looks good. Doesn't help with related issues like an alternate color scheme for the logo in different skins.)
- Your custom skin could use a custom configuration variable, say
$wgAwesomeSkinLogo. Have it use this instead of the default logo, and make sure both settings get updated together.
- You could use a fixed alternate path which can be determined by modifying
the string in $wgLogo. Be sure to always store and update the second logo image correctly.
- You could create a script that applies rounded corners or changes colors
in an existing image file and saves a new one, then find some way to help automate your process of creating alternate logo images in the above.
-- brion
;) "not on all browsers" is basically old versions of Opera and IE before 9. Border radius is supported by everything from Firefox, to WebKit based browsers, to Konqueror, to Opera, and even IE9 implements it... IF you use the vendor prefixes properly.
And for reference:|-moz-border-radius: 10px; -khtml-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px; |-moz- works for Gecko. -khtml- works in Konqueror (Linux versions, iirc there were some notes that the Windows versions [wait there's a Windows version?] doesn't have it), and some early versions of WebKit use it too. -webkit- of course works in WebKit (Safari, Chrome, etc...), and Opera 10.50 and IE9 implement the standard border-radius. Recent versions of Gecko and WebKit are now starting to use the standard border-radius too (but that's real recent, ie: Firefox 4 which isn't even released yet). And be sure to keep that order. You can move the -moz- after the -webkit- if you want. But -khtml- should always be before -webkit- and all vendor prefixes should always be before the standard properties. Since with css' cascading rules, if you say boder-radius: 5px; -moz-border-radius: 5px; you're essentially saying "Hey, give me a border radius, but if you still have a buggy non-standard implementation lying around, use it instead of the correct standard behavior".
Logos are something that's been on my mind a bit with skin improvements. Not really "skin-specific" tweaks, in fact I don't quite like that idea. If every skin defines a different logo, we no longer have a standard logo and you can't rely on simply being able to upload a logo and have it work everywhere. However what has come to mind is varying sizes of logos, in one use-case I suppose you could point out, some of Wikia's skins have used a different logo than the standard one, since it has a different size. I've been contemplating something like `$wgLogo['150x150'] = '...';` and letting skins define what kind of logo region they have so that SkinTemplate can make a "best-pick" out of the different sizes that have been configured.
~Daniel Friesen (Dantman, Nadir-Seen-Fire) [http://daniel.friesen.name]