Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 11 Sep 2014, 17:39
fxdigi-cash fxdigi-cash is offline
 
Join Date: Jul 2012
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?
__________________
Shoot me a PM if I didn't reply in your post when you needed help. I can't remember things easily
Reply With Quote
  #2  
Old 11 Sep 2014, 18:32
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Real name: Zachery Woods
That's going to be a fair lot of work. I don't know if it'd honestly be worth it.
__________________
Looking for ImpEx?
Reply With Quote
  #3  
Old 11 Sep 2014, 19:39
tbworld tbworld is offline
 
Join Date: Oct 2008
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.

Last edited by tbworld; 12 Sep 2014 at 06:51.
Reply With Quote
  #4  
Old 11 Sep 2014, 19:44
tpearl5's Avatar
tpearl5 tpearl5 is offline
 
Join Date: Nov 2001
Real name: John
Originally Posted by tbworld View Post
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?
__________________
John
Reply With Quote
  #5  
Old 11 Sep 2014, 21:05
Dave Dave is offline
 
Join Date: Jun 2010
Real name: Dave
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.
Reply With Quote
  #6  
Old 11 Sep 2014, 23:14
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Real name: Zachery Woods
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.
__________________
Looking for ImpEx?
Reply With Quote
  #7  
Old 12 Sep 2014, 03:45
fxdigi-cash fxdigi-cash is offline
 
Join Date: Jul 2012
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...
__________________
Shoot me a PM if I didn't reply in your post when you needed help. I can't remember things easily
Reply With Quote
  #8  
Old 12 Sep 2014, 05:12
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Real name: Zachery Woods
Do you have a cookieless domain serving images?
__________________
Looking for ImpEx?
Reply With Quote
  #9  
Old 12 Sep 2014, 05:54
fxdigi-cash fxdigi-cash is offline
 
Join Date: Jul 2012
Originally Posted by Zachery View Post
Do you have a cookieless domain serving images?
yes, of course. there is no point of asking if I don't have one
__________________
Shoot me a PM if I didn't reply in your post when you needed help. I can't remember things easily
Reply With Quote
  #10  
Old 12 Sep 2014, 17:32
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Real name: Zachery Woods
You'd be surpised how many people want to do something, but don't have it setup.

Just update the urls for the smilies.
__________________
Looking for ImpEx?
Reply With Quote
  #11  
Old 16 Sep 2014, 14:35
fxdigi-cash fxdigi-cash is offline
 
Join Date: Jul 2012
Originally Posted by Zachery View Post
You'd be surpised how many people want to do something, but don't have it setup.

Just update the urls for the smilies.
Hi Zachery, sorry to reply late, I got busy...

Thanks for the solution, but I've never thought I have to change the url for each smilie. what if I have 200 smilies on my board!! do I have to change the url to each one??

isn't there a better way to do that specifying a url to all smilies at once??

I'm just curious if there is a solution for any vb that has a lot of smilies!!

Thanks again
__________________
Shoot me a PM if I didn't reply in your post when you needed help. I can't remember things easily
Reply With Quote
  #12  
Old 16 Sep 2014, 14:54
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Real name: Zachery Woods
You could do a query to replace them in the database, but that is not my forte.
__________________
Looking for ImpEx?
Reply With Quote
  #13  
Old 16 Sep 2014, 15:55
tpearl5's Avatar
tpearl5 tpearl5 is offline
 
Join Date: Nov 2001
Real name: John
Originally Posted by Zachery View Post
You could do a query to replace them in the database, but that is not my forte.
You wouldn't be able to do it with a query alone since you can't do a find/replace via regex in MySQL. It would be easy if the file name were in a different field, but unfortunately you would need a script to loop through and make the URL changes to retain the file name.

You could use this to get a specific URL:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

__________________
John
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 10:17.

Layout Options | Width: Wide Color: