3 * @file mod/smilies.php
6 use Friendica\Content\Smilies;
7 use Friendica\Core\System;
12 * @throws \Friendica\Network\HTTPException\InternalServerErrorException
14 function smilies_content(App $a)
16 $smilies = Smilies::getList();
17 if (!empty($a->argv[1]) && ($a->argv[1] === "json")) {
19 for ($i = 0; $i < count($smilies['texts']); $i++) {
20 $results[] = ['text' => $smilies['texts'][$i], 'icon' => $smilies['icons'][$i]];
22 System::jsonExit($results);
24 $s = '<div class="smiley-sample">';
25 for ($x = 0; $x < count($smilies['texts']); $x ++) {
26 $s .= '<dl><dt>' . $smilies['texts'][$x] . '</dt><dd>' . $smilies['icons'][$x] . '</dd></dl>';