From fe80dbb3a73167b6297b3d645ee566f892c0b0ee Mon Sep 17 00:00:00 2001 From: Stefan Parviainen Date: Sat, 20 Dec 2014 17:33:35 +0100 Subject: Access list of smilies over JSON --- mod/smilies.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'mod') 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 @@ 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); + } +} -- cgit v1.2.3