--- fckeditor.module	Fri Aug 12 11:02:32 2005
+++ fckeditor.module	Wed Jan 25 14:39:24 2006


@@ -51,0 +52,27 @@
+    $page_path = drupal_get_path_alias($_GET['q']);
+    $paths_excluded = variable_get("fckeditor_exclude", '');
+    $paths_excluded_array = explode("\r\n", $paths_excluded);
+
+    $path_match = 1;
+
+    $Number_of_excludes = count($paths_excluded_array)+1;
+// check each array item to see if it matches an excluded path
+    for($i=0; $i<$Number_of_excludes; $i++){
+// IF WILDCARD in excluded path
+        if(strpos( $paths_excluded_array[$i] , '*' )){
+//remove /* frpm excluded_path
+        $excluded_path = substr($paths_excluded_array[$i], 0, -2);
+
+// see if the page path contains the excluded path
+           if(substr_count ( $page_path, $excluded_path)){
+            $path_match = 0;
+            break;
+           }
+//IF no wildcard check to see if Page path = excluded path
+        }else{
+             if($paths_excluded_array[$i] == $page_path){
+                $path_match = 0;
+                break;
+             }
+        }
+    }


@@ -53 +80 @@
-	if ( fckeditor_is_compatible_client() && $access ) {
+  	if ( fckeditor_is_compatible_client() && $access && $path_match) {


@@ -107 +134,7 @@
-		
+
+    $output .= form_textarea(
+        t('Implement fckeditor on every page except the listed pages'), 'fckeditor_exclude',
+        variable_get("fckeditor_exclude", 'admin/*'),
+        40, 5,
+        t("Enter the paths of the pages you don't want fckeditor implemented on. Enter one page per line as Drupal paths.  The '*' character is a wildcard. Example paths are '<em>admin/settings/fckeditor</em>' for the fckeditor settings page and '<em>admin/*</em>' for every admin page."));
+
