diff options
author | RedMatrix <info@friendica.com> | 2014-12-21 10:39:30 +1100 |
---|---|---|
committer | RedMatrix <info@friendica.com> | 2014-12-21 10:39:30 +1100 |
commit | aa7fac3266b1a7a1d1b8285b9c59b6a1095ae177 (patch) | |
tree | affab5245a8a8b351bf6f686604571b4a283a20d /mod | |
parent | e075c600d0a6a642da7af7393d55d05fea967119 (diff) | |
parent | fe80dbb3a73167b6297b3d645ee566f892c0b0ee (diff) | |
download | volse-hubzilla-aa7fac3266b1a7a1d1b8285b9c59b6a1095ae177.tar.gz volse-hubzilla-aa7fac3266b1a7a1d1b8285b9c59b6a1095ae177.tar.bz2 volse-hubzilla-aa7fac3266b1a7a1d1b8285b9c59b6a1095ae177.zip |
Merge pull request #748 from pafcu/smilyjson
Access list of smilies over JSON
Diffstat (limited to 'mod')
-rw-r--r-- | mod/smilies.php | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/mod/smilies.php b/mod/smilies.php index c47f95da7..b22d0c6d2 100644 --- a/mod/smilies.php +++ b/mod/smilies.php @@ -1,3 +1,15 @@ <?php -function smilies_content(&$a) { return smilies('',true); } +function smilies_content(&$a) { + if ($a->argv[1]==="json"){ + $tmp = list_smilies(); + $results = array(); + for($i = 0; $i < count($tmp['texts']); $i++) { + $results[] = array('text' => $tmp['texts'][$i], 'icon' => $tmp['icons'][$i]); + } + json_return_and_die($results); + } + else { + return smilies('',true); + } +} |