TextMaster V 1.2 by Jack_mcs 05-08-08 This contribution allows the shop owner to edit the text on any page in his shop which is located beneath the root directory. Unlike other text editor contributions, it doesn't require any code changes to be made to the root files, which makes it more flexible and compatible with other contributions. Tested on osCommerce MS2 and RC2 shops INSTALLATION: ----------------------------------------------------------------------- 1) Upload all of the files located in the admin directory of this archive to the corresponding location on your server. ----------------------------------------------------------------------- 2) Download the TinyMCE editor from: http://sourceforge.net/project/showfiles.php?group_id=103281 Please note that the minimum version required is 3.0. Upload the tiny_mce directory found in the jscripts directory of that file to your admin/includes/javascripts directory. Please note that that directory should already exist, due to the upload in step 1, and that there is an existing file in it, general.php. That file is required. It comes from the TinyMCE Anywhere contribution by Rigadin. ----------------------------------------------------------------------- 3) Create a directory in admin named backups_textmaster and give it full privileges that are correct for your server (usually 755 but could be 777). Usually setting them to the same that are on the images directory will be correct. ----------------------------------------------------------------------- 4) In admin/includes/column_left.php, add the following anywhere before the final ?> require(DIR_WS_BOXES . 'textmaster.php'); ----------------------------------------------------------------------- 5) In admin/includes/filenames.php, add the following anywhere before the final ?> define('FILENAME_TEXTMASTER', 'textmaster.php'); ----------------------------------------------------------------------- 6) In admin/includes/languages/english.php, add the following anywhere before the final ?> // textmaster text in includes/boxes/textmaster.php define('BOX_HEADING_TEXTMASTER', 'TextMaster'); define('BOX_TEXTMASTER_CONTROL', 'Text Master Control'); That's all. /**************************************************************/ USAGE: Go to admin->TextMaster and notice the two dropdown menus. The one on the left is for navigating through the directories. The initial directory is the languages directory. If you would prefer to start in the includes directory, edit the admin/textmaster.php file and change the line that reads $initialDir = DIR_WS_LANGUAGES; //DIR_WS_INCLUDES; to $initialDir = DIR_WS_INCLUDES; The dropdown on the right lists the files in the selected directory. Clicking on a file will cause it to load. If the file contains definitions, then each one is broken into its own box. This will be the common method in the languages directory. If the file doesn't contain any definitions, then only one box will be displayed. If definitions are found, you will need to enable the editor for the box you want to edit, assuming you would like to use it. Otherwise, it is enabled automatically. After a file has been edited, the Restore From Backup button will be active. Clicking on that will restore the last saved file. Please note that at this time, only one level of backups exists. So if you make a change, update the file and do that again, the first change is lost. For testing purposes, there are two files in the testfiles directory. You should upload those to the same location on your server (one file to the root and one to the english directory). Then go to admin->TextMaster, navigate to the english directory using the left dropdown and select the testpage.php file from the right dropdown. Make whatever changes you want to it and update. Then go to http://type_your_domain_name_here.com/testpage.php to view the page. This will allow you to play around with the contribution without damaging your site. Once it is working for you, should delete the two test files. /**************************************************************/ NOTES: If you find that your edited files have extra slashes (/) in them, edit the admin/textmaster.php file and change the line that reads //$fp = stripslashes_array($fp); to $fp = stripslashes_array($fp); /**************************************************************/ SUPPORT: The support thread is located: http://forums.oscommerce.com/index.php?showtopic=301248