| 1: | <?php
|
| 2: | |
| 3: | |
| 4: | |
| 5: | |
| 6: | |
| 7: | |
| 8: | |
| 9: | |
| 10: | |
| 11: | |
| 12: | |
| 13: | |
| 14: | |
| 15: | |
| 16: | |
| 17: | |
| 18: |
|
| 19: | defined('XOOPS_ROOT_PATH') || exit('Restricted access');
|
| 20: |
|
| 21: | |
| 22: | |
| 23: |
|
| 24: |
|
| 25: | |
| 26: | |
| 27: | |
| 28: | |
| 29: | |
| 30: | |
| 31: | |
| 32: |
|
| 33: | function xoopsCodeTarea($textarea_id, $cols = 60, $rows = 15, $suffix = null)
|
| 34: | {
|
| 35: | xoops_load('XoopsFormDhtmlTextArea');
|
| 36: | $hiddenText = isset($suffix) ? 'xoopsHiddenText' . trim($suffix) : 'xoopsHiddenText';
|
| 37: | $content = isset($GLOBALS[$textarea_id]) ? $GLOBALS[$textarea_id] : '';
|
| 38: | $text_editor = new XoopsFormDhtmlTextArea('', $textarea_id, $content, $rows, $cols, $hiddenText);
|
| 39: | $text_editor->htmlEditor = null;
|
| 40: | $text_editor->smilies = false;
|
| 41: | echo $text_editor->render();
|
| 42: | }
|
| 43: |
|
| 44: | |
| 45: | |
| 46: | |
| 47: | |
| 48: |
|
| 49: | function xoopsSmilies($textarea_id)
|
| 50: | {
|
| 51: | $myts = \MyTextSanitizer::getInstance();
|
| 52: | $smiles = $myts->getSmileys(false);
|
| 53: | $count = count($smiles);
|
| 54: | for ($i = 0; $i < $count; ++$i) {
|
| 55: | echo "<img src='" . XOOPS_UPLOAD_URL . '/' . htmlspecialchars($smiles[$i]['smile_url'], ENT_QUOTES) . "' border='0' alt='' onclick='xoopsCodeSmilie(\"{$textarea_id}\", \" " . $smiles[$i]['code'] . " \");' onmouseover='style.cursor=\"hand\"' />";
|
| 56: | }
|
| 57: | echo " [<a href='#moresmiley' onmouseover='style.cursor=\"hand\"' alt='' onclick='openWithSelfMain(\"" . XOOPS_URL . "/misc.php?action=showpopups&type=smilies&target={$textarea_id}\",\"smilies\",300,475);'>" . _MORE . '</a>]';
|
| 58: | }
|
| 59: |
|
| 60: | |