tavenger5
17-03-10, 16:54
I've been experimenting with css sprites lately and found that it can cut down on server calls significantly. With them all of the flags could be loaded at once instead of one after another. This would effectively eliminate 52 server calls. Unfortunately there's no easy way to convert the flags into a sprite since the img tags are dynamically built in the code.
There's some info here: Creating easy and useful CSS Sprites | Css Globe (http://cssglobe.com/post/3028/creating-easy-and-useful-css-sprites)
CSS Sprites generator (http://csssprites.com/)
Sorry for all the suggestions lately :)
Edit - I think I found a way to do it. The name of the sprite just has to correspond to the name of the flag/language. Some editing of 'vbenterprisetranslator_flag' should work.
So it would look something like this: (see the change in img src)
<a rel="novbseo" href="$url" <if condition="$code==$vbulletin->options['vbenterprisetranslator_forumlanguage']">onclick="document.cookie = 'vbet_language=; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/'; return true;"</if>><img class="sprite $code" src="/clear.gif" alt="$name" <if condition="$vbulletin->options['vbenterprisetranslator_flags_noborder'] && !$highlight">border="0"</if><if condition="$highlight">border="1" style="border-color: yellow"</if>/></a>
There's some info here: Creating easy and useful CSS Sprites | Css Globe (http://cssglobe.com/post/3028/creating-easy-and-useful-css-sprites)
CSS Sprites generator (http://csssprites.com/)
Sorry for all the suggestions lately :)
Edit - I think I found a way to do it. The name of the sprite just has to correspond to the name of the flag/language. Some editing of 'vbenterprisetranslator_flag' should work.
So it would look something like this: (see the change in img src)
<a rel="novbseo" href="$url" <if condition="$code==$vbulletin->options['vbenterprisetranslator_forumlanguage']">onclick="document.cookie = 'vbet_language=; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/'; return true;"</if>><img class="sprite $code" src="/clear.gif" alt="$name" <if condition="$vbulletin->options['vbenterprisetranslator_flags_noborder'] && !$highlight">border="0"</if><if condition="$highlight">border="1" style="border-color: yellow"</if>/></a>