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.
 
 
 
 
 
 

21 lines
417 B

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