Total Pageviews

Sunday, June 19, 2011

Assignment 12 - Rich Text Editor (Ability to modify text from a database file directly)

Definition:  An RTE adds WYSIWYG (What You See Is What You Get) editing to our web pages. 

TO DO: 
1) Created RTE table in phpMinAdmin


I uploaded the files listed in the folder: 
sprokets > fckeditor  (FOLDER)
sprokets > rte_test.php (requires admin login)

    When I log in as admin and go to this page it looks like this after I finished editing in the box: 
 2) Change line 37 in fckconfig.js

FCKConfig.BaseHref = 'http://zephir.seattlecentral.edu/~horsey01/sprockets/';
  (now test with rte_test.php)

Reaching the config.php: 

fckeditor/editor/filemanager/connectors/php/config.php

3) changes to the file lie on line 46: 
require_once '/home/classes/horsey01/public_html/sprockets/inc_0700/config_inc.php';  


// Path to user files relative to the document root.
//$Config['UserFilesPath'] = '/userfiles/' ;
$Config['UserFilesPath'] = VIRTUAL_PATH . 'upload/rte/';

// Fill the following value it you prefer to specify the absolute path for the
// user files directory. Useful if you are using a virtual directory, symbolic
// link or alias. Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'.
// Attention: The above 'UserFilesPath' must point to the same directory.
$Config['UserFilesAbsolutePath'] = PHYSICAL_PATH . 'upload/rte/';  

3a) then in fckconfig.js file, line 31
FCKConfig.EditorAreaCSS = 'http://zephir.seattlecentral.edu/~dpham004/foo/themes/DarkRitual/default.css'';  

   3b)Then modified the default Dark Ritual stylesheet (style.css) and renamed it to  fckeditor.css
 Made the following changes in lines 38-44: 
body {
    /*background: #333 url('img/bg.gif');*/
    color: #333;
    /*font: normal 62.5% "Lucida Sans Unicode",sans-serif; */
    font: normal 75% "Lucida Sans Unicode",sans-serif;
    margin: 3% 0;
 } 

4) Then I changed line 99 in fckconfig.js from 

FCKConfig.ToolbarSets["Default"] = [...  to  FCKConfig.ToolbarSets["Goldilocks"] = [
 
5) Now, I just have to upload the files in the appropriate places:
sprockets > fckeditor/editor/filemanager/connectors/php/config.php
sprockets > fckeditor > fckconfig.js
sprockets > themes > Dark Ritual > fckeditor.css

file description here: 

--------------TROUBLESHOOTING ----------------------

Somehow the Editor stopped working after these changes took place. I must have made changes that I should not have made

Backtracking and got the editor to work again but not the stylesheet to show up properly... See below:
File uploading logging here:
________________

HOURLY LOG: 
6-18-2011 -- 3 hours implementing instructions and back tracking 
6-19-2011 -- 2.5 hours trying to figure out what I did wrong in the fckconfig.js (backtracked)

No comments:

Post a Comment