Friendica Communications Platform (please note that this is a clone of the repository at github, issues are handled there) https://friendi.ca
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

22 lines
427 B

  1. <?php
  2. /**
  3. * @file mod/smilies.php
  4. */
  5. use Friendica\App;
  6. use Friendica\Content\Smilies;
  7. function smiliesContent(App $a)
  8. {
  9. if ($a->argv[1] === "json") {
  10. $tmp = Smilies::getList();
  11. $results = array();
  12. for ($i = 0; $i < count($tmp['texts']); $i++) {
  13. $results[] = array('text' => $tmp['texts'][$i], 'icon' => $tmp['icons'][$i]);
  14. }
  15. json_return_and_die($results);
  16. } else {
  17. return Smilies::replace('', true);
  18. }
  19. }