vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Smilies css sprite (https://vborg.vbsupport.ru/showthread.php?t=314241)

fxdigi-cash 09-11-2014 03:39 PM

Smilies css sprite
 
Hi,

I'm trying to optimize my vb4 and reached now the last stages where I'm at a loss with how to use Smilies CSS Sprite

I want to know how to do that because users are going to use smilies all around the vb board.

any hint on that? is there a temple I should play with or a php file that I have to play with its code??

any idea?

Zachery 09-11-2014 04:32 PM

That's going to be a fair lot of work. I don't know if it'd honestly be worth it.

tbworld 09-11-2014 05:39 PM

Analyze your page and server load characteristics. If smileys are a significant increase on page size and thus page load time, then reduce the number of smileys posted per post and limit the number of overall smileys used on the board.

If the smileys are small, then they will be cached by the device, otherwise they are just another image for the device to deal with as an "http request". Limiting the number of requests is always an advantage, although modern browsers handle this much better.

Assuming simple non-animated smileys: If you just used 20 smileys then a sprite would obviously be an advantage on reducing requests and page load times, but as @Zachery kindly pointed out: it will not be easy (and more work then I wanted to undertake).

For mobile devices I convert smileys to text except for :smile:. I do not use animated smileys and have limited the smiley group to around 15-20.

tpearl5 09-11-2014 05:44 PM

Quote:

Originally Posted by tbworld (Post 2514702)
For mobile devices I convert smileys to text except for :smile:, I do not use animated smileys and limited the smiley group to around 20.

Curious what you are doing to accomplish this?

Dave 09-11-2014 07:05 PM

Tip: use https://kraken.io/web-interface and optimize all of your images using the lossless mode, or lossy mode if you don't mind to lose a few pixels. It can optimize your images up to 50% or even more.

Zachery 09-11-2014 09:14 PM

Just, in my mind.

For smilies, you're often going to only have a few on a page. Having to serve the entire smilies sheet probably does more harm than good.

Plus its going to be a mega pita to deal with the editor, and the clickable interface, etc.

fxdigi-cash 09-12-2014 01:45 AM

fair enough everyone. Thanks a lot.

ok, in this case, how about changing url of the smilies path from cookie to cookieless

which template I have to edit and how??

I found few templates related to smilies: smiliepopup , smiliepopup_smilie , smiliepopup_category

I want to add my own cookieless domain instead of the forum domain...

Zachery 09-12-2014 03:12 AM

Do you have a cookieless domain serving images?

fxdigi-cash 09-12-2014 03:54 AM

Quote:

Originally Posted by Zachery (Post 2514795)
Do you have a cookieless domain serving images?

yes, of course. there is no point of asking if I don't have one :)

Zachery 09-12-2014 03:32 PM

You'd be surpised how many people want to do something, but don't have it setup.

Just update the urls for the smilies.


All times are GMT. The time now is 09:59 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01105 seconds
  • Memory Usage 1,729KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete