PHP Classes

PHP Emoji Library: Convert text to HTML replacing Emojis with images

Recommend this page to a friend!
  Info   View files Documentation   View files View files (15)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 84 All time: 9,977 This week: 189Up
Version License PHP version Categories
php-emoji-library 1.0The PHP License5HTML, PHP 5, Graphics, Text processing
Description 

Author

This class can convert text to HTML, replacing Emojis with images.

It can take a given text and convert it to HTML.

The class can also replace Emoji text sequences with associated image icons.

This package also provides the Emoji icon image files.

Picture of Melih Berat SANLI
Name: Melih Berat SANLI <contact>
Classes: 3 packages by
Country: Turkey Turkey
Age: 25
All time rank: 423880 in Turkey Turkey
Week rank: 658 Up13 in Turkey Turkey Up

Documentation

<?php require("../lib/emoji.php"); // New Directory mbsEmoji::attr("directory", "emoticons/"); ?> <!DOCTYPE html> <html> <head> <title>MBS Emojis</title> </head> <body> <?php $text = "Merhaba dŁnya nas?ls?n ben bu aralar pek iyi de?ilim :( veya iyim ya :))"; echo mbsEmoji::using($text); ?> </body> </html>

Details

Emoji

Import the library

include "lib/emoji.php";

Using the library

mbsEmoji::using($TEXT);

Definition Theme

mbsEmoji::attr('theme', '< img src="%s" alt="%s" class="my_emoji">'); 

Please using two %s

Defination Directory

mbsEmoji::attr('directory', 'your/image/file/'); 

Defination Your Smiles

$yourSmiles = array( 'xD' => 'eksdi.png' );
mbsEmoji::attr('smiles', $yourSmiles);

  • Make definitions before mbsEmoji::using()

  Files folder image Files  
File Role Description
Files folder imageEmoji (1 file, 2 directories)
Accessible without login Plain text file .travis.yml Data Auxiliary data
Accessible without login Plain text file README.rst Doc. Documentation

  Files folder image Files  /  Emoji  
File Role Description
Files folder imagedemo (1 file, 1 directory)
Files folder imagelib (1 file)
  Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  Emoji  /  demo  
File Role Description
Files folder imageemoticons (10 files)
  Accessible without login Plain text file index.php Doc. Example script

  Files folder image Files  /  Emoji  /  demo  /  emoticons  
File Role Description
  Accessible without login Image file angry.png Icon Icon image
  Accessible without login Image file cry.png Icon Icon image
  Accessible without login Image file devil.png Icon Icon image
  Accessible without login Image file kiss.png Icon Icon image
  Accessible without login Image file laugh.png Icon Icon image
  Accessible without login Image file love.png Icon Icon image
  Accessible without login Image file sad.png Icon Icon image
  Accessible without login Image file sleepy.png Icon Icon image
  Accessible without login Image file smile.png Icon Icon image
  Accessible without login Image file wink.png Icon Icon image

  Files folder image Files  /  Emoji  /  lib  
File Role Description
  Plain text file emoji.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:84
This week:0
All time:9,977
This week:189Up