rev 10-Jan_17-08_44

01 Oct 2009
    Temporary fix to security in media and link tools, preventing any user access to toolbar
    who is not a registered user. In edit.php fckg_edit_meta:  returns if non-user, so that
    editor doesn't load.
      
03 Oct 2009
fixed security hole in media and link tools  
    1. Added new configuration options to conf/metadata.php: guest_toolbar and guest_media.
    These work in conjunction with two new toolbars are defined in fckconfig.js,
    DokuwikiNoGuest and DokuwikiGuest for non_registered users: 
      		guest_toolbar == 0:  DokuwikiNoGuest
      		guest_media == 1:    DokuwikiGuest
      		
   2. Defined two new user types in registerOnLoad() of fckg/helper.php: visitor and user;
   the appropriate type is assigned to the FCKeditor's editorInstance in the Javascript
   function FCKeditor_OnComplete() which is written to the browser from registerOnLoad(). 
   This makes the distinction between a visitor and a registered user available to FCKeditor,
   so that the upload facilities can be turned off for visitors in the link and media tools. 
   This required modifications to fckeditor/editor/filemanager/browser/default:
            browser.html, frmcreatefolder.html, frmupload.html
   and to fckeditor/editor/dialog/
           fck_image/fck_image.js and fck_link/fck_link.js   
 
05 Oct 2009
 Added Support for Samba Shares (fckeditor/dialog/fck_link.html,
   fckeditor/dialog/fck_link/fck_link.js, DokuWikiFCK.pm)
   
06 Oct 2009
 Added Fit Window tool to toolbar.    
 
07 Oct 2009
 fck_editorarea.css:  th { font-weight: bold; }
  
18 Oct 2009
 Added configuration option 'open_upload', which defaults to false.  Setting this
 to true allows non-registered users to upload files to the server.  To implement
 this option, fckg/helper.php tests for 
           $open_upload = $this->getConf('open_upload');  
 and if true, it assigns 'user' status to the guest, instead of 'visitor'.  

25 Oct 2009
  Added Support for nesting ordered lists

27 Oct 2009
  Fixed bug in image markup, adding initial ':' to namespace of images, otherwise when an image
  is in the top level directory it is not found by DW.
  
  Found CSS workaround so that centered images are centered in the editor, with thanks
  to
     Larisa Thomason,  Senior Web Analyst,   NetMechanic, Inc. 
     http://www.netmechanic.com/news/vol7/html_no10.htm
  Created code for incorporating DW markup for positioning of images
       
28 Oct 2009
 Simplified Link and Image Properties dialogues so that they show only those elements
 which apply to fckgLite.
 
 Fixed bug in fck_image.js so that left align gets a class='media' to erase previous
 class attributions, which would cause image to hold previous position

 Removed link markup from local images, so that they behave as expected when clicked,
 i.e. link originates from DokuWiki's detail.php script and points to page with image
 and image details
 
29 Oct 2009
 Re-wrote fallback code for loading of scripts in edit.php.  In some instances the
 HTMLParser class wasn't  being loaded in time(or at all?).
 
31 Oct 2009
 Removed mutliple colons which built up at start of local image names -- inserted test
 to see if name started with clon (this had already been done for namespaces) 

1 Nov 2009
 Fixed lost brackets enclosing Samba shares; lost when local_image var was implemented:
 required locl_image = false, when shares are identified and url's set
  
 Fixed spacing on right side of link markup, so that the space is not removed, butting
 link up against following character, as in [link]char
  
 Added new-line to start of lists, otherwise if they are preceded by text, they
 will not be treated as list items
 
 Removed new-line from end tag of <code> markup, mainly in deference to IE, which
 adds compounded new-lines to bottoms of non-parsed blocks, when it finds a 
 new-line at end of block.  Now it adds one new-line in editor but when the
 text is parsed and saved this new-line is removed.
 
 2 Nov 2009
 Moved 1 Nov spacing fix from save.php to javascript.  

 Updated experimental scripts to conform with 1-2 Nov changes
 
    
3 Nov 2009
  Implemented support for geshi code blocks
  
  Variety of fixes in relation to spaces handling
  
  Fixed formatted links, so that formatting code no longer prints to screen when modifying
  link text
  
4 Nov
  Added check for INFO[userinfo] when checking for lock-timer group in edit.php, to
  avoid PHP warning (when open wiki)
  
 Fixed broken tables (reported by Jean=Claude Rosenthal); caused by deletion of 
 regex in chars: that deletes initial space and new-line characters, causing
 newlines to be inserted for each cell (pipe).

