[ Index ]

PHP Cross Reference of Mambo 4.6.5

[ Variables ]     [ Functions ]     [ Classes ]     [ Constants ]     [ Statistics ]

title

Body

[close]

/editor/ -> editor.php (source)

   1  <?php
   2  /**
   3  * @package Mambo
   4  * @author Mambo Foundation Inc see README.php
   5  * @copyright (C) 2000 - 2009 Mambo Foundation Inc.
   6  * See COPYRIGHT.php for copyright notices and details.
   7  * @license GNU/GPL Version 2, see LICENSE.php
   8  *
   9  * Redistributions of files must retain the above copyright notice.
  10  *
  11  * Mambo is free software; you can redistribute it and/or
  12  * modify it under the terms of the GNU General Public License
  13  * as published by the Free Software Foundation; version 2 of the License.
  14  */
  15  
  16  /** ensure this file is being included by a parent file */
  17  defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
  18  
  19  if (!defined( '_MOS_EDITOR_INCLUDED' )) {
  20      $_MAMBOTS->loadBotGroup( 'editors' );
  21      $_MAMBOTS->loadBotGroup( 'editors-xtd' );
  22  
  23  	function initEditor() {
  24          static $initiated;
  25          global $_MAMBOTS;
  26          
  27          if (!$initiated){
  28              $results = $_MAMBOTS->trigger( 'onInitEditor' );
  29              foreach ($results as $result) {
  30                  if (trim($result)) {
  31                      echo $result;
  32                  }
  33              }
  34              $initiated = true;
  35          }
  36      }
  37  	function getEditorContents( $editorArea, $hiddenField ) {
  38          global $_MAMBOTS;
  39  
  40          $results = $_MAMBOTS->trigger( 'onGetEditorContents', array( $editorArea, $hiddenField ) );
  41          foreach ($results as $result) {
  42              if (trim($result)) {
  43                  echo $result;
  44              }
  45          }
  46      }
  47      // just present a textarea
  48  	function editorArea( $name, $content, $hiddenField, $width, $height, $col, $row ) {
  49          global $_MAMBOTS;
  50  
  51          $results = $_MAMBOTS->trigger( 'onEditorArea', array( $name, $content, $hiddenField, $width, $height, $col, $row ) );
  52          foreach ($results as $result) {
  53              if (trim($result)) {
  54                  echo $result;
  55              }
  56          }
  57      }
  58      define( '_MOS_EDITOR_INCLUDED', 1 );
  59  }
  60  ?>