This commit is contained in:
Mario Vavti
2025-04-09 14:22:23 +02:00
20 changed files with 46 additions and 16 deletions

View File

@@ -0,0 +1,17 @@
# Custom site emojis
Create a file called custom_emojis.json and add your custom emojis to this folder (or anywhere else you like).
The content of custom_emojis.json should look as follows:
```
{
"some_emoji": {
"shortname": ":some_emoji:",
"filepath": "images/emoji/custom/some_emoji.png"
},
"another_emoji": {
"shortname": ":another_emoji:",
"filepath": "images/emoji/custom/another_emoji.png"
},
}
```

View File

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

View File

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

View File

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

View File

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

View File

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

View File

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

View File

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 582 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -1272,25 +1272,38 @@ function sslify($s) {
function get_emojis() {
$emojis = [
// Reactions (emojitwo emojis)
'astonished_face' => ['shortname' => ':astonished_face:', 'filepath' => 'images/emoji/astonished_face.png'],
'bottle_with_popping_cork' => ['shortname' => ':bottle_with_popping_cork:', 'filepath' => 'images/emoji/bottle_with_popping_cork.png'],
'clapping_hands' => ['shortname' => ':clapping_hands:', 'filepath' => 'images/emoji/clapping_hands.png'],
'disappointed_face' => ['shortname' => ':disappointed_face:', 'filepath' => 'images/emoji/disappointed_face.png'],
'grinning_face' => ['shortname' => ':grinning_face:', 'filepath' => 'images/emoji/grinning_face.png'],
'kiss_mark' => ['shortname' => ':kiss_mark:', 'filepath' => 'images/emoji/kiss_mark.png'],
'red_heart' => ['shortname' => ':red_heart:', 'filepath' => 'images/emoji/red_heart.png'],
'sleeping_face' => ['shortname' => ':sleeping_face:', 'filepath' => 'images/emoji/sleeping_face.png'],
'slightly_smiling_face' => ['shortname' => ':slightly_smiling_face:', 'filepath' => 'images/emoji/slightly_smiling_face.png'],
'smiling_face_with_halo' => ['shortname' => ':smiling_face_with_halo:', 'filepath' => 'images/emoji/smiling_face_with_halo.png'],
'smiling_face_with_horns' => ['shortname' => ':smiling_face_with_horns:', 'filepath' => 'images/emoji/smiling_face_with_horns.png'],
'winking_face_with_tongue' => ['shortname' => ':winking_face_with_tongue:', 'filepath' => 'images/emoji/winking_face_with_tongue.png'],
'astonished_face' => ['shortname' => ':astonished_face:', 'filepath' => 'images/emoji/emojitwo/astonished_face.png'],
'bottle_with_popping_cork' => ['shortname' => ':bottle_with_popping_cork:', 'filepath' => 'images/emoji/emojitwo/bottle_with_popping_cork.png'],
'clapping_hands' => ['shortname' => ':clapping_hands:', 'filepath' => 'images/emoji/emojitwo/clapping_hands.png'],
'disappointed_face' => ['shortname' => ':disappointed_face:', 'filepath' => 'images/emoji/emojitwo/disappointed_face.png'],
'grinning_face' => ['shortname' => ':grinning_face:', 'filepath' => 'images/emoji/emojitwo/grinning_face.png'],
'kiss_mark' => ['shortname' => ':kiss_mark:', 'filepath' => 'images/emoji/emojitwo/kiss_mark.png'],
'red_heart' => ['shortname' => ':red_heart:', 'filepath' => 'images/emoji/emojitwo/red_heart.png'],
'sleeping_face' => ['shortname' => ':sleeping_face:', 'filepath' => 'images/emoji/emojitwo/sleeping_face.png'],
'slightly_smiling_face' => ['shortname' => ':slightly_smiling_face:', 'filepath' => 'images/emoji/emojitwo/slightly_smiling_face.png'],
'smiling_face_with_halo' => ['shortname' => ':smiling_face_with_halo:', 'filepath' => 'images/emoji/emojitwo/smiling_face_with_halo.png'],
'smiling_face_with_horns' => ['shortname' => ':smiling_face_with_horns:', 'filepath' => 'images/emoji/emojitwo/smiling_face_with_horns.png'],
'winking_face_with_tongue' => ['shortname' => ':winking_face_with_tongue:', 'filepath' => 'images/emoji/emojitwo/winking_face_with_tongue.png'],
'facepalm' => ['shortname' => ':facepalm:', 'filepath' => 'images/emoticons/smiley-facepalm.gif'],
'hubzilla' => ['shortname' => ':hubzilla:', 'filepath' => 'images/hubzilla.png']
// Hubzilla custom
'facepalm' => ['shortname' => ':facepalm:', 'filepath' => 'images/emoji/hubzilla/smiley-facepalm.gif'],
'hubzilla' => ['shortname' => ':hubzilla:', 'filepath' => 'images/emoji/hubzilla/hubzilla.png']
];
// Provided by addon
call_hooks('get_emojis', $emojis);
// Custom site emojis
$custom_json_path = 'images/emoji/custom/custom_emojis.json';
if (file_exists($custom_json_path)) {
$custom_json = file_get_contents($custom_json_path);
$custom_arr = json_decode($custom_json, true);
if ($custom_arr) {
$emojis = array_merge($emojis, $custom_arr);
}
}
return $emojis;
}

View File

@@ -162,7 +162,7 @@
<div class="row g-0">
{{foreach $item.reactions as $react}}
<div class="col-3 p-2">
<a class="" href="#" onclick="jotReact({{$item.id}},'{{$react}}'); return false;"><img class="menu-img-1" src="/images/emoji/{{$react}}.png" alt="{{$react}}" /></a>
<a class="" href="#" onclick="jotReact({{$item.id}},'{{$react}}'); return false;"><img class="menu-img-1" src="/images/emoji/emojitwo/{{$react}}.png" alt="{{$react}}" /></a>
</div>
{{/foreach}}
</div>

View File

@@ -167,7 +167,7 @@
<div class="row g-0">
{{foreach $item.reactions as $react}}
<div class="col-3 p-2">
<a class="" href="#" onclick="jotReact({{$item.id}},'{{$react}}'); return false;"><img class="menu-img-1" src="/images/emoji/{{$react}}.png" alt="{{$react}}" /></a>
<a class="" href="#" onclick="jotReact({{$item.id}},'{{$react}}'); return false;"><img class="menu-img-1" src="/images/emoji/emojitwo/{{$react}}.png" alt="{{$react}}" /></a>
</div>
{{/foreach}}
</div>