Stating the obvious:
1: Many people are asking how to use FCKeditor to edit their web pages and implement the editor.
2: They don't want to use a database or can't.
3: There is no real clear documentation on how to do this (the Wiki should have examples… I say no more).
4: I AM NOT A PHP CODE GURU. My coding is very bad; so do not beat up on me! I am only trying to help…
What I needed and what I came up with:
I needed an editor that would let me edit existing pages and not use a database. I have a customer who has a site that needs a 'points' page updated daily throughout the summer (it is a racing site) and a DB would be overkill.
My solution and mini tutorial:
The following code is NOT PERFECT and just a starting point! If a real code guru could clean this up or shorten the steps that would be great. Also, this document was very helpful (PDF); http://www.linux-magazine.com/issue/59/FCKEditor.pdf
And you might want an activity spinner: http://mentalized.net/activity-indicators/
1: I created four pages (call them what you want, my names are for clarity):
public.php (the page that the world will see)
editor.php (this is the FCKeditor page - the one that no one sees but the editor/admin person)
saved-data.php (the actual page that gets edited - it needs to be totally blank and make sure you have 'write permissions'.
compiler.php (it has the code that saves the web page edits to the 'saved-data.php' page and has a cool spinner on it)
How it all works:
The 'public' page has a php include call in it that pulls the 'saved-date' page like this: <?php include stripslashes('saved-data.php'); ?>