This topic contains a post which is marked as Best Answer. Press here if you would like to see it.
*

ALSK

  • **
  • 8 posts
Insert emoji in to TinyMCE in Osclass version 4.4.0
« on: May 31, 2021, 11:05:50 AM »
Dears,

I downloaded Osclass 4.4.0 version from your download section and tried to use it in WAMP. It worked well and need some of your expert advice to enable emoji in TinyMCE. Though I'm not a developer, I enable that option in menu bar and some changes in database was also done for Unicode as adviced in online articles.

Now my problem is, it always send only "question" ?? marks in to database and also on item page. I struggled a lot ;) as a normal user and now I need an advice from an expert here. I think that some of other personals here also would be like to have it.

Thanks in advance..

*

MB Themes

Re: Insert emoji in to TinyMCE in Osclass version 4.4.0
« Reply #1 on: May 31, 2021, 08:22:51 PM »
@ALSK
Emoji require charset change in table, column as well as connection. Not all of these can be performed easily and that is reason why it is not enabled.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

ALSK

  • **
  • 8 posts
Re: Insert emoji in to TinyMCE in Osclass version 4.4.0
« Reply #2 on: June 01, 2021, 03:25:51 PM »
@MB Themes

Except "connection" related matter, I had done all the things that you mentioned above. Based on your reply, I checked the "DBConnectionClass.php" file in oc-includes\osclass\classes\database and did following changes.

Line 300 : $this->_setCharset('utf8', $this->db);
Line 342 : $this->_setCharset('utf8', $this->metadataDb);

changed as

Line 300 : $this->_setCharset('utf8mb4', $this->db);
Line 342 : $this->_setCharset('utf8mb4', $this->metadataDb);

As of now emoji is working fine (don't know any other issues there yet ;) will see). Thank you very much for your reply and really appreciate it.

*

MB Themes

Re: Insert emoji in to TinyMCE in Osclass version 4.4.0
« Reply #3 on: June 01, 2021, 08:30:09 PM »
@ALSK
Sounds good, if you wish you may write complete guide what to do, many people would be grateful ;)
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

Marked as best answer by frosticek on June 18, 2021, 10:08:37 AM
*

ALSK

  • **
  • 8 posts
Re: Insert emoji in to TinyMCE in Osclass version 4.4.0
« Reply #4 on: June 18, 2021, 08:12:36 AM »
Database Related Changes

Step 1, change your database's default charset as CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci
Step 2, set same charset for "item_description" table
Step 3, Open "DBConnectionClass.php" located in "oc-includes\osclass\classes\database\". Search for "$this->_setCharset('utf8', $this->db);" and change it as "$this->_setCharset('utf8mb4', $this->db);"

Emoji Setup in TinyMCE

Step 4, Open "functions.php" located in "oc-includes\osclass\". Search for this "selector: 'textarea[name^="description["]',". Below to that you can see "plugins : [". Add emoticons in to plugin section. IE : "insertdatetime media table paste autoresize emoticons"

Now you can enable TinyMCE in oc-admin panel (Listings > Settings)

Addition to above, I wanted to change menu in TinyMCE. So I did following change too in functions.php (file mentioned in 4th Step)

Same section in that "functions.php" file,

          $(editor.getElement()).trigger('change');
        });
      }
    });
  </script>

Changed as,

          $(editor.getElement()).trigger('change');
        });
      },
      menubar: "false",
      toolbar: "paste pastetext charmap emoticons | undo redo | bold italic underline forecolor"
    });
  </script>
« Last Edit: June 18, 2021, 08:14:58 AM by ALSK »

*

MB Themes

Re: Insert emoji in to TinyMCE in Osclass version 4.4.0
« Reply #5 on: June 18, 2021, 10:08:29 AM »
Nice, thanks ;)
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

Re: Insert emoji in to TinyMCE in Osclass version 4.4.0
« Reply #6 on: October 14, 2021, 02:21:06 PM »
hello I'm new here, can I get help with emoji insertion on the text?  Thank you

*

MB Themes

Re: Insert emoji in to TinyMCE in Osclass version 4.4.0
« Reply #7 on: October 14, 2021, 03:10:22 PM »
Just read this topic, everything looks to be explained here.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

7ala

  • ****
  • 144 posts
Re: Insert emoji in to TinyMCE in Osclass version 4.4.0
« Reply #8 on: January 26, 2022, 08:25:54 AM »
welcome
Unfortunately it does not support RTL

*

MB Themes

