S
S
Sergey Maley2015-09-25 02:03:00
PHP
Sergey Maley, 2015-09-25 02:03:00

How to implement emoji in php site?

Good day.
I have a problem with connecting emoji to the site, that is, there are no problems, but the problem is in the output of the emoticons themselves, that is, in the encoding.
Actually I found the library on github, but nothing is clear.

This is the "example" that is on the github, but it's not clear what function plays its role.
48f7691942fd4b7597ab06319780a8b8.png

This is a variable that contains the text that will be written to the database. (the text is filtered for tags, quotes, and the like).
c9e630b3404444d4b96b6ed27557d2a9.png

This is how I already display the text from the database (the transofrm_text() function filters the text for the presence of #hastag )
945e78ed755b4b179c860c8bf1c47800.png

This is the result when I tried to add a smiley. But it gives me parameters from the database. Actually here is the problem .
77c3a55247024cd7935ad40e7b448f3d.png

How to deal with it? Thanks in advance.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
maddog670, 2015-09-25
@spesher

$clean_text = emoji_docomo_to_unified($_POST['wall_message']);
$html = emoji_unified_to_html($clean_text);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question