![]() |
|
Thread Tools |
#1
|
|||
|
|||
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 ![]() No members have liked this post.
|
#2
|
||||
|
||||
That's going to be a fair lot of work. I don't know if it'd honestly be worth it.
__________________
Looking for ImpEx?
The following members like this post: tbworld
|
#3
|
|||
|
|||
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. No members have liked this post.
Last edited by tbworld; 12 Sep 2014 at 06:51. |
#4
|
||||
|
||||
Curious what you are doing to accomplish this?
__________________
John No members have liked this post.
|
#5
|
|||
|
|||
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.
No members have liked this post.
|
#6
|
||||
|
||||
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?
No members have liked this post.
|
#7
|
|||
|
|||
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 ![]() No members have liked this post.
|
#8
|
||||
|
||||
Do you have a cookieless domain serving images?
__________________
Looking for ImpEx?
No members have liked this post.
|
#9
|
|||
|
|||
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 ![]() No members have liked this post.
|
#10
|
||||
|
||||
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?
The following members like this post: tbworld
|
#11
|
|||
|
|||
Originally Posted by Zachery
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 ![]() No members have liked this post.
|
#12
|
||||
|
||||
You could do a query to replace them in the database, but that is not my forte.
__________________
Looking for ImpEx?
The following members like this post: fxdigi-cash
|
#13
|
||||
|
||||
Originally Posted by Zachery
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:
__________________
John The following members like this post: tbworld
|
![]() |
«
Previous Thread
|
Next Thread
»
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
|
|
New To Site? | Need Help? |
All times are GMT. The time now is 10:17.