Re: Insert emoji in to TinyMCE in Osclass version 4.4.0
« Reply #9 on: January 26, 2022, 08:52:15 AM »
@7ala
I would guess its just about 1-2 lines of css.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

mwindey

  • *****
  • 465 posts
Re: Insert emoji in to TinyMCE in Osclass version 4.4.0
« Reply #10 on: June 08, 2022, 12:04:16 PM »
Even more interesting is instant messaging with emojis ... Can this be accomplished by the superhero of MB Themes?
 :) I would definitely pay extra for that...

*

MB Themes

Re: Insert emoji in to TinyMCE in Osclass version 4.4.0
« Reply #11 on: June 08, 2022, 12:46:13 PM »
Obce everything is on that charset, you can put emoji directly from your mobile keyboard.
At osclasspoint we use mapping of common shortcuta to images that is simpler way if you do not want to break something  8)
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Ajit Sahane

  • ****
  • 147 posts
  • https://bestclassifiedsusa.com
Re: Insert emoji in to TinyMCE in Osclass version 4.4.0
« Reply #12 on: March 20, 2023, 09:59:35 AM »
I am try all above steps but some error happen while change in phpmyadmin db Collation format.

check attached img.


How to fix this..?

*

MB Themes

Re: Insert emoji in to TinyMCE in Osclass version 4.4.0
« Reply #13 on: March 20, 2023, 11:42:08 PM »
Try to drop index first and then recreate it
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Ajit Sahane

  • ****
  • 147 posts
  • https://bestclassifiedsusa.com
Re: Insert emoji in to TinyMCE in Osclass version 4.4.0
« Reply #14 on: March 21, 2023, 05:08:51 AM »
Thanks, its worked.

So, follow these steps.

Database Related Changes

Step 1, change your database's default charset as CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci
Step 2, set same charset for "item_description" table
Step 3, Open "DBConnectionClass.php" located in "oc-includes\osclass\classes\database\". Search for "$this->_setCharset('utf8', $this->db);" and change it as "$this->_setCharset('utf8mb4', $this->db);"


Now you are done 50% job rest is --   Database changes required to fully working

Open phpmyadmin --->  select osclass database ---->  click -- item_descrption table   ---->   click structure view  --->  check  below Indexes  ---->  2nd number s_description  --->  click drop ---> OK

Now you can change utf8_general_ci  collection for s_description & s_title  ---  without drop index its not possible - you face sql query error - so 1st  drop index then we recreate full index.

Next --->   Now , you have successfully changed utf8mb4_unicode_ci  collection type.

then click on top menu SQL ( just like structure view )

SQL query box open -->

enter this sql query carefully,

CREATE FULLTEXT INDEX s_description ON xyz_t_item_description(s_description,s_title)    then edit mode

replace xyz   to your real table name like oc_t_item_description(s_description,s_title)  check your table name xyz & oc_  is example just.

after query edit done --->  GO   

you got successfully query executed green message

Then verify again -  click structure view   --->  check indexes ---->  if its show like attached img then it Okay.

Now almost done.  still you need to check all tables where title & description or any other ad banners etc content shows -  check collection type and modify utf8_general_ci   to utf8mb4_unicode_ci .

Mostly you need to change this,  meta title, meta category , banners , preferences etc table. Where you wish to include emojis.

Now everywhere emoji's working fine.
 

Only old tinymce editor need some addition for emojis otherwise copy paste emoji symbols direct working.

And <meta charset="utf-8">   or  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />   both working.

complementary you can add 2 more lines in config.php file  after

define('DB_HOST', 'localhost:3306');  this line

define('DB_CHARSET', 'utf8mb4');

define('DB_COLLATE', 'utf8mb4_unicode_ci');

( This is optional , hope MB team can tell us more for this )

phpmyadmin table list -  If you want everywhere all website Text content area emoji support then following table need to convert from  utf8_general_ci   to utf8mb4_unicode_ci       -  once done all - 100% emoji support full website.  [ Advance TASK - be careful - take a database full backup before doing this ]

1) ais_category_meta  -  s_title & s_description
2) ais_item_meta  -  s_title & s_description
3) ais_pages_meta  - s_title & s_description
4) ais_region_meta  - s_title & s_description
5) ba_advert -  s_code
6) faq_item_locale - s_title & s_description
7) im_messages -  s_message
8) item_comment - s_title & s_body
9) item_description - s_title & s_description
10) osp_banner -  s_code & s_comment
11) preference - e_type
12) user_description - s_info
13) user_rating_ur - s_comment
14) widget - s_content
Now emoji showing.
« Last Edit: May 26, 2023, 05:17:11 PM by Ajit Sahane »