Skip to main content
Smileys Started by Spuds · · Read 6534 times 0 Members and 1 Guest are viewing this topic. previous topic - next topic

Smileys

I was doing some work on the smileys, those beauties in the editor window.  Oddly they are GIF, and I know they were updated to PNG ages ago,! Seems we had a merge mishap many years ago and never noticed.  No matter, even the png ones are garbage from another decade compared to what is available as SVG, the only reason for png was so they looked good on any color background.

For 2.0 I've updated them all to SVG and added several, so the default set is a more complete.  Screenshot 2022-08-27 at 16-30-25 Just a test.png

And now the questions, the random solicitation of input!

  • Does anyone use the smiley sets option?
  • Along that same line, allow smiley set selection by members.

Me asking shows I do not use those.  The problem with sets, as currently implemented (and I think this was inherited), is that each set installed must have the same filename.ext in each set.   So if you install set A with all SVG, to install a set B, all the file names must be the same and be SVG as well.  The proper thing is to allow each set to assign any filename to any icon ... so :)  could be bla.svg in set 1, xyz.gif in set 2, abc.png in set 3

I could be all wrong about that as well, and you can probably play games with renaming a png as an svg or gif as png and trick the system, just guessing, never tried.

TBH I'm not very interested in "really" fixing it :tongue:  What I would like is allowing for a single set and load it as you like.  With 1800 emoji available in 3 sets I feel there are enough.  You could just consider those editor icons as quick access to the emoji, or for your animated ones, or one off ones.

I'd also like to implement the ability to define your own :emoji_tag: allowing adding/replacing emoji code<=>images.  So if you had, say some :cool_tag: emoji you could add it and have it appear in the pulldown and render in the posts.

Another thought I had was the (default) editor icons would change with the chosen emoji set, which again just solidifies that they are quick links to the :emoji:  Custom ones added would not be effected.  This again would provide for a more consistent look on the page.

Re: Smileys

Reply #1

Having multiple sets selectable per-user is one of those things that can be sold as "flexibility", but I have the feeling close to no one use it.
I remember I changed the default on sm.org because I really didn't like it, but if I wouldn't have been allowed to I was not going to complain much.

 emanuele is for kill it with fire
Bugs creator.
Features destroyer.
Template killer.

Re: Smileys

Reply #2

Kind of funny, it was not even enabled on this site, but then we only have one set.   Smiley sets seem very dinosaur at this point, meaning they have been replaced by large emoji sets.  The only need is to add custom/animated ones to your set.

I enabled the current ACP setting, so I could see what it did in the profile area.  Interestingly only if you allow customized smiley sets are members then allowed to turn off smileys, really strange logic.  And with emoji the smiley sets are only going to effect the smileys not the emoji.  Keeping the option just makes it inconsistent, and extending it to emoji gets a bit burdensome.

I suppose allowing members to turn off smileys is OK, could be some reason or another to want that, for example some really do not like animated ones if the site is loaded with them.  So that option could be exposed as a new setting, maybe.

Anyway between the admin setting, users settings, parser settings, smiley settings, its one of those options that is dug in deep ... and of course wildly inconsistent.  I'll see what I can do and if it makes sense in the end.

Re: Smileys

Reply #3

I'm all for obliterating them, emoji's are pretty common now and you can easily parse the standard ones into the equivelent emoji if you really wanted to.

i.e. :-) -> :slight_smile:

Re: Smileys

Reply #4

I'm all for removing smileys too and going fully future with emoji only.

Re: Smileys

Reply #5

I don't really care about any of them that much as they kinda like the same.  :D

Re: Smileys

Reply #6

I've made some progress on this, but it is definitely peeling back the onion, lots of layers.

Removed:
- User option to choose a smiley set, added complications and would be a bit heavy to extend to emoji sets
- ACP option to enable customized smileys, its simply on all the time.  It was probably hidden because the smiley area of the ACP is rather confusing (thats being polite)

Added:
- User option to disable smileys, if you don't like them you can turn them off.  This is a theme option, so you can do it on a per theme basis (unlike the old choose smiley set which was global across themes)
- Smiley sets now key off the filename, not the full name.ext  This allows smile sets of different extensions to work together.  You will no longer see the "this smiley does not exist in sets xyz"  if only the extension is different, meaning smile.png in set A === smile.gif in set B
- The default smiley set will always follow the chosen emoji library, its owned by the system.  When you swap emoji libraries, the default smileys in that set will be dynamically changed.  You can safely add new smileys to that set, but changing pre-defined ones would simply get nulled if you change the library.  So if you need that use a custom set.

