DevEdit Installation and Integration Guide
Introduction
- Overview
- Server Requirements
- Uploading the Files
- Testing DevEdit
- DevEdit Example
- Upgrading DevEdit version 5.x to DevEdit NX
Overview
DevEdit is a PHP class that you can use to replace the TEXTAREA tag in your web based applications with a more powerful, easy-to-use WYSIWYG HTML editor.
The DevEdit files need to be uploaded to a location on your web server and be accessible by your content management system or web-based application.
DevEdit also comes pre-packaged with a number PHP test files, so that you can test DevEdit before integrating into your CMS.
Server Requirements
Before you can install DevEdit, you must make sure that your web server meets the minimum system requirements, which are shown below:
- Operating System: Windows NT/2000 or Linux/Unix
- Web Server: Apache Web Server or IIS5
- Scripting Language: PHP 4.3 or above
Note: There must be NO restrictions on browser-based file uploading if you want image and file uploading to work. This includes but is not limited to open_basedir, file_upload, etc. If you are unsure, please check with your web host before purchasing.
Uploading the Files
You should have downloaded the DevEdit zip file from our web site after you paid for your order. Use an unzip program such as WinZip to extract the files to a temporary directory on your PC, such as c:\myTemp. Once extracted, move into the c:\myTemp directory using Windows explorer. You should see a directory called 'de', as well as several test PHP scripts
You now need to FTP into your web server and upload both the 'de' directory and the test scripts into any directory of your choice. After your FTP program has finished uploading the files, DevEdit is ready to test, which is what we will look at next.
Testing DevEdit
You should have uploaded several test scripts along with your 'de' directory. To test DevEdit, create a directory called 'myImages' in the root directory of your web server. This will allow you to experiment with image uploading, etc.
Next, run the detest.php file in Internet Explorer version 5.5 or above or any Gecko browser, including FireFox or Netscape:
http://www.yoursite.com/detest.php
The DevEdit control should appear on the page, complete with all buttons on the toolbar and tabs at the bottom of the control.
To make sure everything is working, enter a value in the text area and then click on the 'Get HTML' button at the bottom of the control. You should see the HTML generated by the DevEdit control appear in the text box at the bottom of the page.
Congratulations, your setup of DevEdit was a success!
Note: When you are including DevEdit in your own PHP files, make sure you include the class under a global scope i.e. it is not included as part of a function. It must be included outside of any functions or classes.
DevEdit Example
This is a simple example of how to place a DevEdit control on your web page.
<?php session_start() ?>
<html>
<head><title> DevEdit Test -- Default Mode </title></head>
<body bgcolor="#ffffff">
<?php
//Include the DevEdit class file
include_once("de/class.devedit.php"); ?>
<form action="detest.php" method="post">
<?php
// Create a new DevEdit class object
$myDE = new devedit;
// Set the name of this DevEdit class
$myDE->SetName("myDevEditControl");
// Set the path to the de folder
SetDevEditPath("de");
// Set the path to the folder that contains the flash files for the flash manager
$myDE->SetFlashPath("/test_flash");
$myDE->SetPathType(DE_PATH_TYPE_FULL);
$myDE->SetDocumentType(DE_DOC_TYPE_HTML_PAGE);
$myDE->SetImageDisplayType(DE_IMAGE_TYPE_THUMBNAIL);
$myDE->EnableGuidelines();
$myDE->SetTextAreaDimensions(60, 90);
$val = "";
if($myDE->GetValue(false) == "")
$val = "<b><font face=Verdana size=5 color=#0C6684>Welcome to DevEdit!</font></b>";
else
$val = $myDE->GetValue(false);
//Set the initial HTML value of our control
$myDE->SetValue($val);
//Display the DevEdit control. This *MUST* be called between <form> and </form> tags
$myDE->ShowControl("90%", "80%", "/test_images");
//Display the rest of the form
?><br><br>
<input type="submit" value="Get HTML >>"><br><br>
<textarea cols="100" rows="10"><?php
echo $myDE->GetValue(false); ?>
// or you can use the post variable
// echo $_POST["myDevEditControl_html"]
?></textarea>
</form>
</body>
</html>
Upgradeing DevEdit version 5.x to DevEdit NX
Upgrading from DevEdit version 5.x to DevEdit NX is an extremely simple process.
Firstly, upload the new 'de' folder onto your web server, overwriting the old 'de' folder. Make sure you create a backup of your old files before doing this. All functions and file names have remained the same from previous versions, so DevEdit NX should now run automatically.
There are a few additional features in DevEdit NX that you may want to configure. See the PHP API part of the documentation for more information on each of these functions:
- setMediaPath
- setLinkPath
- setSkin
- setMode
