Ignore:
Timestamp:
05/07/05 21:19:31 (14 years ago)
Author:
yermol
Message:

htmlarea.js

. more debugging messages added.
. added HTMLArea.Config.linkReplacementMode which can be either

fullyqualified (the old default behavior) or absolute.


When set to fullyqualified all absolute links (e.g. /somepath) will be changed to fullyqualified URLS (e.g. http://yoursite/somepth).


When set to absolute, all fullyqualified urls back to the current site
will be changed to absolute (e.g. httpyoursite/somepath to /somepath)
making the Xinha generated content portable between sites.


( see HTMLArea.prototype.outwardHtml() )


. bugfix - if plugin .js file has a parse error htmlarea will only try to load

it a configurable number of times before popping up an error message.


backends/backend.php

. initial unified backend created. Requests to this backend are routed

to the corresponding plugin specific backend.php file.


backends/backend_conf.php

. a central server side configuration file has been created for the use

of plugin serverside code.

. all backends hooked into this scheme must include the central config file.

ImageManager?

. modified the config to allow overriding default values.
. default image directory is now xinha/examples/images
. added debugging trace messages which are tagged with the ImageManager? name.
. now uses unified backend.

Linker

. includes central config.
. default directory is now the xinha/examples directory (to avoid scan.php security

problem)

. added debugging trace messages which are tagged with the Linker name.
. links selected from the tree are now displayed in absolute instead of fully qualified

fashion.

. on edit the link that was previously selected is highlighted.
. on edit the selected link is scrolled to if it's outside the viewable area.
. if scan.php returns some kind of error or invalid javascript Linker now pops up

a nice descriptive error message.


. bugfix - same pattern as in loading plugins. If there is some error in loading the directory listing Linker will only attempt it a few times before giving up and

displaying a nice error.


dTree.js

. added clear_s() method to clear the selection
. added getNodeElement() method to return the <a ..> element for a given node.

File:
1 moved

Legend:

Unmodified
Added
Removed
  • branches/unified_backend/examples/full_example-body.php

    r84 r121  
    1 <html> 
     1<?php 
     2 
     3// [NOSTRIP 
     4// ----------------------------------------------------------------- 
     5// Copyright (C) Gogo Code. 
     6// http://code.gogo.co.nz 
     7// 
     8// Unified backend modifications by DTLink, LLC.  
     9// http://www.dtlink.com and http://www.formvista.com 
     10// ----------------------------------------------------------------- 
     11// This code is distributed under the the sames terms as Xinha 
     12// itself. (HTMLArea license based on the BSD license)  
     13//  
     14// Please read license.txt in this package for details. 
     15// 
     16// All software distributed under the Licenses is provided strictly on 
     17// an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR 
     18// IMPLIED, AND DTLINK LLC HEREBY DISCLAIMS ALL SUCH 
     19// WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF 
     20// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT, 
     21// OR NON-INFRINGEMENT.  
     22// ------------------------------------------------------------------ 
     23// NOSTRIP] 
     24 
     25/** 
     26* Modified version of full_example-body.html for use with the PHP unified backend. 
     27* 
     28* To use the unified backend you must first include the backend_conf.php file which 
     29* is generated by Configure.php. 
     30*/ 
     31 
     32/** 
     33* Configure.php generated config file for PHP unified backend. 
     34*/ 
     35 
     36include_once( "../backends/backend_conf.php" ); 
     37 
     38?><html> 
    239<head> 
    340 
     
    1855  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
    1956  <title>Example of Xinha</title> 
    20   <link rel="stylesheet" href="full_example.css" /> 
     57  <link rel="stylesheet" href="<? echo XINHA_INSTALL_URL; ?>/examples/full_example.css" /> 
    2158 
    2259  <script type="text/javascript"> 
    23     // You must set _editor_url to the URL (including trailing slash) where 
    24     // where xinha is installed, it's highly recommended to use an absolute URL 
    25     //  eg: _editor_url = "/path/to/xinha/"; 
    26     // You may try a relative URL if you wish] 
    27     //  eg: _editor_url = "../"; 
    28     // in this example we do a little regular expression to find the absolute path. 
    29     _editor_url  = document.location.href.replace(/examples\/full_example-body\.html.*/, '') 
     60    // You must set _editor_url to the URL (including trailing slash) where Xinha 
     61         // is installed.  
     62         // 
     63         // Before we had the central config, this is the way it was done. 
     64         // 
     65    // _editor_url  = document.location.href.replace(/examples\/full_example-body\.html.*/, '') 
     66 
     67    _editor_url  = "<? echo XINHA_INSTALL_URL; ?>"; 
    3068    _editor_lang = "en";      // And the language we need to use in the editor. 
    3169  </script> 
     
    3371  <!--  load in debug trace message class --> 
    3472 
    35   <script type="text/javascript" src="../ddt.js"></script> 
     73  <script type="text/javascript" src="<? echo XINHA_INSTALL_URL; ?>/ddt/ddt.js"></script> 
    3674 
    3775  <!-- create a global trace message object --> 
     
    4078   var startupDDT = new DDT( "startup" ); 
    4179   startupDDT._ddtOn(); 
     80 
     81        startupDDT._ddt( "full_example-body.php", "81", "ddt object created on calling page" ); 
    4282  </script> 
    4383   
    4484  <!-- Load up the actual editor core --> 
    45   <script type="text/javascript" src="../htmlarea.js"></script> 
     85  <script type="text/javascript" src="<? echo XINHA_INSTALL_URL; ?>/htmlarea.js"></script> 
    4686 
    4787  <script type="text/javascript"> 
     
    71111       'TableOperations' 
    72112      ]; 
    73              // THIS BIT OF JAVASCRIPT LOADS THE PLUGINS, NO TOUCHING  :) 
    74              if(!HTMLArea.loadPlugins(xinha_plugins, xinha_init)) return; 
     113 
     114                // THIS BIT OF JAVASCRIPT LOADS THE PLUGINS, NO TOUCHING  :) 
     115                if (!HTMLArea.loadPlugins(xinha_plugins, xinha_init))  
     116                        return; 
    75117 
    76118      /** STEP 2 *************************************************************** 
     
    163205 
    164206        <div id="lipsum" style="display:none"> 
    165           <p>This is an example of a Xinha editor. The two extra 
    166                          <b>&lt;&gt;</b> buttons on the right of the toolbar  
    167                          turn on debugging trace messages.</p> 
     207          <p>This is an example of a Xinha editor with extensive trace messages 
     208                         turned on. To turn off trace messages, assuming you have the source, just 
     209                         comment out the _ddtOn() calls. Eventually we'll have a script that  
     210                         strips out the trace messages and comments to produce a "runtime' version.</p> 
    168211 
    169212          <p>This branch of Xinha development is called the Unified 
     
    177220            <li> Configure.php script to generate server side scripts and permissions. </li> 
    178221            <li> makedocs.pl script to generate documentation.</li> 
     222                                <li> unified PHP backend script in backends/backend.php through which all 
     223                                                plugin to server communications are routed (ImageManager and Linker are 
     224                                                done, SpellChecker is next). 
    179225          </ul> 
    180226 
Note: See TracChangeset for help on using the changeset viewer.