Exemple #1
0
?>
" dir="<?php 
echo $preview->getLanguageDir();
?>
" >
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta content="IE=8" http-equiv="X-UA-Compatible">
  <?php 
$preview->printScripts();
$preview->printCss();
?>
  <title>{#preview.preview_desc}</title>
</head>
<body xml:lang="<?php 
echo $preview->getLanguage();
?>
" style="display: none;">
  <form onsubmit="return false;" action="<?php 
echo $preview->getFormAction();
?>
" target="_self" method="post" enctype="multipart/form-data">
    <div id="content"><!-- Gets filled with editor contents --></div>
    <input type="hidden" id="data" name="data" value="" />
    <input type="hidden" id="token" name="<?php 
echo JCEToken::getToken();
?>
" value="1" />
  </form>
</body>
</html>
Exemple #2
0
 /**
  * Check the received token
  */
 function checkToken($method = 'POST')
 {
     $token = JCEToken::getToken();
     return JRequest::getVar($token, '', $method, 'alnum');
 }
Exemple #3
0
 /**
  * JCE WYSIWYG Editor - display the editor
  *
  * @vars string The name of the editor area
  * @vars string The content of the field
  * @vars string The width of the editor area
  * @vars string The height of the editor area
  * @vars int The number of columns for the editor area
  * @vars int The number of rows for the editor area
  * @vars mixed Can be boolean or array.
  */
 function onDisplay($name, $content, $width, $height, $col, $row, $buttons = true)
 {
     // Only add "px" to width and height if they are not given as a percentage
     if (is_numeric($width)) {
         $width .= 'px';
     }
     if (is_numeric($height)) {
         $height .= 'px';
     }
     $buttons = $this->_displayButtons($name, $buttons);
     $editor = '<textarea id="' . $name . '" name="' . $name . '" cols="' . $col . '" rows="' . $row . '" style="width:' . $width . ';height:' . $height . '" class="mceEditor">' . $content . '</textarea>' . "\n";
     $editor .= '<input type="hidden" id="jce_' . $name . '_token" name="' . JCEToken::getToken() . '" value="1" />' . "\n";
     $editor .= $buttons;
     return $editor;
 }