4 November p.m.
 Made changes to fckeditor/editor/filemanager/connectors/php/config.php which will
 hopefully give windows users easy access to the FCKeditor's file browser.  Now
 recognition of Windows is automatic and the path to data/media is automatically
 set.

5 November 2009
 Fixed path recognition for images fetched using Windows-style file manager with
 additional regex under attributes for img src in parse_wikitext function of edit.php.   

 Added checkbox to browser window so that users can choose to select the windows
 style file manager.  Required update to fckeditor's php connector: config.php

7 November
 Set "FCK Preview" button to style="display:inline" so that it always appears
  
 Fixed column span for th cells.
 
Nov 8 2009 
 [6:56] Added spaces to right of image markup for image align = left


11 Nov 2009
 Implemented a checkbox on FCK Preview Screen wich enables the Prview Button.  It comes
 a warning that work can be lost.
 
 Reworked the FCKeditors' Table Cell dialog so that it attaches DW's centeralign,
 leftalign, and  and rightalign classes to the cells, so as to replicatle DW' alignment
 protocol.
 
 Fixed the cell alignment but still to do is cell alignment for colspans.
 
12 Nov 2009 10:53
 Rewrote . ./filemanager/conncectors/php/config.php 
 The aim is to accommodate aall systems with auto-detect while giving use opportunity
 to enter pahts to data/media manually if needed
  
 1:04
 Fixed config.php so that it recognizes difference between Darwin and Windows, i.e.
 so that stristr looking for WIN doesn't mistake Darwin for Windows
 
 13 Nov 2008
 6:55  Fixed centering on table cells with colspan greater than 1.  Note: each time
 a cell increases its span, the center align has to be reset.
 
 15 November 2008
 Implemented re-sizing of editor window helper.php and edit.php, replacing DW's size__ctrl
 div with fck_size_ctrl div in keper.php and adding js function to increase and decrease
 size via dwfck_size_ctl() in edit.php
 
 Implemented support for non-printable chars: * / <
 
 
 15 Nov 22:38
 Added tool tips to smaller and larger buttons (for decreasing and increasing window size)
 
 Added smb icon to fckeditor images and smb CSS to fck_editorarea.css
  
 16 Nov 
 8:36  Removed autogrow plugin from FCKeditor, now that edit window is resizable.  This
 also improves functioning of fit window tool, which no longer collapses to the
 autogrow maximum height.
 
 20 Nov 2009
 Implemented support for DokuWiki footnotes
 
 16:17  Fixed regex bug in IE, where it doesn't split correctly on underscor character
 when it is followed by a second underscore (treats both a single character instead of 
 two).
     
 17:04 Fixed bug which printed %% escapes in code blocks
 
 21:07 Conformed pre, pre.file,pre.code to DokuWiki's style sheet.
 
 22 Nov 2009
 10:00  Fixed ommitted space after format characters (bold, italic, delete, underline.
 17:58  Omitted space after //<// (actually //&lt;//) so that it can escape open angle
 bracket without placing a space after the bracket.
 
  All basic formatting characters  are followed by a space, which means that you
  can't apply them to an internal word  character without opening a space between
  the characters that precede the format character and the character that 
  follows:
         te**x* 
         
         t  
 24 Nov
 Upgraded the plugin tool (syntax/dwplugin.php) so that it accomodates plugins
 with enclosed text as in <span>text</span>

 Also fixed plugin tool to handle text from more than one instance on a page of the
 same plugin, otherwise text of last instance will overwrite all other
 instance.
 
 19:45:  Add missing space after link markup [[url]] by appending space to final 
 set of brackets: ']] ' in the end markup array.  Seemed simplest fix.
 
 Fixed bug which left beind empty url brackets after footnotes were edited during
 section editing.  This is because the section places footnotes for the section
 at bottom of section page, and they are saved with the section save and 
 appeared  when the full page or sectoin is  re-loaded.  
 
 25 November
 Removed space before punctuation when marking up urls (see 24 Nov 19:45)
 
 26 November
 9:37:
  Added support for url nice re-writing for images
 
 10:41
  Removed %% characters from samba share names, when the link tool creates the name from
  the share [[\\Myshare\folder\file|\\Myshare\folder\file]].  Not a problem is
  use gave share name in advance: [[\\Myshare\folder\file|Myshare]]
  
 21:40
  Upgraded caching mechanism of syntax/dwplugin.php, which was preventing all files
  from being cached.  The fix was to set a time limit on the files which use plugins,
  which is written to the file's meta file.  Only files wich have a current filestamp
  in their meta files will not cache--this is required for dwplugin, since otherwise
  plugins with embedded text do not update.
  
  23:30: The punctuation fix for urls (Nov 25) would cause space to be removed 
  if any of the text following a ]] had a punctuation character, so  fixed the
  regex to seek only punctuation which immediately follows ]].  In chars()
  function.
  
  27 Nov
  6:54
  Improved FCKeditor plugin tool so that checkbox for removal removes plugin tags
  entirely instead of just removing title attribute.  This leaves behind the text,
  including syntax markup with tildes, if any.
  
  11:08
  Updated meta.php so that an edit button is not displayed when the user switches
  from FCK editing to dokuwiki editing, because saving in that context from a
  section edit, causes the document to be saved with data duplication.  Instead,
  there is an Exit button with the tool tip indicating that the user must exit
  in order to swich editors.  Also turned off the prieview checkbox for the
  DW edit mode.
  
  28 Nov
  Added gone-missing CSS for shares in editor area
  
  Added experimental dwplugins.php for auto stet plugin, which creates literals for all
  enclosed text between <plugin title="stet"> and </plugin>.
  
  Added checkbox selector to plugin dialog that enable users to select stet
  instead of having to type in, or even know, that the plugin name is stet.
  
  29 Nov
  Upgraded plugin tool dialog to clarif separation between Stet plugin and the
  plugin tool.
  
  Fixed bug where h4 header printed as h3
  
  Fixed bug where solitary % sign is deleted.
  
  Fixed deleted space after monospace (HTML code) markup
  
  30 Nov
  Impelemented  mechanism to handle external mime types, like xls and pdf, which are
  placed in curly brackets and coded like local links.  Then these are fetched using
  lib/exec/fetch and set up for downloading by user.
  
  The above changes are still in test stage and am waiting for results from tester;
  the impelentation is in action/edit.php.external_mimes.
 
 
 1 Dec
   Tester did not have succes but I can't reproduce errors.  
   Fixed conflict between external mime types and external images both, which became 
   confused because both use curly brackets and both come with links using http:// protococl
   
 2 Dec
  Tested against 2007 ver. of DW and changed test clause for external mimes.
    
 3 Dec
  By-passed space deletions for non-parsed blocks in chars()
 
 
 5 Dec
 Added limited support for table rowspans.  Rowspans cannot be assigned to cells in two
 columns which have overlapping positions,  That is, cells 1-2 in column one and cells
 2 to 3 in column two will lose cell 2  in column two, it will not appear at all.  Rowspans
 can be stacked in a single column, e.g. cells 1-2, 3-4 of column 1.
 
 Column Spans can be combined with rowspans.
 
 7 Dec
 Improvements to Link File Browser, now opens file browsers both for internal links, in
 DW's data directory, and for  extra mime types (e.g. tgz, xls) which have been uploaded
 to media directory; and handles configuration of urls for these types.
 
 Applied Dokuwiki's file naming protocol to all uploads (lower case and spaces=underscore);
 previously only applied to images
 
 9:44 Disabled upload for local files in data/pages directory.
 
 9 December
 Added footnote editor, using name inertHTMLCode (adapted that plugin for this purpose)
 fixed Stet plugin to accept paragraph and line breaks (both in fckeditor plugin fiels and
 in syntax/dwplugin.php
 
 10 Dec
 Impelemented new protocol for handling HTML angle brackets:  on loading file into
 editor, at server (in edit.php), the angle brackets for code blocks get internal spaces
 and  outside of code block the initial bracket is put into italics.  On saving these
 are removed, in the JS parser, leaving the wiki file in tact and displaying 
 it correctly in the browser.  This process insures that the FCKeditor will not treat
 the brackets and the  text between the open and closed brackets as HTML tags and drop
 them  from the display.
 
 17:13  Excluded <plugin>. . . .</plugin> from above translation, so that ~<~ and ~>~ remain
 in  tact.
 
 13 Dec
 Restored missing rowspan setting to table cell properties dialog
 
 12:09 Added space after acronym, which was deleted when DW inserts acronym tags
 
 17 Dec
 Prepended colon to image urls created when using url rewrite rules
 
 19 Dec
 dialog/fck_link/fck_link.js:  created nice link text for internal links and links
 to internal other mime types, where these texts are not pre-set and selected by user in editor. 
 
 23 Dec
 Removed extra spaces from angle brackets in stet plugin
 
 24 Dec
 Plugins:
 1. New protocl for handling plugins, in experimental branch 01.02.  
 For most plugins, it is not necessary to use the plugin tool.  Only if the plugin does
 not work, then the  plugin tool might assist.  In this version, the user
 types in the plugin as he/she would in standard DW.  editor.php  escapes the following
 characters: {}:~?! by adding a space character after each of them, before they are
 processed by the DW parser.  Consequently the plugins are not processed as such, but
 their syntax remains on the page in the escaped form (i.e. with the space characters).
 When the file is processed by fckgLite, after the parsing is done, the spaces are
 removed and the file is saved with the plugin syntax in tact; therefore, DW never knows
 about the ecaped syntax and the plugins are treated normally.
 2. There is a new configuration setting, with the variable name 'xcl_plugins'.  Some
 plugins are meant to become a permanent part of the page.  If so, the plugins
 listed in this setting will be excluded from the escape process.  There is 
 one exception:  all opening angle brackets are automatically escaped in the editor.
 So, as of the present, if your plugin uses HTML-Style tags, it cannot be excluded, 
 that is, it will be automatically escaped before being loaded into the editor.  
 
 25 Dec
 Added a plugin editor to the Plugin Tool for editing native DW plugins, i.e. plugins
 not created with the plugin tool
 
 
1 Jan 2010
 Implemented an acl governed file browser.  The acl can be turned off in the configuration
 manager by changing the file browser's default setting from acl to none.  

2 Jan
  Removed debugging output from fckeditor'r config.php 
  
  12:23
   cleaning up some PHP notices being output to logs 
   
5 Jan
  Upgraded file browser, which is now set to open in one up from  user's folder and to
  exclude directories from hierarchy which do not have acl permisssion.
  
  Replaced FCKeditor's accepted file types for upload with file types listed in mime.conf
  
  There are now several addition configuration settings which control whether user has full
  or only partial access to file browser hieracrchy.
  
  Upgraded code to sanitize filenames of uploads so that they more rigorously conform to
  Dokuwiki style.
  This code now uses the $conf['sepchar'] setting to replace non-dw-canonical characters.
  
  
6 Jan
 Fixed regexes for plugin escapes in edit.php so that they can handle plugins with
 ampersands.  
 
10 Jan
 Fixed acl recognition code in commands.php for folders, both in main directory listing
 and in directory sidebar.
 
 Color-coded icons for read-only folder: they are now blue, uploadable folders are yellow
 
 In commands.php GetFoldersAndFiles(), added code to create directories when these are
 not created by the browser code.  This happens when the browser opens in a folder which
 is hierarchically prior to a new namespace in which a file is being created. 
 
 11:51
 Changed method of retrieving attribute values in GetFoldersAndFilesCallBack and changed
 variable 'class' for 'folder_class'-- in order to accommodate IE.
 
 22:49:
 Fixed bug in commands.php GetGoldersAndFiles() : $sFolderPath is returned from
 GetResourceTypeDirectory() in the current directory, not as I had it, in the root media directory.
 
 11 Jan
 8:27 
 Revised error reporting in GetFoldersAndFiles for failure to create a directory where
 user doesn't have permission to create in the namespace.
 
 13 Jan 
 Removed empty tabs from link and image dialogs
 
 14 Jan
 Removed automatic switch-over from FCK editor to DW editor.  Now when "DW Edit" is pressed,
 the document is saved and the editor exited.  When use next clicks "edit" the editor is
 DW.  This is to protect against some elusive bug which (though rarely) causes loss of text
 when switching between editors without first exiting.
 
 15 Jan 
 Added support for Dokuwiki email markup
 
 16 Jan
 Added code in meta.php set_session() to handle cases where user gets CSRF warning because
 fckgLite uses its own SESSION. There is a configuration setting in the configuration
 manager which enables the admin to set the 'csrf' setting  to true, if the site gets
 CSRF warnings.  In this case, fckgLite piggy-backs onto the Dokuwiki session.
 
 Hopefully fixed insistent bugs that corrupt up creation of new directories when then user
 opens file browser from the top of the media directory hierarchy.  In commands.php,
 GetFoldersAndFiles().  Still to be re-tested is the Darwin algorithm.
 