Emojis stop working

General discussions related to php

Moderators: gesf, Michalio

Post Reply
thesunlover
New php-forum User
New php-forum User
Posts: 16
Joined: Mon Apr 18, 2022 1:06 pm

Hi,

I've got a new issue: Emoji symbols were working but stop working. When input ":)" in a message, it display ":)" instead of a smiling face.

Any idea? Thank you!
User avatar
Michalio
Moderator
Moderator
Posts: 130
Joined: Sun Jul 18, 2021 1:33 pm
Location: Poland

Can you tell more about your code? If I remember correctly you are using discuz board engine, is it related to this?
What changes do you did since it was working?
Free coding lessons: https://php-forum.com/phpforum/viewtopic.php?t=29852
thesunlover
New php-forum User
New php-forum User
Posts: 16
Joined: Mon Apr 18, 2022 1:06 pm

Hi Michalio, Thank you for your reply. It was working before but I dont' know when the issue started (for sure before PHP upgrade). Now the web has been upgraded to be compatible with PHP 8 and works fine seemingly other than this minor issue.
User avatar
Michalio
Moderator
Moderator
Posts: 130
Joined: Sun Jul 18, 2021 1:33 pm
Location: Poland

If you upgraded the engine then the configuration may change and you need to enable emoji or the support was moved to a plugin
Free coding lessons: https://php-forum.com/phpforum/viewtopic.php?t=29852
thesunlover
New php-forum User
New php-forum User
Posts: 16
Joined: Mon Apr 18, 2022 1:06 pm

How and where can I enable emoji? Thanks.
User avatar
Michalio
Moderator
Moderator
Posts: 130
Joined: Sun Jul 18, 2021 1:33 pm
Location: Poland

Did you saw this?https://addon.dismall.com/plugins/emoji.html
Will it solve your problem?
Free coding lessons: https://php-forum.com/phpforum/viewtopic.php?t=29852
thesunlover
New php-forum User
New php-forum User
Posts: 16
Joined: Mon Apr 18, 2022 1:06 pm

This solution is for phone using emoji. My issue is with web forum.

Thanks.
User avatar
Michalio
Moderator
Moderator
Posts: 130
Joined: Sun Jul 18, 2021 1:33 pm
Location: Poland

Dizcuz is an chinese script, their website and documentation is in chinese, so I am not able to search for the solution.
So try to use grep command to find any emoji such as smile, post the code then we will be able to help you
Free coding lessons: https://php-forum.com/phpforum/viewtopic.php?t=29852
thesunlover
New php-forum User
New php-forum User
Posts: 16
Joined: Mon Apr 18, 2022 1:06 pm

Thanks a lot Michalio for your helpful hint! :) :) :)

The issue is solved by replacing smileoff with smileon. See this:


# diff viewthread.php viewthread.php.2022-05-30
314c314
< $post['message'] = postify($post['message'], $post['smileyon'], $post['bbcodeon'], $forum['allowsmilies'], $forum['allowhtml'],
---
> $post['message'] = postify($post['message'], $post['smileyoff'], $post['bbcodeon'], $forum['allowsmilies'], $forum['allowhtml'],
linorrolton
New php-forum User
New php-forum User
Posts: 11
Joined: Tue Oct 19, 2021 4:47 am

Thanks for this solution!
User avatar
Michalio
Moderator
Moderator
Posts: 130
Joined: Sun Jul 18, 2021 1:33 pm
Location: Poland

I think you should review what $post contains, because this was second issue where the bad key is used and other things may also not working
Free coding lessons: https://php-forum.com/phpforum/viewtopic.php?t=29852
Post Reply