Source for file admin.mostlyce.html.php

Documentation is available at admin.mostlyce.html.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.  
  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/administrator/components/com_mostlyce/info/admin_info_$mosConfig_lang.txt"))
  26.                 {
  27.                   $admin_info_lang = "english";
  28.                 }else{
  29.                   $admin_info_lang = "$mosConfig_lang";
  30.                 }*/
  31.                 
  32.                 if (!file_exists("$mosConfig_absolute_path/mambots/editors/mostlyce/jscripts/tiny_mce/info/editor_info_$mosConfig_lang.php"))
  33.                 {
  34.                   $editor_info_lang "english";
  35.                 }else{
  36.                   $editor_info_lang "$mosConfig_lang";
  37.                 }
  38.  
  39.                 ?>
  40.                 <div id="overDiv" style="position:absolute; visibility:hidden; z-index:10000;"></div>
  41.                 <table class="adminheading">
  42.                 <tr>
  43.                         <th class="config">
  44.                         <?php echo T_('MOStlyCE Configuration :')?>
  45.                         <span class="componentheading">
  46.                         <?php echo T_('mostlyce_config.php is :')?>
  47.                          <?php echo is_writable'../mambots/editors/mostlyce/jscripts/tiny_mce/mostlyce_config.php' '<b><font color="green">'.T_('Writeable').'</font></b>' '<b><font color="red">'.T_('Unwriteable').'</font></b>'?>
  48.                         </span>
  49.                         </th>
  50.                 </tr>
  51.                 </table>
  52.                 <script language="javascript" type="text/javascript">
  53.                 function submitbutton(pressbutton) {
  54.                         var form = document.adminForm;
  55.                         if (pressbutton == 'save') {
  56.                                 //if (confirm ("Are you sure?")) {
  57.                                 submitform( pressbutton );
  58.                                 //}
  59.                         } else {
  60.                                 document.location.href = 'index2.php';
  61.                         }
  62.                 }
  63.                 </script>
  64.                 <form action="index2.php" method="post" name="adminForm">
  65.                 <?php
  66.                 $tabs->startPane("mosCE");
  67.                 $tabs->startTab(T_('General'),"editor_options");
  68.                 ?>
  69.                 <table class="adminform">
  70.                 <tr>
  71.                     <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)?>
  72.                 </tr>
  73.                 <tr>
  74.                         <td width="185">
  75.                         <?php echo T_('Editor Themes')?>:
  76.                         </td>
  77.                         <td><?php echo $lists['editor_themes'];?></td>
  78.                 </tr>
  79.         <tr>
  80.                         <td width="185">
  81.                         <?php echo T_('Editor Compression')?>:
  82.                         </td>
  83.                         <td><?php echo $lists['editor_compression'];
  84.             $tip T_('Turning compression on enables the TinyMCE compressor. This reduces traffic and speeds up the editor by up to 75%. NOTE: Not recommended for IE users at this time.  Causes editor in IE not to appear.');
  85.                                 echo mosToolTip$tip );?>
  86.             </td>
  87.                 </tr>
  88.                 <tr>
  89.                         <td width="185">
  90.                         <?php echo T_('Editor Language')?>:
  91.                         </td>
  92.                         <td><?php echo $lists['editor_lang']
  93.                         $tip T_('Additional languages can be added by downloading and install TinyMCE language packs found here - http://tinymce.moxiecode.com/language.php');
  94.                                 echo mosToolTip$tip );?></td>
  95.                 </tr>
  96.                 <tr>
  97.                         <td width="185">
  98.                         <?php echo T_('List of supported Languages.')?>:
  99.                         </td>
  100.                         <td><input type="text" class="text_area" size="50" name="editor_lang_list" value="<?php echo $row->editor_lang_list?>" dir="ltr"></td>
  101.                 </tr>
  102.  
  103.                 <tr>
  104.                         <td width="185">
  105.                         <?php echo T_('Override Template CSS')?>:
  106.                         </td>
  107.                         <td><?php echo $lists['editor_css_override'];
  108.                         $tip T_('Override your Template CSS file');
  109.                                 echo mosToolTip$tip );?>
  110.                         </td>
  111.                 </tr>
  112.                 <tr>
  113.                         <td valign="top">
  114.                         <?php echo T_('Custom CSS File'?>:
  115.                         </td>
  116.                         <td>
  117.                         <input type="text" class="text_area" size="30" name="editor_custom_css" value="<?php echo $row->editor_custom_css?>" dir="ltr">
  118.                         <?php $tip T_('Name of custom css file. This file should be placed in your Template CSS directory.');
  119.                               echo mosToolTip$tip );?>
  120.                         </td>
  121.                 </tr>
  122.                 <tr>
  123.                         <td width="185">
  124.                         <?php echo T_('Newlines')?>:
  125.                         </td>
  126.                         <td><?php echo $lists['editor_newlines'];
  127.                         $tip T_('Result of a carriage return in the editor content area, BR or P.');
  128.                                 echo mosToolTip$tip );?>
  129.                         </td>
  130.                 </tr>
  131.                 <tr>
  132.                         <td width="185">
  133.                         <?php echo T_('Convert Absolute URLS.')?>:
  134.                         </td>
  135.                         <td><?php echo $lists['editor_convert_urls'];
  136.                         $tip T_('If Yes, Absolute URLS from the Editor are converted to Relative URLS for page display. Necessary for SEF support.');
  137.                                 echo mosToolTip$tip );?>
  138.                         </td>
  139.                 </tr>
  140.                 <tr>
  141.                         <td width="185">
  142.                         <?php echo T_('Allow script elements'?>:
  143.                         </td>
  144.                         <td><?php echo $lists['editor_script_acl'];?>
  145.                         &nbsp;
  146.                         <?php echo T_('SCRIPT Elements')?>
  147.                         <input type="text" class="text_area" size="40" name="editor_script_elms" value="<?php echo $row->editor_script_elms?>" dir="ltr">
  148.                         <?php $tip T_('List of SCRIPT Elements. Must be seperated by | ');
  149.                                echo mosToolTip$tip );?></td>
  150.                 </tr>
  151.                 <tr>
  152.                         <td width="185">
  153.                         <?php echo T_('Allow IFRAME elements')?>:
  154.                         </td>
  155.                         <td><?php echo $lists['editor_iframe_acl'];?>
  156.                         &nbsp;
  157.                         <?php echo T_('IFRAME Elements')?>
  158.                         <input type="text" class="text_area" size="40" name="editor_iframe_elms" value="<?php echo $row->editor_iframe_elms?>" dir="ltr">
  159.                         <?php $tip T_('List of IFRAME Elements. Must be seperated by | ');
  160.                               echo mosToolTip$tip );?>
  161.                         </td>
  162.                 </tr>
  163.                 <tr>
  164.                         <td width="185">
  165.                         <?php echo T_('Extended Elements List')?>:
  166.                         </td>
  167.                         <td><input type="text" class="text_area" size="80" name="editor_xtd_elms" value="<?php echo $row->editor_xtd_elms?>" dir="ltr">
  168.                         <?php $tip T_('List of Extended Elements. Format is tag1[element1|element2],tag2[element1|element2]');
  169.                               echo mosToolTip$tip );?>
  170.                         </td>
  171.                 </tr>
  172.                 <tr>
  173.                         <td width="185">
  174.                         <?php echo T_('Path to HTML Template Directory')?>:
  175.                         </td>
  176.                         <td><span dir="ltr"><?php echo $mosConfig_absolute_path;?></span><input type="text" class="text_area" size="30" name="editor_tmpl_dir" value="<?php echo $row->editor_tmpl_dir?>" dir="ltr">
  177.                         <?php $tip T_('Absolute path to the directory where HTML templates are stored (HTML Template plugin).');
  178.                               echo mosToolTip$tip );?>
  179.                         </td>
  180.                 </tr>
  181.                 
  182.                 <tr>
  183.                         <td width="185">
  184.                         <?php echo T_('Directionality')?>:
  185.                         </td>
  186.                         <td><?php echo $lists['editor_direction']?></td>
  187.                 </tr>
  188.                 </table>
  189.                 <?php
  190.                 $tabs->endTab();
  191.                 $tabs->startTab(T_('Layout'),"editor_layout");
  192.                 ?>
  193.                 <table class="adminform" border="1">
  194.                 <tr>
  195.                     <td><?php echo T_('Preview :')?></td>
  196.                     <td>
  197.                         <div style="width:<?php echo $row->editor_width?>px; border: 1px solid #cccccc; background:#F0F0EE;">
  198.                             <div style="padding:3px; border-bottom:1px solid #cccccc" />
  199.                             <?php $row_buttons1 explode(','$row->editor_layout_row1);
  200.                             foreach ($row_buttons1 as $btnImg1){
  201.                               echo'<img src="components/com_mostlyce/images/'.$btnImg1.'.gif" alt="'.$btnImg1.'" title="'.$btnImg1.'" />';
  202.                             }?></div>
  203.                             <div style="padding:3px; border-bottom:1px solid #cccccc" />
  204.                             <?php $row_buttons2 explode(','$row->editor_layout_row2);
  205.                             foreach ($row_buttons2 as $btnImg2){
  206.                               echo'<img src="components/com_mostlyce/images/'.$btnImg2.'.gif" alt="'.$btnImg2.'" title="'.$btnImg2.'" />';
  207.                             }?></div>
  208.                             <div style="padding:3px; border-bottom:1px solid #cccccc" />
  209.                             <?php $row_buttons3 explode(','$row->editor_layout_row3);
  210.                             foreach ($row_buttons3 as $btnImg3){
  211.                               echo'<img src="components/com_mostlyce/images/'.$btnImg3.'.gif" alt="'.$btnImg3.'" title="'.$btnImg3.'" />';
  212.                             }?></div>
  213.                             <div style="padding:3px; "/>
  214.                             <?php $row_buttons4 explode(','$row->editor_layout_row4);
  215.                             foreach ($row_buttons4 as $btnImg4){
  216.                               echo'<img src="components/com_mostlyce/images/'.$btnImg4.'.gif" alt="'.$btnImg4.'" title="'.$btnImg4.'" />';
  217.                             }?></div>
  218.                         </div>
  219.                     </td>
  220.                 </tr>
  221.                 <tr>
  222.                         <td valign="top">
  223.                         <?php echo T_('Editor Width')?>:
  224.                         </td>
  225.                         <td>
  226.                         <input type="text" class="text_area" size="5" name="editor_width" value="<?php echo $row->editor_width?>">&nbsp;px
  227.                         </td>
  228.                 </tr>
  229.                 <tr>
  230.                         <td valign="top">
  231.                         <?php echo T_('Editor Height')?>:
  232.                         </td>
  233.                         <td>
  234.                         <input type="text" class="text_area" size="5" name="editor_height" value="<?php echo $row->editor_height?>">&nbsp;px
  235.                         </td>
  236.                 </tr>
  237.                 <tr>
  238.                         <td valign="top" colspan="2">
  239.                         <?php echo T_('You can remove buttons from the layout by placing a minus sign (-) in front of the button name, eg: -cut')?>
  240.                         </td>
  241.                 </tr>
  242.                 <tr>
  243.                         <td width="100">
  244.                         <?php echo T_('Row 1 buttons')?>:
  245.                         </td>
  246.                         <td><textarea class="text_area" cols="70" rows="5" name="editor_layout_row1" dir="ltr"><?php echo $row->editor_layout_row1?></textarea></td>
  247.                 </tr>
  248.                 <tr>
  249.                         <td width="100">
  250.                         <?php echo T_('Row 2 buttons')?>:
  251.                         </td>
  252.                         <td><textarea class="text_area" cols="70" rows="5" name="editor_layout_row2" dir="ltr"><?php echo $row->editor_layout_row2?></textarea></td>
  253.                 </tr>
  254.                 <tr>
  255.                         <td width="100">
  256.                         <?php echo T_('Row 3 buttons')?>:
  257.                         </td>
  258.                         <td><textarea class="text_area" cols="70" rows="5" name="editor_layout_row3" dir="ltr"><?php echo $row->editor_layout_row3?></textarea></td>
  259.                 </tr>
  260.                 <tr>
  261.                         <td width="100">
  262.                         <?php echo T_('Row 4 buttons')?>:
  263.                         </td>
  264.                         <td><textarea class="text_area" cols="70" rows="5" name="editor_layout_row4" dir="ltr"><?php echo $row->editor_layout_row4?></textarea></td>
  265.                 </tr>
  266.                 </table>
  267.                 <?php
  268.                 $tabs->endTab();
  269.                 $tabs->startTab(T_('Plugins'),"editor_plugins");
  270.                 ?>
  271.                 <table class="adminform">
  272.                 <tr>
  273.                 <td width="350"><?php echo T_('<b>Note:</b>  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.')?>
  274.                 </td>
  275.                 </tr>
  276.                 </table>
  277.                 <table class="adminform">
  278.                 <tr>
  279.                         <td width="185">
  280.                         <?php echo T_('Load Date/Time')?>:
  281.                         </td>
  282.                         <td>
  283.                         <?php echo $lists['editor_plugin_datetime_acl']?>
  284.                         </td>
  285.                 </tr>
  286.                 <tr>
  287.                         <td width="185">
  288.                         <?php echo T_('Date Format')?>:
  289.                         </td>
  290.                         <td>
  291.                         <input type="text" class="text_area" size="30" name="editor_plugin_dateformat" value="<?php echo $row->editor_plugin_dateformat?>" dir="ltr">
  292.                         <?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');
  293.                               echo mosToolTip$tip );?>
  294.                         </td>
  295.                 </tr>
  296.                 <tr>
  297.                         <td width="185">
  298.                         <?php echo T_('Time Format'?>:
  299.                         </td>
  300.                         <td>
  301.                         <input type="text" class="text_area" size="30" name="editor_plugin_timeformat" value="<?php echo $row->editor_plugin_timeformat?>" dir="ltr">
  302.                         <?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');
  303.                               echo mosToolTip$tip );?>
  304.                         </td>
  305.                 </tr>
  306.                 <tr>
  307.                         <td width="185">
  308.                         <?php echo T_('Load Emotions')?>:
  309.                         </td>
  310.                         <td>
  311.                         <?php echo $lists['editor_plugin_emotions_acl']?>
  312.                         </td>
  313.                 </tr>
  314.                 <tr>
  315.                         <td width="185">
  316.                         <?php echo T_('Load Media (ex) Flash')?>:
  317.                         </td>
  318.                         <td>
  319.                         <?php echo $lists['editor_plugin_media_acl']?>
  320.                         </td>
  321.                 </tr>
  322.                 <tr>
  323.                         <td width="185">
  324.                         <?php echo T_('Load Tables')?>:
  325.                         </td>
  326.                         <td>
  327.                         <?php echo $lists['editor_plugin_table_acl']?>
  328.                         </td>
  329.                 </tr>
  330.                 <tr>
  331.                         <td width="185">
  332.                         <?php echo T_('Load Font Options')?>:
  333.                         </td>
  334.                         <td>
  335.                         <?php echo $lists['editor_font_tools_acl']?>
  336.                         </td>
  337.                 </tr>
  338.                 <tr>
  339.                         <td width="185">
  340.                         <?php echo T_('Load Print')?>:
  341.                         </td>
  342.                         <td><?php echo $lists['editor_plugin_print']?></td>
  343.                 </tr>
  344.                 <tr>
  345.                         <td width="185">
  346.                         <?php echo T_('Load Search & Replace')?>:
  347.                         </td>
  348.                         <td><?php echo $lists['editor_plugin_searchreplace']?></td>
  349.                 </tr>
  350.                 <tr>
  351.                         <td width="185">
  352.                         <?php echo T_('Load Spellchecker')?>:
  353.                         </td>
  354.                         <td>
  355.                         <?php echo $lists['editor_plugin_spellchecker']?>
  356.                         <?php $tip T_('The Spellchecker plugin is still experimental, but seems to work well in FireFox 1.5+ on non-Windows machines.  This plugin requires CURL.');
  357.                               echo mosToolTip$tip );?>
  358.                         </td>
  359.                 </tr>
  360.                 <tr>
  361.                         <td width="185">
  362.                         <?php echo T_('Load Layers')?>:
  363.                         </td>
  364.                         <td><?php echo $lists['editor_plugin_layer']?></td>
  365.                 </tr>
  366.                 <tr>
  367.                         <td width="185">
  368.                         <?php echo T_('3rd Party Plugins')?>:
  369.                         </td>
  370.                         <td>
  371.                         <input type="text" class="text_area" size="30" name="editor_extra_plugins" value="<?php echo $row->editor_extra_plugins?>">
  372.                         <?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.');
  373.                               echo mosToolTip$tip );?>
  374.                         </td>
  375.                 </tr>
  376.                 </table>
  377.                 <?php
  378.                 $tabs->endTab();
  379.                 $tabs->startTab(T_('Image Mgr'),"editor_img_mgr_tab");
  380.                 ?>
  381.                 <table class="adminform">
  382.                 <tr>
  383.                 <?php $docroot $_SERVER['DOCUMENT_ROOT']?>
  384.  
  385.                 <td width="350"><?php echo sprintfT_('
  386. <b>Note:</b>  The Image Manager plugin allows for basic image editing and
  387. linking functionality directly within the editor.  It duplicates some of the
  388. functionality found in Media Manager, but allows you to do these functions
  389. while actually creating content.  The file manager supports some basic file
  390. management capabilites like uploading, creating directories, renaming &
  391. deleting files / folders, etc.  It does not yet allow for linking to files
  392. which are not images.<br /><br />
  393.  
  394. <span style=\"color: rgb(255, 0, 0);\"><strong>Important</strong></span>: In
  395. order to utilize the Image Manager functionality you must create the folder
  396. structure shown below in your document root folder.  Not your Mambo root,
  397. your document root!  For this installation your document root is
  398. <strong>%s</strong>.  You can create this structure manually or extract the
  399. UserFiles.zip file included with MOStlyCE at that location.  You can find
  400. the UserFiles.zip file at /mambots/editors/mostlyce.<br /><br />
  401.  
  402. You must also make sure these folders are writable after you have created
  403. them (ex) chmod to 0755:</b><br />
  404.    1) UserFiles<br />
  405.  2) UserFiles/Image<br />
  406.  3) UserFiles/File<br />
  407.  4) UserFiles/Media<br />
  408.  5) UserFiles/Flash'),$docroot)?>
  409.  
  410.                 </td>
  411.                 </tr>
  412.                 </table>
  413.                 <table class="adminform">
  414.                 <tr>
  415.                         <td width="185">
  416.                         <?php echo T_('Load Image Manager')?>:
  417.                         </td>
  418.                         <td><?php echo $lists['editor_plugin_img_mgr']?>
  419.                         <?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.');
  420.                               echo mosToolTip$tip );?>
  421.                         </td>
  422.                 </tr>
  423.                 <tr>
  424.                         <td width="185">
  425.                         <?php echo T_('Display {mosimage} Icon')?>:
  426.                         <?php echo'<img src="components/com_mostlyce/images/mosimage.gif" alt="mosimage" title="mosimage" />'?>
  427.                         </td>
  428.                         <td><?php echo $lists['editor_mosimage_icon']?>
  429.                         <?php $tip T_('If you are using the MOStlyCE Image Manager plugin then you may wish to remove the original {mosimage} option.');
  430.                               echo mosToolTip$tip );?>
  431.                         </td>
  432.                 </tr>
  433.                 </table>
  434.                 <?php
  435.                 $tabs->endTab();
  436.                 $tabs->startTab(T_('Editor Info'),"editor_info2");
  437.                 ?>
  438.                 <table class="adminform">
  439.                 <tr>
  440.                     <td>
  441.                     <?php readfile"$mosConfig_absolute_path/mambots/editors/mostlyce/jscripts/tiny_mce/info/editor_info_$editor_info_lang.txt)?>
  442.                     </td>
  443.                 </tr>
  444.                 </table>
  445.                 <?php
  446.                 $tabs->endTab();
  447.                 $tabs->endPane();
  448.                 ?>
  449.  
  450.                 <input type="hidden" name="option" value="<?php echo $option?>">
  451.                 <input type="hidden" name="task" value="">
  452.                 </form>
  453.                 <script language="Javascript" src="<?php echo $mosConfig_live_site;?>/includes/js/overlib_mini.js"></script>
  454.                 <?php
  455.         }
  456.  
  457. }
  458. ?>

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