--- ckeditor_php4.php~	2012-04-11 11:46:25.704077460 +0000
+++ ckeditor_php4.php	2012-04-11 11:46:57.760482963 +0000
@@ -519,7 +519,8 @@
 
 		$documentRoot = substr($realPath, 0, strlen($realPath) - strlen($selfPath));
 		$fileUrl = substr($file, strlen($documentRoot));
-		$ckeditorUrl = str_replace("ckeditor_php4.php", "", $fileUrl);
+		$included_files = get_included_files();
+		$ckeditorUrl = str_replace(basename(array_pop($included_files)), "", $fileUrl);
 
 		return $ckeditorUrl;
 	}
--- ckeditor_php5.php~	2012-04-11 11:49:06.306110454 +0000
+++ ckeditor_php5.php	2012-04-11 11:49:27.138375560 +0000
@@ -510,7 +510,8 @@
 
 		$documentRoot = substr($realPath, 0, strlen($realPath) - strlen($selfPath));
 		$fileUrl = substr($file, strlen($documentRoot));
-		$ckeditorUrl = str_replace("ckeditor_php5.php", "", $fileUrl);
+		$included_files = get_included_files();
+		$ckeditorUrl = str_replace(basename(array_pop($included_files)), "", $fileUrl);
 
 		return $ckeditorUrl;
 	}
