- PHP 44.3%
- JavaScript 36.8%
- Shell 8.2%
- CSS 5.9%
- HTML 4.8%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| config | ||
| emoji | ||
| event | ||
| language | ||
| migrations | ||
| styles/all | ||
| tests | ||
| .gitignore | ||
| build-release.sh | ||
| composer.json | ||
| ext.php | ||
| LICENSE | ||
| LICENSE-TWEMOJI-GRAPHICS | ||
| README.md | ||
Twemoji (phpBB)
This extension adds a modern, local Twemoji picker to the phpBB posting editor. It ships with a Twemoji SVG set stored on the forum server, so rendered emoji do not depend on the public CDN.
Install
- Copy this extension into your phpBB installation as
ext/bobmaster/twemoji. - In the phpBB ACP, enable Twemoji.
Settings
In ACP → General → Board features, set Hide default smilies (Twemoji):
- Yes (default): hide the default phpBB smilies list and “View more smilies” link in posting and private message editors.
- No: show the default smilies alongside the Twemoji picker.
Users can override this in User Control Panel → Board preferences → Edit global settings → Hide default smilies (Twemoji). The default, Follow administrator setting, follows the current board configuration; Hide hides the list and Show shows it for that user. Guests follow the administrator setting.
This controls editor visibility only; existing posts are unaffected.
When upgrading, disable the extension, replace its files, then re-enable it to apply migrations. Purge the phpBB cache afterwards. Do not delete the extension data when upgrading.
Add or replace emoji
Emoji files are loaded from:
ext/bobmaster/twemoji/styles/all/theme/images/emoji/
To replace the placeholder set with a full pack (e.g., Twemoji SVGs):
- Copy your SVG/PNG files into that folder.
- Update
ext/bobmaster/twemoji/emoji/emoji.jsonwith the new filenames, Unicode codes, and uniqueshortcodevalues such as:red_heart:. Use the fully qualified sequences from Unicode Emoji 17.0 forcode, includingU+FE0Fwhere specified. Keepemoji/emoji.phpsynchronized and preserve existing shortcodes and the original Twemoji image filenames. Purge the phpBB cache to register new shortcodes with the formatter.
Notes
- Type
:at the start of a word to open emoji suggestions, then keep typing to filter (for example,:roc,:thumbs_up, or:thumbsup). Use Up/Down and Enter, or click/tap a result, to insert its complete text shortcode, such as:rocket:or:thumbs_up:. Escape dismisses suggestions; Tab keeps its normal focus behavior. - Both the picker and autocomplete insert readable shortcodes in the textarea. phpBB renders them as local SVG images in previews and posts, and restores the same shortcodes when editing or quoting. The closing colon is required; unknown shortcodes and shortcodes inside code blocks stay as text.
- Emoji image URLs are generated on the server using the bundled assets, so post and preview rendering needs neither the emoji CDN nor JavaScript. Existing Unicode emoji continue to use phpBB's emoji parser and local images. The formatter respects phpBB's smilies settings.
- Suggestions work in posting, private message, and signature editors where smilies are allowed, plus quick reply when smilies are enabled. They stay closed inside BBCode tags and code, URL, image, email, flash, and attachment blocks. Ordinary URLs and times do not trigger suggestions.
- Search uses English emoji names, with a few common aliases such as
:smile,:joy,:+1, and:heart. Spaces in names can be typed as underscores. UI labels are translated; emoji names are English. - The picker and suggestions share one emoji manifest download, loaded on demand when either is first used. The picker lazy-loads images as they scroll into view; autocomplete shows at most eight matches.
- Search uses the English short names from Unicode Emoji 17.0, so terms like
rocket,thumbs up,red heart, andtaiwanwork. - Shortcodes map to fully qualified Unicode Emoji 17.0 sequences in the formatter. Existing Twemoji-specific entries are retained.
- Assets are provided under
styles/allto work with any style. - The UI is injected into the posting editor via template events, so it survives core updates.
- Emoji assets imported from Twemoji v17.0.2.
- Twemoji graphics license is included in
LICENSE-TWEMOJI-GRAPHICS.
License
The extension code is licensed under the GNU General Public License, version 2 only (GPL-2.0-only). See LICENSE for the full text.
Twemoji graphics by Twitter and other contributors. The bundled graphics are sourced from jdecked/twemoji, v17.0.2 and are licensed separately under Creative Commons Attribution 4.0 International (CC-BY-4.0). See LICENSE-TWEMOJI-GRAPHICS for the full license text and disclaimer of warranties.
This attribution is also included in styles/all/theme/twemoji-localize.js, which is loaded on forum pages. Keep the graphics attribution and license notices when redistributing the extension or its graphics, and indicate any modifications you make to the graphics.