3 * @file mod/smilies.php
6 use Friendica\Content\Smilies;
7 use Friendica\Core\System;
10 * @param object $a App
13 function smilies_content(App $a)
15 $smilies = Smilies::getList();
16 if (!empty($a->argv[1]) && ($a->argv[1] === "json")) {
18 for ($i = 0; $i < count($smilies['texts']); $i++) {
19 $results[] = ['text' => $smilies['texts'][$i], 'icon' => $smilies['icons'][$i]];
21 System::jsonExit($results);
23 $s = '<div class="smiley-sample">';
24 for ($x = 0; $x < count($smilies['texts']); $x ++) {
25 $s .= '<dl><dt>' . $smilies['texts'][$x] . '</dt><dd>' . $smilies['icons'][$x] . '</dd></dl>';