[ Index ]

PHP Cross Reference of Mambo 4.6.5

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

title

Body

[close]

/administrator/components/com_mostlyce/ -> admin.mostlyce.html.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  class HTML_expConfig {
  20  
  21          function showconfig( &$row, &$lists, $option) {
  22                  global $mosConfig_absolute_path, $mosConfig_live_site, $mosConfig_lang;
  23                  $tabs = new mosTabs(0);
  24                  
  25                  if (!file_exists("$mosConfig_absolute_path/mambots/editors/mostlyce/jscripts/tiny_mce/info/editor_info_$mosConfig_lang.php")) {
  26                      $editor_info_lang = "english";
  27                  } else {
  28                      $editor_info_lang = "$mosConfig_lang";
  29                  }
  30                  
  31                  //Setup version information so we can decide which tooltip library to utilize
  32                  if (file_exists($mosConfig_absolute_path.'includes/version.php')) {
  33                      require_once ($mosConfig_absolute_path.'includes/version.php');
  34                      $_VERSION =& new version();
  35                      $version = (float) $_VERSION->RELEASE;
  36                  } else {
  37                      //Unsupported Mambo version.  MOStlyCE 2.0+ is for Mambo 4.6+.
  38                      $version = 0;
  39                  }
  40                  
  41                  //Build version specific tooltip statement
  42                  if ($version>=4.7) {
  43                      mosCommonHTML::loadPrototype();
  44                      mosCommonHTML::loadToolTip();
  45                      $lib = 'prototype';
  46                  } else {
  47                      mosCommonHTML::loadOverlib();
  48                      $lib = 'overlib';
  49                  }
  50  
  51                  ?>
  52                  <?php 
  53                  if ($version < 4.6) {
  54                      echo '<span style="color: red;font-size: 1.5em;">'.T_('Warning: This version of MOStlyCE is not support in Mambo versions less than 4.6!').'</span>';
  55                  }
  56                  ?>
  57                  <table class="adminheading">
  58                  <tr>
  59                          <th class="config">
  60                          <?php echo T_('MOStlyCE Configuration :'); ?>
  61                          <span class="componentheading">
  62                          <?php echo T_('mostlyce_config.php is :'); ?>
  63                           <?php echo is_writable( '../mambots/editors/mostlyce/jscripts/tiny_mce/mostlyce_config.php' ) ? '<span style="color: green;font-weight:bold;">'.T_('Writeable').'</span>' : '<span style="color: red;font-weight:bold;">'.T_('Unwriteable').'</span>'?>
  64                          </span>
  65                          </th>
  66                  </tr>
  67                  </table>
  68                  <script type="text/javascript">
  69                  function submitbutton(pressbutton) {
  70                          var form = document.adminForm;
  71                          if (pressbutton == 'save') {
  72                                  //if (confirm ("Are you sure?")) {
  73                                  submitform( pressbutton );
  74                                  //}
  75                          } else {
  76                                  document.location.href = 'index2.php';
  77                          }
  78                  }
  79                  </script>
  80                  <form action="index2.php" method="post" name="adminForm">
  81                  <?php
  82                  $tabs->startPane("mosCE");
  83                  $tabs->startTab(T_('General'),"editor_options");
  84                  ?>
  85                  <table class="adminform">
  86                  <tr>
  87                      <td colspan="2"><?php echo sprintf(T_('The URL specified in $mosConfig_live_site in configuration.php is <strong>%s</strong><br />You <strong>MUST</strong> access this site from this <strong>exact URL</strong> when editing content.'),$mosConfig_live_site); ?>
  88                  </tr>
  89                  <tr>
  90                          <td>
  91                          <?php echo T_('Editor Themes'); ?>:
  92                          </td>
  93                          <td><?php echo $lists['editor_themes'];?></td>
  94                  </tr>
  95                  <tr>
  96                          <td>
  97                          <?php echo T_('Editor Compression'); ?>:
  98                          </td>
  99                          <td><?php 
 100                              echo $lists['editor_compression'];
 101                              $tip = T_('Turning compression on enables the TinyMCE compressor. This reduces traffic and speeds up the editor by up to 75%. NOTE: This has no effect when zlib compression has already been enabled on the server.');
 102                              echo mosToolTip($tip, 'editor_lang', '', 'tooltip.png', '', '#', $lib);
 103                              ?>
 104                          </td>
 105                  </tr>
 106                  <tr>
 107                          <td>
 108                          <?php echo T_('Editor Language'); ?>:
 109                          </td>
 110                          <td><?php 
 111                              echo $lists['editor_lang']; 
 112                              $tip = T_('Additional languages can be added by downloading and install TinyMCE language packs found here - http://services.moxiecode.com/i18n/');
 113                              echo mosToolTip($tip, 'editor_lang', '', 'tooltip.png', '', '#', $lib);
 114                              ?>
 115                          </td>
 116                  </tr>
 117                  <tr>
 118                          <td>
 119                          <?php echo T_('List of supported Languages.'); ?>:
 120                          </td>
 121                          <td><input type="text" class="text_area" size="50" name="editor_lang_list" value="<?php echo $row->editor_lang_list; ?>" /></td>
 122                  </tr>
 123  
 124                  <tr>
 125                          <td>
 126                          <?php echo T_('Override Template CSS'); ?>:
 127                          </td>
 128                          <td><?php echo $lists['editor_css_override'];
 129                              $tip = T_('Override your Template CSS file');
 130                              echo mosToolTip($tip, 'editor_lang', '', 'tooltip.png', '', '#', $lib);
 131                              ?>
 132                          </td>
 133                  </tr>
 134                  <tr>
 135                          <td>
 136                          <?php echo T_('Custom CSS File') ?>:
 137                          </td>
 138                          <td>
 139                          <input type="text" class="text_area" size="30" name="editor_custom_css" value="<?php echo $row->editor_custom_css; ?>" />
 140                          <?php $tip = T_('Name of custom css file. This file should be placed in your Template CSS directory.');
 141                                echo mosToolTip($tip, 'editor_lang', '', 'tooltip.png', '', '#', $lib);
 142                          ?>
 143                          </td>
 144                  </tr>
 145                  <tr>
 146                          <td>
 147                          <?php echo T_('Newlines'); ?>:
 148                          </td>
 149                          <td><?php echo $lists['editor_newlines'];
 150                                  $tip = T_('Result of a carriage return in the editor content area, BR or P.');
 151                                  echo mosToolTip($tip, 'editor_lang', '', 'tooltip.png', '', '#', $lib);
 152                              ?>
 153                          </td>
 154                  </tr>
 155                  <tr>
 156                          <td>
 157                          <?php echo T_('Convert Absolute URLS.'); ?>:
 158                          </td>
 159                          <td><?php echo $lists['editor_convert_urls'];
 160                              $tip = T_('If Yes, Absolute URLS from the Editor are converted to Relative URLS for page display. Necessary for SEF support.');
 161                              echo mosToolTip($tip, 'editor_lang', '', 'tooltip.png', '', '#', $lib);
 162                              ?>
 163                          </td>
 164                  </tr>
 165                  <tr>
 166                          <td>
 167                          <?php echo T_('Allow script elements') ?>:
 168                          </td>
 169                          <td><?php echo $lists['editor_script_acl'];?>
 170                          &nbsp;
 171                          <?php echo T_('SCRIPT Elements'); ?>
 172                          <input type="text" class="text_area" size="40" name="editor_script_elms" value="<?php echo $row->editor_script_elms; ?>" />
 173                          <?php $tip = T_('List of SCRIPT Elements. Must be seperated by | ');
 174                                 echo mosToolTip($tip, 'editor_lang', '', 'tooltip.png', '', '#', $lib);
 175                          ?>
 176                          </td>
 177                  </tr>
 178                  <tr>
 179                          <td>
 180                          <?php echo T_('Allow IFRAME elements'); ?>:
 181                          </td>
 182                          <td><?php echo $lists['editor_iframe_acl'];?>
 183                          &nbsp;
 184                          <?php echo T_('IFRAME Elements'); ?>
 185                          <input type="text" class="text_area" size="40" name="editor_iframe_elms" value="<?php echo $row->editor_iframe_elms; ?>" />
 186                          <?php $tip = T_('List of IFRAME Elements. Must be seperated by | ');
 187                                echo mosToolTip($tip, 'editor_lang', '', 'tooltip.png', '', '#', $lib);
 188                          ?>
 189                          </td>
 190                  </tr>
 191                  <tr>
 192                          <td>
 193                          <?php echo T_('Extended Elements List'); ?>:
 194                          </td>
 195                          <td><input type="text" class="text_area" size="80" name="editor_xtd_elms" value="<?php echo $row->editor_xtd_elms; ?>" />
 196                          <?php $tip = T_('List of Extended Elements. Format is tag1[element1|element2],tag2[element1|element2]');
 197                                echo mosToolTip($tip, 'editor_lang', '', 'tooltip.png', '', '#', $lib);
 198                          ?>
 199                          </td>
 200                  </tr>
 201                  <tr>
 202                          <td>
 203                          <?php echo T_('Path to HTML Template Directory'); ?>:
 204                          </td>
 205                          <td><?php echo $mosConfig_absolute_path;?><input type="text" class="text_area" size="30" name="editor_tmpl_dir" value="<?php echo $row->editor_tmpl_dir; ?>" />
 206                          <?php $tip = T_('Absolute path to the directory where HTML templates are stored (HTML Template plugin).');
 207                                echo mosToolTip($tip, 'editor_lang', '', 'tooltip.png', '', '#', $lib);
 208                          ?>
 209                          </td>
 210                  </tr>
 211                  <tr>
 212                          <td>
 213                          <?php echo T_('Directionality'); ?>:
 214                          </td>
 215                          <td><?php echo $lists['editor_direction']; ?></td>
 216                  </tr>
 217                  <tr>
 218                          <td>
 219                          <?php echo T_('Editor Width'); ?>:
 220                          </td>
 221                          <td>
 222                          <input type="text" class="text_area" size="5" name="editor_width" value="<?php echo $row->editor_width; ?>" />&nbsp;px
 223                          </td>
 224                  </tr>
 225                  <tr>
 226                          <td>
 227                          <?php echo T_('Editor Height'); ?>:
 228                          </td>
 229                          <td>
 230                          <input type="text" class="text_area" size="5" name="editor_height" value="<?php echo $row->editor_height; ?>" />&nbsp;px
 231                          </td>
 232                  </tr>
 233                  </table>
 234                  <?php
 235                  $tabs->endTab();
 236                  $tabs->startTab(T_('Plugins'),"editor_plugins");
 237                  ?>
 238                  <table class="adminform">
 239                  <tr>
 240                  <td><?php echo T_('<strong>Note:</strong>  Disabling these may speed up the editor since there is less to load, but it will also mean the editor has less functionality.  If you disable plugins you\'ll probably want to rearrange your plugin icon layout as well.'); ?>
 241                  </td>
 242                  </tr>
 243                  </table>
 244                  <table class="adminform">
 245                  <tr>
 246                          <td>
 247                          <?php echo T_('Load Date/Time'); ?>:
 248                          </td>
 249                          <td>
 250                          <?php echo $lists['editor_plugin_datetime_acl']; ?>
 251                          </td>
 252                  </tr>
 253                  <tr>
 254                          <td>
 255                          <?php echo T_('Date Format'); ?>:
 256                          </td>
 257                          <td>
 258                          <input type="text" class="text_area" size="30" name="editor_plugin_dateformat" value="<?php echo $row->editor_plugin_dateformat; ?>" />
 259                          <?php $tip = T_('%y  year as number without century (00 to 99), %Y year as number including the century, %d day of month as number (01 to 31), %m month as number (01 to 12), %D same as %m/%d/%y');
 260                                echo mosToolTip($tip, 'editor_lang', '', 'tooltip.png', '', '#', $lib);
 261                          ?>
 262                          </td>
 263                  </tr>
 264                  <tr>
 265                          <td>
 266                          <?php echo T_('Time Format') ?>:
 267                          </td>
 268                          <td>
 269                          <input type="text" class="text_area" size="30" name="editor_plugin_timeformat" value="<?php echo $row->editor_plugin_timeformat; ?>" />
 270                          <?php $tip = T_('%r time with a.m./p.m. , %H hour as number 24-hour clock (00 to 23), %I hour as number 12-hour clock (01 to 12), %M min as number (00-59), %S sec as number (00-59), %p either a.m. or p.m. based on given time');
 271                                echo mosToolTip($tip, 'editor_lang', '', 'tooltip.png', '', '#', $lib);
 272                          ?>
 273                          </td>
 274                  </tr>
 275                  <tr>
 276                          <td>
 277                          <?php echo T_('Load Emotions'); ?>:
 278                          </td>
 279                          <td>
 280                          <?php echo $lists['editor_plugin_emotions_acl']; ?>
 281                          </td>
 282                  </tr>
 283                  <tr>
 284                          <td>
 285                          <?php echo T_('Load Media (ex) Flash'); ?>:
 286                          </td>
 287                          <td>
 288                          <?php echo $lists['editor_plugin_media_acl']; ?>
 289                          </td>
 290                  </tr>
 291                  <tr>
 292                          <td>
 293                          <?php echo T_('Load Tables'); ?>:
 294                          </td>
 295                          <td>
 296                          <?php echo $lists['editor_plugin_table_acl']; ?>
 297                          </td>
 298                  </tr>
 299                  <tr>
 300                          <td>
 301                          <?php echo T_('Load Font Options'); ?>:
 302                          </td>
 303                          <td>
 304                          <?php echo $lists['editor_font_tools_acl']; ?>
 305                          </td>
 306                  </tr>
 307                  <tr>
 308                          <td>
 309                          <?php echo T_('Load Print'); ?>:
 310                          </td>
 311                          <td><?php echo $lists['editor_plugin_print']; ?></td>
 312                  </tr>
 313                  <tr>
 314                          <td>
 315                          <?php echo T_('Load Search and Replace'); ?>:
 316                          </td>
 317                          <td><?php echo $lists['editor_plugin_searchreplace']; ?></td>
 318                  </tr>
 319                  <tr>
 320                          <td>
 321                          <?php echo T_('Load Spellchecker'); ?>:
 322                          </td>
 323                          <td>
 324                          <?php echo $lists['editor_plugin_spellchecker']; ?>
 325                          <?php
 326                              $tip = T_('This plugin relies on the Google Spell Checking web service.');
 327                              if (!function_exists("curl_init")) {
 328                                  //Curl is missing so tell them about it
 329                                  $tip .= '  '. T_('This service also requires the Curl PHP extension (http://nl3.php.net/curl/).  WARNING: It does not appear to be enabled on this server!');
 330                              }
 331                                echo mosToolTip($tip, 'editor_lang', '', 'tooltip.png', '', '#', $lib);
 332                          ?>
 333                          </td>
 334                  </tr>
 335                  <tr>
 336                          <td>
 337                          <?php echo T_('Load Layers'); ?>:
 338                          </td>
 339                          <td><?php echo $lists['editor_plugin_layer']; ?></td>
 340                  </tr>
 341                  <tr>
 342                          <td>
 343                          <?php echo T_('3rd Party Plugins'); ?>:
 344                          </td>
 345                          <td>
 346                          <input type="text" class="text_area" size="30" name="editor_extra_plugins" value="<?php echo $row->editor_extra_plugins; ?>" />
 347                          <?php $tip = T_('Comma seperated list of extra plugins. The plugins indicated should be placed in the MOStlyCE plugins directory and should be named exactly as specified.');
 348                                echo mosToolTip($tip, 'editor_lang', '', 'tooltip.png', '', '#', $lib);
 349                          ?>
 350                          </td>
 351                  </tr>
 352                  </table>
 353                  <?php
 354                  $tabs->endTab();
 355                  $tabs->startTab(T_('Image Mgr'),"editor_img_mgr_tab");
 356                  ?>
 357                  <table class="adminform">
 358                  <tr>
 359                  <?php $docroot = $_SERVER['DOCUMENT_ROOT']; ?>
 360  
 361                  <td>
 362                  <?php echo sprintf( T_('
 363                          <strong>Note:</strong>  The Image Manager plugin allows for basic image editing and
 364                          linking functionality directly within the editor.  It duplicates some of the
 365                          functionality found in Media Manager, but allows you to do these functions
 366                          while actually creating content.  The file manager supports some basic file
 367                          management capabilites like uploading, creating directories, renaming and
 368                          deleting files / folders, etc.  It does not yet allow for linking to files
 369                          which are not images.<br /><br />
 370                          
 371                          <span style="color: Red;"><strong>Important</strong></span>: In
 372                          order to utilize the Image Manager functionality you must create the folder
 373                          structure shown below in your document root folder.  Not your Mambo root,
 374                          your document root!  For this installation your document root is
 375                          <strong>%s</strong>.  You can create this structure manually or extract the
 376                          UserFiles.zip file included with MOStlyCE at that location.  You can find
 377                          the UserFiles.zip file at /mambots/editors/mostlyce.<br /><br />
 378                          
 379                          You must also make sure these folders are writable by your web user after you have 
 380                          created them (ex) chmod to 0755:<br />
 381                           1) UserFiles<br />
 382                           2) UserFiles/Image<br />
 383                           3) UserFiles/File<br />
 384                           4) UserFiles/Media<br />
 385                           5) UserFiles/Flash'),$docroot); 
 386                  ?>
 387  
 388                  </td>
 389                  </tr>
 390                  </table>
 391                  <table class="adminform">
 392                  <tr>
 393                          <td>
 394                          <?php echo T_('Load Image Manager'); ?>:
 395                          <?php echo $lists['editor_plugin_img_mgr']; ?>
 396                          <?php $tip = T_('Turns the Image Manager plugin on and off. Do not turn this on until you have created the folder structure show above and have made them writable. NOTE: Not recommended for use with the Opera web browser.');
 397                                echo mosToolTip($tip, 'editor_lang', '', 'tooltip.png', '', '#', $lib);
 398                          ?>
 399                          </td>
 400                  </tr>
 401                  <tr>
 402                          <td>
 403                          <?php echo T_('Display {mosimage} Icon'); ?>:
 404                          <?php echo'<img src="components/com_mostlyce/images/mosimage.gif" alt="mosimage" title="mosimage" />'; ?>
 405                          <?php echo $lists['editor_mosimage_icon']; ?>
 406                          <?php $tip = T_('If you are using the MOStlyCE Image Manager plugin then you may wish to remove the original {mosimage} option.');
 407                                echo mosToolTip($tip, 'editor_lang', '', 'tooltip.png', '', '#', $lib);
 408                          ?>
 409                          </td>
 410                  </tr>
 411                  </table>
 412                  <?php
 413                  $tabs->endTab();
 414                  $tabs->startTab(T_('Editor Info'),"editor_info2");
 415                  ?>
 416                  <table class="adminform">
 417                  <tr>
 418                      <td>
 419                      <?php readfile( "$mosConfig_absolute_path/mambots/editors/mostlyce/jscripts/tiny_mce/info/editor_info_$editor_info_lang.txt" ); ?>
 420                      </td>
 421                  </tr>
 422                  </table>
 423                  <?php
 424                  $tabs->endTab();
 425                  $tabs->endPane();
 426                  ?>
 427  
 428                  <input type="hidden" name="option" value="<?php echo $option; ?>" />
 429                  <input type="hidden" name="task" value="" />
 430                  </form>
 431                  <?php
 432          }
 433  
 434  }
 435  ?>