aboutsummaryrefslogblamecommitdiffstats
path: root/mod/smilies.php
blob: b22d0c6d2a7ceae656671557c009a98caf65a1b0 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
     











                                                                                                     
<?php

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);
	}
}