Changed:
- The system will parse the smiles defined in the ACP, so :) is :) just as it always was.  It will also parse any :emoji: defined there IF the image file exists in the current smiley set, if not it will leave it to the emoji parser to process.  This is done to allow for:
   - A way to add your own custom :emoji: codes, or ones missing from a library.
   - A way to overwrite specific library images with custom site ones.
   - A way for a missing imported smiley definition to still parse as an emoji (assuming it is a valid emoji code at all)
- The emoji engine is tied into the bbc parser, vs a pre/post process thing.  Should improve "things"

Todo:
- If custom emoji are defined, either unique or replacements, to then show up in the emoji picker.
- Render any missing emoji tags, in smile sets, as site emoji (this is in the ACP).   This may sound a bit wanky but when you go through importing a new smile set you end up with :filename: tags as the smiley code.  When you swap to a different smiley set, one that does not have that file, it could still be a valid :emoji: that the emoji parser can render.  I'd like that to happen, although ATM I don't think it will happen often.
- As above but in the editor smiley toolbar

Re: Smileys

Reply #7

Whe are still using smilies on our forum but I'll happily use emoji ;)

Re: Smileys

Reply #8

Finished, for now, the todo's mentioned in the above post.  I set this site up as though it was a new install.  Upgrades may not be as clean, depends on what is already defined.  The following may be more complicated sounding than it actually is in use, but here it goes.

You should see all the new smileys in the editor toolbar, those are all from the emoji set in use on the site.  The site uses the default smiley set, meaning if you change the emoji set in use, those 'core' smileys will update as well.  If you don't want that, don't use the default set ;) 

You will notice that when you insert one of those smileys, via the editor, it will use the emoji code, for example :smiley: and not :) but both codes :smiley:  and :) will render as normal.   That is how its setup in the admin panel, the old :) codes are hidden (but work) and the new codes are used in the editor and more button.  Both old and new point to the same image (but you could make them different)

In the admin smiley section you can define old smiles as :) or emoji style :smile: ... that is really no different then always.  What is different is if it can't find the filename for an emoji code, it will check if its a valid emoji short code, and if so, use that image.  It provides a nice fallback when needed or primary when wanted.

You can define new emoji codes in the admin smiley section and those will appear in the emoji pulldown (the one that appears when you enter a : followed by a couple of letters).  So for example there is no official  :elk: short code !!!, so sad.  I added an new :elk: code which will both render and show up in the emoji pulldown, and yes you could use it in the editor toolbar as well.

Another example, lets say you don't like one of the emoji images, for example :troll: in the set we are using is 1f9cc (1).png you can set a new image using that same code in the admin panel to replace that.  So here is our :troll: now that is a proper troll !

I think you get the idea.  In doing this I also refreshed the topic icons and several of the site icons, still all svg but not as flat as what we had.

 

Re: Smileys

Reply #9

Thanks to a new keyboard my fingers haven't gotten quite used to yet , I discovered a "pearl"  (or whatever those little hidden gems are called).

If you are running Windows 10 and hold down the windows key and press the "period" key, up pops a whole slew of emojis you can select from and paste into almost anything .. :man_vampire::man_vampire::man_vampire::woman_vampire::man_facepalming::man_facepalming::grin::grin::grin::woman_biking:

Might work in Win7 too.. :man_shrugging:

// Deep inside every dilemma lies a solution that involves explosives //

Re: Smileys

Reply #10

That is pretty cool ... did not know there was a quick way to get to those.  Looks like the emoji handler did its job as well :blush:

Re: Smileys

Reply #11

Quote from: Steeley – Thanks to a new keyboard my fingers haven't gotten quite used to yet , I discovered a "pearl"  (or whatever those little hidden gems are called).

If you are running Windows 10 and hold down the windows key and press the "period" key, up pops a whole slew of emojis you can select from and paste into almost anything .. :man_vampire::man_vampire::man_vampire::woman_vampire::man_facepalming::man_facepalming::grin::grin::grin::woman_biking:

Might work in Win7 too.. :man_shrugging:
Thank you for the tip! :100::100::100:

Made a reply to test said tip, I know there is a like feature LOL
Thank you,
LordRT

Re: Smileys

Reply #12

Guess it's one of those "undocumented" things that's been there for a few years.. 

// Deep inside every dilemma lies a solution that involves explosives //

Re: Smileys

Reply #13

That is new to me too! :rofl:
Bugs creator.
Features destroyer.
Template killer.

Re: Smileys

Reply #14

Also works in KDE ftr.