XOOPS 2.5.6  Final
 All Classes Namespaces Files Functions Variables Pages
xoopscodes.php
Go to the documentation of this file.
1 <?php
20 defined('XOOPS_ROOT_PATH') or die('Restricted access');
21 
31 function xoopsCodeTarea($textarea_id, $cols = 60, $rows = 15, $suffix = null)
32 {
33  xoops_load('XoopsFormDhtmlTextArea');
34  $hiddenText = isset($suffix) ? 'xoopsHiddenText' . trim($suffix) : 'xoopsHiddenText';
35  $content = isset($GLOBALS[$textarea_id]) ? $GLOBALS[$textarea_id] : '';
36  $text_editor = new XoopsFormDhtmlTextArea('', $textarea_id, $content, $rows, $cols, $hiddenText);
37  $text_editor->htmlEditor = null;
38  $text_editor->smilies = false;
39  echo $text_editor->render();
40 }
41 
47 function xoopsSmilies($textarea_id)
48 {
50  $smiles = $myts->getSmileys(FALSE);
51  $count = count($smiles);
52  for($i = 0; $i < $count; $i ++) {
53  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\"' />";
54  }
55  echo "&nbsp;[<a href='#moresmiley' onmouseover='style.cursor=\"hand\"' alt='' onclick='openWithSelfMain(\"" . XOOPS_URL . "/misc.php?action=showpopups&amp;type=smilies&amp;target={$textarea_id}\",\"smilies\",300,475);'>" . _MORE . "</a>]";
56 }
58 ?>