Source for file editor.htmlarea2.php

Documentation is available at editor.htmlarea2.php

  1. <?php
  2. /**
  3. @package Mambo
  4. @author Mambo Foundation Inc see README.php
  5. @copyright Mambo Foundation Inc.
  6. *  See COPYRIGHT.php for copyright notices and details.
  7. @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see
  8. *  LICENSE.php
  9. *  Mambo is free software; you can redistribute it and/or
  10. *  modify it under the terms of the GNU General Public License
  11. *  as published by the Free Software Foundation; version 2 of the
  12. *  License.
  13. */ 
  14.  
  15. /** ensure this file is being included by a parent file */
  16. defined'_VALID_MOS' or die'Direct Access to this location is not allowed.' );
  17.  
  18. function initEditor({
  19.     global $mosConfig_live_site;
  20. ?>
  21. <script language="JavaScript1.2" type="text/JavaScript1.2">
  22. <!--
  23. _editor_url = '<?php echo $mosConfig_live_site?>/editor/htmlarea2/';          // URL to htmlarea files
  24. var win_ie_ver = parseFloat(navigator.appVersion.split("MSIE")[1]);
  25. if (navigator.userAgent.indexOf('Mac')        >= 0) { win_ie_ver = 0; }
  26. if (navigator.userAgent.indexOf('Windows CE') >= 0) { win_ie_ver = 0; }
  27. if (navigator.userAgent.indexOf('Opera')      >= 0) { win_ie_ver = 0; }
  28.  
  29. if (win_ie_ver >= 5.5) {
  30.     document.write('<scr' + 'ipt src="' +_editor_url+ 'editor.js"');
  31.     document.write(' language="Javascript1.2"></scr' + 'ipt>');
  32. } else {
  33.     document.write('<scr'+'ipt>function editor_generate() { return false; }</scr'+'ipt>');
  34. }
  35.  
  36. /** Wrapper around the editor specific update function in JavaScript
  37. */
  38. function updateEditorContents( editorName, newValue ) {
  39.     editor_setHTML( editorName, newValue );
  40. }
  41. //-->
  42. </script>
  43. <?php
  44. }
  45.  
  46. function editorArea$name$content$hiddenField$width$height$col$row {
  47. ?>
  48.     <textarea name="<?php echo $hiddenField?>" id="<?php echo $hiddenField?>" cols="<?php echo $col?>" rows="<?php echo $row?>" style="width:<?php echo $width?>; height:<?php echo $height?>"><?php echo $content?></textarea>
  49.     <script language="JavaScript1.2" defer="defer">
  50.     <!--
  51.     editor_generate('<?php echo $hiddenField ?>');
  52.     //-->
  53.     </script>
  54. <?php
  55. }
  56.  
  57. function getEditorContents$editorArea$hiddenField {
  58. }
  59. ?>

Documentation generated on Mon, 05 May 2008 16:19:16 +0400 by phpDocumentor 1.4.0