Emoji Setup in TinyMCE for OSCLASS

CodeGen

Active member
Elite
XNullUser
Joined
Oct 17, 2021
Messages
42
Reaction score
167
Points
33
NullCash
1,316
I'm sharing here my experience which could be helpful to someone else. If you need to add Emoji in Osclass, this would be helpful for you. If you think this was useful for you, please react and like for this post.

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

I used the Osclass version 4.4.0 which downloaded from https://osclass-classifieds.com/

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>

If you think this was useful for you, please react and like for this post. Thank you..!
 

wmwp

Active member
Elite
XNullUser
Joined
May 27, 2021
Messages
408
Reaction score
167
Points
43
NullCash
79
Thanks
 
Top