Line | |
---|
1 | <?php |
---|
2 | /** |
---|
3 | * @copyright 2005-2008 OpenPNE Project |
---|
4 | * @license http://www.php.net/license/3_01.txt PHP License 3.01 |
---|
5 | */ |
---|
6 | |
---|
7 | /** |
---|
8 | * 「[c:NNN]」形式の絵文字コードをHTML表示用に変換するアウトプットフィルタ |
---|
9 | */ |
---|
10 | function smarty_outputfilter_pne_display_emoji($tpl_output, &$smarty) |
---|
11 | { |
---|
12 | $list = array(); |
---|
13 | |
---|
14 | if (empty($GLOBALS['__Framework']['carrier'])) { |
---|
15 | // 置換用に文字列を退避 |
---|
16 | list($list, $tpl_output) = util_replace_patterns_to_marker($tpl_output, array('/<+.[^>]+>/is')); |
---|
17 | } |
---|
18 | |
---|
19 | // 絵文字変換 |
---|
20 | $tpl_output = emoji_convert($tpl_output); |
---|
21 | |
---|
22 | if (empty($GLOBALS['__Framework']['carrier'])) { |
---|
23 | // 退避した文字列を元に戻す |
---|
24 | $tpl_output = str_replace(array_keys($list), array_values($list), $tpl_output); |
---|
25 | } |
---|
26 | |
---|
27 | return $tpl_output; |
---|
28 | } |
---|
29 | |
---|
30 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.