2014-07-07, 11:50 PM
Pages: 1 2
2014-07-08, 01:35 AM
Seems complicated for this point.
What about adding a class to all smilies? That would make it easier for administrators to implement that themselves. I dunno.
What about adding a class to all smilies? That would make it easier for administrators to implement that themselves. I dunno.
2014-07-08, 01:58 AM
XenForo uses class for smilies and a style for Sprite smilies:
<style type="text/css">
img.mceSmilie,
img.mceSmilieSprite
{
vertical-align: text-bottom;
margin: 0 1px;
}
/* smilie sprite classes */
img.mceSmilieSprite.mceSmilie{$smilie_id}
{
width: 18px; height: 18px; background: url('styles/default/xenforo/smilies/sprite.png') no-repeat 0px -100px;
}
</style>
<!-- Default Smilie -->
<img src="styles/default/xenforo/smilies/wink.png" class="mceSmilie" alt=";)">
<!-- Sprite Smilie -->
<img src="styles/default/xenforo/clear.png" class="mceSmilieSprite mceSmilie{$smilie_id}" alt=":D" >
2014-07-08, 06:21 AM
At this point adding the full feature you are requesting is not possible. But I agree we should add a class to each smilies so that administrators can style them as they please.
2014-07-08, 07:25 AM
(2014-07-08, 06:21 AM)Omar G. Wrote: [ -> ]At this point adding the full feature you are requesting is not possible. But I agree we should add a class to each smilies so that administrators can style them as they please.
On my forum I was playing around with it (We have sprites for about everything), and it worked out pretty swell with sprites and I made an auto generator, would you like me to look into it and give an example code?
2014-07-08, 07:35 AM
If we allow administrators to enter a class, sprites become easy for the administrator to create themselves.
2014-07-08, 08:13 AM
But I think it's better if We add "Sprite mode" tool for smilies.
2014-07-08, 08:28 AM
If it's done by adding classes to the smileys, imo it shouldn't use the <img /> tag. Some browsers will load both the src"" in the image tag AND the background-image set with CSS so it's counter intuitive in those cases. Using "clear.png" is still an http request, albeit a tiny one. It'd be great if there were some way around that (Just use <a> for all smilies regardless of if it's a single smiley or sprite?).
I do agree though, adding a class would be better so sprites could be used, regardless of if it's just on the current <img> tags or not.
I do agree though, adding a class would be better so sprites could be used, regardless of if it's just on the current <img> tags or not.
2014-07-08, 10:40 AM
https://github.com/Zalvie/mybb_Sprited-S...milies.php
The plugin I made a while ago, If anyone needs it
The plugin I made a while ago, If anyone needs it
2014-10-21, 01:31 AM
Is there it for 1.8? thanks
Pages: 1 2