I have been working on installing and testing the latest version of the Xinha fork of HTMLArea3 with Pagesetter 6.1.0 and PostNuke .750.
This how to will setp you through replacing the HTMLArea30 editor currently in Pagesetter with the latest Xinha version. The downloads include the ExtendedFileManager for adding pictures to your pages (in additon to using Photoshare) from an image directory on your server as well as a properly functioning full screen editor.
The Xinha project has taken up support of the original HTMLArea3 code and has fixed many bugs and there are new plugins available. I have posted the necessary files for download on our web site. This is a simple swap for the HTMLArea30beta directory and no other Pagesetter files are harmed in this transplant.
Before starting this process please, please, please rename your HTMLArea30beta directory. Do not erase your current HTMLArea30beta until the new code works. You've been warned.
Step 1: Download the gzip or zip file from our web site onto your server or your local workstation.
Step 2: Rename your HTMLArea30beta directory (You read the above warning, right?)
Step 3: Unpack the new files.
For users installing from your server. Move/copy the gzip or zip file into your modules/pagesetter/guppy directory. Now extract the file into the HTMLArea30beta directory.
Use 'tar xvfz HTMLArea30beta.tgz' or 'unzip HTMLArea30beta.zip'.
You may need to set file ownership depending on your hosting setup.
Example: chown -R admin4:admin4 HTMLArea30beta
For users installing using ftp. Unpack the gzip or zip file onto your local workstation and ftp the HTMLArea30beta directory into your modules/pagesetter/guppy directory.
Step 4: Edit the ExtendedFilemanager configuration file to point to your base image directory and specify the image manipulation program to use.
The file to edit is
modules/pagesetter/guppy/HTMLArea30beta/guppy/plugins/ExtendedFileManager/config.inc.php.
Make the necessary changes for your server set up. For example I use image_store on the web root to store images used on the site. I also use ImageMajick to size thumbnails, etc. so I edit the appropriate fields.
Step 5: Add editorsetup.js to your publications to extend the editor functionality and enable the ExtendedFileManager for uploading images as well as the Full Screen Editor plugin. Go into your pagesetter/publications folder and create a folder for each publication type you which to use the features with. Make sure the folder is named exactly the same as your pub type name. Then create a new file in each folder called editorsetup.js.
Insert the following code into editorsetup.js and save the file.
// Load various plugins on load of the setup script
HTMLArea.loadPlugin("FullScreen");
HTMLArea.loadPlugin("ExtendedFileManager");
// This function is called (if it exists) after the editor configuration is created,
// but before the editor itself is created
function HTMLAreaConfigSetup(config)
{
// Here you can call config.registerButton, change the toolbar, and much more ... see HTMLArea's own documentation
config.hideSomeButtons(" fontname fontsize ");
}
// This is called with the editor right after it has been created
function HTMLAreaEditorSetup(editor)
{
// Register the plugins
editor.registerPlugin(FullScreen);
editor.registerPlugin(ExtendedFileManager);
}
In my editorsetup.js I have removed the 'fontname' and 'fontsize' buttons from the default editor toolbars as I do not let my users change these options on pages they create. You can, of course, initialize and use any of the other plugins as you see fit. Many other plugins are included in the download. I have not fully tested all of them so you are on your own. I will tackle SpellChecker using the new PHP backend instead of the current Perl backend and hopefully post how to use this plugin soon.
Any questions please post here or on our forum at imijit.net and I will do my best to answer them. I have not tested this on Windows or using shared hosting setups (we run our own servers). You may need to make changes to the way the URL's and base directories are specified in the ExtendedFileManager config file to get it to see your image folder.
You can download the HTMLArea3/Xinha files on our web site
http://imijit.net , no registration required, just go to Downloads.
More information on the Xinha project can be found at
http://xinha.py…on-hosting.com.
I did this only because I needed to fix some problems with the current HTMLArea3 implementation that Pagesetter uses and I needed the additional image insert and full screen capability and I know J?rn has more important things to do than scratch my itch.
Hopefully this is beneficial to someone else.
-- Unixace
[Edited on 15/5/2005 by unixace]