Fast Edit 1.0 - An "edit in place" tool with extended CMS capabilities (C) 2010 Beverley Hooton
(author website - http://fast-edit.co.uk/)

    Fast Edit is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.


Fast Edit Features
==================

Fast Edit:
----------
Fast Edit is a password protected web page editor which, as well as allowing you to quickly edit 
and save web page content using a simple, point-and-click toolbar, also comes bundled with some 
other great features to help you (or your client) make changes to a website on the fly;

 
File Manager:
-------------
Structure, upload, rename, move and delete your files.

 
Template Manager:
-----------------
Edit you website's stylesheet (or custom parts of it) using CSS to quickly alter the look of your site.

 
Page Manager:
-------------
Create new pages, set menu order, toggle menu visibility, backup, restore and delete the pages of your site.


See <http://fast-edit.co.uk/features.php> for more information.


Fast Edit Background
====================

I wrote Fast Edit primarily to suit my own needs, but have since developed the 
scripts further in the hope that it will be useful to others. I'm not saying that 
the code is perfect (I'm still learning) but it does the job.


Version Notes
=============

Fast Edit 1.0
-------------
Tested in Firefox 3, Internet Explorer 6, 7, 8 and 9, Google Chrome, Opera 10 and Safari 5.
(File Manager requires Adobe Flash Player 9)


Change Log
==========

- 18th April 2012: More intuative manual menu ordering added; 
	Changes made to "fast_edit/fast_edit.php" and "fast_edit/styles/fast_edit.css"
	Additional "fast_edit/images/down.png" (green down-arrow image) also added
- 15th April 2012: Menu alias feature added - loads directly under the Fast Edit window (n/a to home page);
	Changes made to "includes/menu.html", "fast_edit/fast_edit_config.php", "fast_edit/fast_edit.php" and both CSS files in "fast_edit/styles/"
	Additional "fast_edit/_menu_alias/" folder (plus contents) also added
- 14th April 2012: GMT hours offset added to correct server time difference - only "fast_edit/fast_edit_config.php" and "fast_edit/fast_edit.php" changed
- 21st March 2012: TinyMCE v3.3.7 has bugs in IE9 - use IE=EmulateIE8 meta tag when logged in
- 26th January 2011: - Sort function fixed on current/backup times and dates - now sorts on numeric filemtime() value rather than formatted time/date
- 26th January 2011: - Fail-safe added to prevent certain new pages being created that would otherwise overwrite critical programming files/folders;
	"index" and "page_preview" (capitalised/space variations accounted for too)
- 26th January 2011: - Fail-safe added to prevent new page creation overwriting existing files
- 20th January 2011: "stripslashes()" bug fix added to template manager textarea
- 13th January 2011: cleaned up some "isset()" errors in "fast_edit/fast_edit_config.php" and "fast_edit/fast_edit_login.php"
- 13th December 2010: Bug fixed with File Manager settings - see "fast_edit/fast_edit_config.php" for changes
- 10th November 2010: Save glitch fixed on Template Manager - used to wipe backup
- 16th August 2010: Further save/login redirect modifications made from user feedback (Thanks Sam)
- 14th July 2010: ['REQUEST_URI'] fix added for redirects on IIS servers


Requirements
============

- PHP enabled server with "Safe Mode" turned OFF (tested on Apache under Linux and Microsoft-IIS/6.0 on Windows NT PROXY 5.2 build 3790)
	(File Manager requires Adobe Flash Player 8 +)
- access to chmod files on your hosting server
- a javascript enabled web browser

Supported browsers:
	Internet Explorer 6 +
	Firefox 3 +
	Safari 3 +
	Opera 10 +
	Google Chrome


Fast Edit Installation
======================

1. Download the Fast Edit zip package.
  
2. Browse to the "fast_edit/fast_edit_config.php" file and enter your settings.
  
3. FTP the entire Fast Edit package to the ROOT of your website. 
(the "page_preview.php" file should be in the home folder alongside your other web pages)
  
4. CHMOD the "fast_edit/" and "userfiles/" folders, plus all of their contents, to 755.
(Try 777 if 755 doesn't work. At this point, you should be able to view Fast Edit v1.0 in your browser and login to see it in action.)
  
5. Rename your website pages to have the .php extension (e.g. - "about_us.html" becomes "about_us.php").
  
6. Extract the editable content from each web page and save it in the "fast_edit/_content/" folder.
Create one .txt file per page and name it exactly the same thing as the parent .php page, except with 
the .txt extension. (e.g. - "my_pet_cat.php" + "fast_edit/_content/my_pet_cat.txt").

7. In place of the editable content that you've just removed from the parent .php pages, add this code: 
<div class="editable">
    <?php include($contentpage);?>
</div> 

8. Everything above the code from step 7 should form your "header.html" file and everything below forms your "footer.html" file. 
Extract and save this information to the files already provided in the "includes/" folder.

9(a). Add the following code snippets to your site's header file. 
You should use the "header.html" file already provided in the "includes/" folder as a guide. 

Right at the start, before any other content:
--------------------------------------------- 
<?php session_start();?>
<?php require('fast_edit/fast_edit_login.php');?>
 
Between the <head> </head> tags:
-------------------------------- 
<?php if (isset($_SESSION['username'])) { ?><meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/><?php } ?>
<title><?php echo $dynamic_title ;?> : <?php echo $website_title ;?></title>
<link rel="stylesheet" type="text/css" href="fast_edit/editable_site_styles.css" /> 
<link rel="stylesheet" type="text/css" href="fast_edit/styles/fast_edit.css" />
<!--[if IE]><link rel="stylesheet" type="text/css" href="fast_edit/styles/fast_edit_ie.css" /><![endif]-->
<?php if (isset($_SESSION['username'])) { ?>
<script type="text/javascript" src="fast_edit/tinymce_3_3_7/tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript" src="fast_edit/tinymce_3_3_7/tinymce/jscripts/tiny_mce/plugins/tinybrowser/tb_tinymce.js.php"></script>
<script type="text/javascript" src="fast_edit/tinymce_3_3_7/tinymce/jscripts/tiny_mce/plugins/tinybrowser/tb_standalone.js.php"></script>
<script type="text/javascript" src="fast_edit/js/fast_edit_toolbar.js"></script> 
<?php } ?>
<script type="text/javascript" src="fast_edit/js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="fast_edit/js/jquery.cookie.js"></script> 
<?php if (isset($_SESSION['username'])) { ?>
<script type="text/javascript" src="fast_edit/js/jquery.tablesorter.js"></script> 
<script type="text/javascript" src="fast_edit/js/jquery.tablesorter.pager.js"></script>
<?php } ?>
<script type="text/javascript" src="fast_edit/js/fast_edit_functions.js"></script> 
  
Right after the opening <body> tag: 
-----------------------------------
<?php if ($dynamic_title != "Page Preview") { ?>
<div class="admin-login">
    Admin Login: <img src="fast_edit/images/lock.png" alt="Admin Login" class="login">
    <div class="login-box">
        <form method="post" action="<?php echo $_SERVER['PHP_SELF'];?>?action=login">
        Username:<br/><input type="text" name="name" size="15"/><br/>
        Password:<br/><input type="password" name="pass" size="15"/><br/>
        <input type="image" src="fast_edit/images/login.gif" name="submit_login" value="Login" title="Login" class="login-submit"/>
        </form>
    </div>
</div>
<?php } ?> 

The dynamic menu so put it somewhere in your header content, where you want the menu to appear:
----------------------------------------------------------------------------------------------- 
<?php include('includes/menu.html');?> 


9(b). Add the following code snippet to your site's footer file. 
You should use the "footer.html" file already provided in the "includes/" folder as a guide.

Right at the bottom of your editable content. Above the closing </body> tag would be a good place: 
--------------------------------------------------------------------------------------------------
<?php include('fast_edit/fast_edit.php');?> 


10. Once you're done preparing all of the header and footer information, you should expand slightly on the code supplied in step 7, 
to include reference to these two very important files. The only content in the .php pages at the root of your website should now be: 
<?php include('includes/header.html');?> 
    <div class="editable">
        <?php include($contentpage);?>
    </div> 
<?php include('includes/footer.html');?>  


That should be it! Login using the admin login link in the top right corner.


Fast Edit Installation - Additional
===================================
The Template Manager's custom stylesheet can be found at this location in the download pack: 
"fast_edit/editable_site_styles.css". Please populate this file with the non-critical CSS that you 
wish to be editable via Fast Edit.

Customise the editor WYSIWYG toolbar in the "fast_edit/js/fast_edit_toolbar.js" file. 
Please refer to the TinyMCE examples page for all available options <http://tinymce.moxiecode.com/examples/full.php>

"h1.title" and "h2.sub-title" are custom classes assigned by the [Title] and [Sub-Title] buttons in the WYSIWYG toolbar.
Styling for these must be included in your default site stylesheet otherwise the user won't be able to create main or 
sub-titles in their web page content.

The File Manager (TinyBrowser - third party plugin) may need additional configuration. 
Check that the "file upload paths" and "file link paths" are set correctly in the 
"fast_edit/tinymce_3_3_7/tinymce/jscripts/tiny_mce/plugins/tinybrowser/config_tinybrowser.php" file.


See <http://fast-edit.co.uk/installation1.php> for more information.


Troubleshooting
===============

If you experience problems with the File Manager (TinyBrowser), please try below:
(as copied from "fast_edit/tinymce_3_3_7/tinymce/jscripts/tiny_mce/plugins/tinybrowser/readme.txt")

If you receive a 403, 406 or 412 status error on uploading files, please create
an .htaccess file in your tinybrowser directory with the following contents:

SecFilterEngine Off
SecFilterScanPOST Off

If you use Linux and the Squid proxy, you need to add a "ignore_expect_100 on"
flag to the squid config file to avoid a 417 status error.


See <http://fast-edit.co.uk/questions_and_answers.php> for more information.


Contact
=======

Please email admin@fast-edit.co.uk if you notice any bugs or have ideas for new features.


-------------------------------
File Last Modified 18th/04/2012