Important: This page is using cookies (cookies). Using this website without turning off cookies in browser, means that you agree for using it.
Buy Now! Features Downloads

Earn with us!

If you would like to start earning money with vBET join to Affiliate Program.
Results 1 to 8 of 8

Thread: Load flags with a css sprite

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Senior Member
    Join Date
    Dec 2009
    Posts
    276

    Default Load flags with a css sprite

    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

    CSS Sprites generator

    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)
    Code:
    <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>
    Last edited by tavenger5; 17-03-10 at 18:23.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •