Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2022-12-21 08:16:57

zero
Member
From: Lancashire
Registered: 2004-04-19
Posts: 1,470
Website

Smiley plugin?

Is there a smiley plugin or some way I can allow people to add smilies to their comments?


BB6 Band My band
Gud One My blog

Offline

#2 2022-12-21 11:32:34

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,269
Website GitHub

Re: Smiley plugin?

Depends what you mean by smileys.

You should be able to copy and paste emoji in from any internet or OS source and they’ll show up. Might even work if you use certain Unicode character sequences. Not tried it.

But if you want people to be able to type shortcuts like :) and have those converted, you’ll need a plugin. I don’t think I’ve seen one for that. It just needs to hook into comment.save.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#3 2022-12-21 16:25:21

zero
Member
From: Lancashire
Registered: 2004-04-19
Posts: 1,470
Website

Re: Smiley plugin?

Thanks Stef. I’ve been going on wikiloops and got used to their system for smilies and that’s what I was thinking about. It works well in encouraging interaction on there.

In the screenshot you’ll see the Post Compliment text box and to the right of it are 3 small icons, one of which is a yellow smiley. Just below it is the little window with black border full of smilies. You can see this because I clicked the yellow smiley. If I click any smiley, the code for it appears in the Post Compliment text box at the point where the cursor is. This gets converted as you can see in the comment below it.

I haven’t found a plugin for this either, and as you know, I’m clueless re plugins. Oh well.

Edit: the image is there but not showing here

Last edited by zero (2022-12-21 16:27:30)


BB6 Band My band
Gud One My blog

Offline

#4 2022-12-21 16:50:31

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,269
Website GitHub

Re: Smiley plugin?

Okay so it’s kind of like the way smd_textile_bar works. Click the H1 box and in goes the textile for h1. to make a heading. Except in this case you want to click a smiley in the toolbar, have it pop up a grid of presets and then you can click one to insert the code for it at the cursor position.

There is a way to add form types to the plugin. I wonder if a similar system could be employed to allow you to define a set of emoji or smileys that can be inserted.

Imagine you define a form called smd_textile_bar_emoji like this:

:) || Regular smiley || Ӓ
;) || Winking smiley || ӓ
...

Nothing to stop the plugin parsing that and offering it as an icon on the toolbar so you can click to select an emoji, which would insert the code from the last column into the text area. You could extend it at any time by adding more smileys to the form.

The only issue is this plugin is admin side only at the moment. Would need to think if it was worth extending it so the toolbar is available to commenters too. And whether it’s a stripped down commenting toolbox, or if it makes more sense to create a new plugin just for this feature.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#5 2022-12-21 19:25:45

zero
Member
From: Lancashire
Registered: 2004-04-19
Posts: 1,470
Website

Re: Smiley plugin?

Thanks for your thoughts Stef. Seeing as smilies have been around since before Textpattern and I couldn’t even find mention of such a plugin or desire for one, (unless I’ve missed it, which is why I posted) I would say that such a plugin might be of no use to 99% of txp users. So I won’t distract you from essential coding any longer. But thanks again for your consideration.

Writing comments is good for a person, anyway. That little bit more effort to express yourself, rather than click a smiley shows the author you are genuine, whereas a click might not do so, although sometimes a row of hearts says it all, when no words are needed. <3 <3 <3 <3


BB6 Band My band
Gud One My blog

Offline

#6 2022-12-21 20:54:18

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,595
Website

Re: Smiley plugin?

There are also javascript-based emoji picker plugins (https://picmojs.com of example). If you search for “emoji picker” you’ll find quite a few more.

Or you could also direct people to the OS’ own emoji picker. On Windows I’ve read its Windows button + . or Windows button + ; and on the Mac its CTRL + CMD + SPACE (https://www.howtogeek.com/351344/how-to-use-windows-10’s-new-emoji-picker-in-any-app/), or the dedicated fn key if it’s a newer keyboard (https://buffer.com/library/emojis-keyboard-shortcut-mac-windows/).


TXP Builders – finely-crafted code, design and txp

Offline

#7 2022-12-21 23:54:30

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,076
Website

Re: Smiley plugin?

Both iOS and android have build in shortcuts for all types of emoji build in. People use that all the time.

😂

Even I can use them.


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#8 2022-12-22 10:07:42

zero
Member
From: Lancashire
Registered: 2004-04-19
Posts: 1,470
Website

Re: Smiley plugin?

Thanks, I didn’t know that about windows, mac, android and ios. I’ll check out “emoji picker”. <thumbs up>


BB6 Band My band
Gud One My blog

Offline

#9 2022-12-22 14:17:07

zero
Member
From: Lancashire
Registered: 2004-04-19
Posts: 1,470
Website

Re: Smiley plugin?

FYI, I found this easy to install and hack simple-emoji-picker on Github. Problem solved! Thank you all for the help.


BB6 Band My band
Gud One My blog

Offline

Board footer

Powered by FluxBB