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 edited

Legend:

Unmodified
Added
Removed
  • branches/unified_backend/plugins/ImageManager/config.inc.php

    r60 r121  
    1414//      . unified backend. 
    1515// . created a set of defaults that make sense for bundling with Xinha. 
    16  
    17 // ------------------------------------------------------------------------- 
     16// 
     17// 2005-05-01 YmL: 
     18//      . modified for master unified backend.  
     19// . config values can be overridden by the calling page (makes integration 
     20//        easier. 
     21// ------------------------------------------------------------------------- 
     22 
     23/** 
     24* Xinha PHP backend config file. 
     25* 
     26* probably already included. We assume we are in the xinha/plugins/ImageManager 
     27* directory 
     28*/ 
     29 
     30if ( ! defined( "XINHA_INSTALL_ROOT" ) ) 
     31        { 
     32        include_once( "../../backends/backend_conf.php" ); 
     33        } 
    1834 
    1935/** 
     
    2541*/ 
    2642 
    27 $IMConfig['backend_url'] = "backend.php?__plugin=ImageManager&"; 
     43if ( @$IMConfig['backend_url' ] == NULL ) 
     44        { 
     45        $IMConfig['backend_url'] = XINHA_INSTALL_URL . "/backends/backend.php?__plugin=ImageManager&"; 
     46        } 
    2847 
    2948/** 
     
    3655*/ 
    3756 
    38 $IMConfig['base_dir'] = getcwd(); 
    39 $IMConfig['base_url'] = ''; 
     57if ( @$IMConfig[ 'base_dir' ] == NULL ) 
     58        { 
     59        $IMConfig['base_dir'] = XINHA_INSTALL_ROOT . "/plugins/ImageManager/"; 
     60        $IMConfig['base_url'] = XINHA_INSTALL_URL . "/plugins/ImageManager/"; 
     61        } 
    4062 
    4163// ------------------------------------------------------------ 
     
    5173* Able to create directories is nice, but not necessary. 
    5274* 
    53 * CHANGE THIS: for out-of-the-box demo purposes we're setting this to ./demo_images 
    54 * which has some graphics in it. 
     75* For out-of-the-box demo purposes we're setting this to  
     76* xinha/examples/images which has some graphics in it. 
    5577*/ 
    5678 
    5779// $IMConfig['images_dir'] = "/some/path/to/images/directory; 
    5880 
    59 $IMConfig['images_dir'] = "demo_images"; 
     81if ( @$IMConfig['images_dir'] == NULL ) 
     82        { 
     83        $IMConfig['images_dir'] = XINHA_INSTALL_ROOT . "/examples/images"; 
     84        } 
    6085 
    6186// ------------------------------------------------------------------------- 
     
    7095* for this directory (i.e. disable PHP, Perl, CGI). We only want to store assets 
    7196* in this directory and its subdirectories. 
    72 * 
    73 * CHANGE THIS: You need to change this to match the url where you have Xinha 
    74 * installed. If the images show up blank chances are this is not set correctly. 
    75 */ 
    76  
    77 // $IMConfig['images_url'] = "/url/to/above"; 
    78  
    79 // try to figure out the URL of the sample images directory. For your installation 
    80 // you will probably want to keep images in another directory. 
    81  
    82 $IMConfig['images_url'] = str_replace( "backend.php", "", $_SERVER["PHP_SELF"] ) . "demo_images"; 
     97*/ 
     98 
     99if ( @$IMConfig['images_url'] == NULL ) 
     100        { 
     101        $IMConfig['images_url'] = XINHA_INSTALL_URL . "/examples/images"; 
     102        } 
    83103 
    84104// ------------------------------------------------------------------------- 
     
    97117*/ 
    98118 
    99 $IMConfig['safe_mode'] = false; 
     119if ( @$IMConfig['safe_mode'] == NULL ) 
     120        { 
     121        $IMConfig['safe_mode'] = false; 
     122        } 
    100123 
    101124// ------------------------------------------------------------------------- 
     
    155178*/ 
    156179 
    157 $IMConfig['thumbnail_dir'] = '.thumbs'; 
     180if ( @$IMConfig[ 'thumbnail_dir' ] == NULL ) 
     181        { 
     182        $IMConfig['thumbnail_dir'] = '.thumbs'; 
     183        } 
    158184 
    159185// ------------------------------------------------------------------------- 
     
    176202*/ 
    177203 
    178 $IMConfig['allow_new_dir'] = true; 
     204if ( @$IMConfig[ 'allow_new_dir' ] === NULL ) 
     205        { 
     206        $IMConfig['allow_new_dir'] = false; 
     207        } 
    179208 
    180209// ------------------------------------------------------------------------- 
     
    192221*/ 
    193222 
    194 $IMConfig['allow_upload'] = true; 
     223if ( @$IMConfig['allow_upload'] === NULL ) 
     224        { 
     225        $IMConfig['allow_upload'] = false; 
     226        } 
    195227 
    196228// ------------------------------------------------------------------------- 
     
    210242*/ 
    211243 
    212 $IMConfig['validate_images'] = true; 
     244if ( @$IMConfig[ 'validate_images' ] === NULL ) 
     245        { 
     246        $IMConfig['validate_images'] = true; 
     247        } 
    213248 
    214249// ------------------------------------------------------------------------- 
     
    221256*/ 
    222257 
    223 $IMConfig['default_thumbnail'] = 'img/default.gif'; 
     258if ( @$IMConfig['default_thumbnail'] == NULL ) 
     259        { 
     260        $IMConfig['default_thumbnail'] = 'img/default.gif'; 
     261        } 
    224262 
    225263// ------------------------------------------------------------------------- 
     
    229267*/ 
    230268 
    231 $IMConfig['thumbnail_width'] = 96; 
    232 $IMConfig['thumbnail_height'] = 96; 
     269if ( @$IMConfig['thumbnail_width'] == NULL ) 
     270        { 
     271        $IMConfig['thumbnail_width'] = 96; 
     272        $IMConfig['thumbnail_height'] = 96; 
     273        } 
    233274 
    234275// ------------------------------------------------------------------------- 
     
    240281*/ 
    241282 
    242 $IMConfig['tmp_prefix'] = '.editor_'; 
    243  
     283if ( @$IMConfig['tmp_prefix'] == NULL ) 
     284        { 
     285        $IMConfig['tmp_prefix'] = '.editor_'; 
     286        } 
     287 
     288// used to verify that the config has been loaded. 
    244289 
    245290define( "IM_CONFIG_LOADED", "yes" ); 
    246291 
    247 // bring in the debugging library 
    248  
    249 include_once( "ddt.php" ); 
     292// bring in the debugging library. 
     293 
     294include_once( XINHA_INSTALL_ROOT . "/ddt/ddt.php" ); 
    250295 
    251296// uncomment to send debug messages to a local file 
    252 _setDebugLog( "/tmp/debug_log.txt" ); 
    253  
    254 // turn debugging on everywhere. 
    255 _ddtOn(); 
     297// _setDebugLog( "/tmp/debug_log.txt" ); 
     298 
     299// uncomment to turn on debugging messages. 
     300//_ddtOn(); 
    256301 
    257302// END 
Note: See TracChangeset for help on using the changeset viewer.