Index: /CKEditor/trunk/_source/core/ckeditor_base.js
===================================================================
--- /CKEditor/trunk/_source/core/ckeditor_base.js	(revision 3090)
+++ /CKEditor/trunk/_source/core/ckeditor_base.js	(revision 3091)
@@ -13,5 +13,5 @@
 // ckeditor_source.js and ckeditor_basic_source.js files.
 
-// if (!window.CKEDITOR){window.CKEDITOR=(function(){return/**@lends CKEDITOR*/{_:{},status:'unloaded',timestamp:'',basePath:(function(){var A='';var B=document.getElementsByTagName('script');for (var i=0;i<B.length;i++){var C=B[i].src.match(/(^|.*[\\\/])ckeditor(?:_basic)?(?:_source)?.js(?:\?.*)?$/i);if (C){A=C[1];break;}};if (A.indexOf('://')==-1){if (A.indexOf('/')===0) A=location.href.match(/^.*?:\/\/[^\/]*/)[0]+A;else A=location.href.match(/^[^\?]*\//)[0]+A;};return A;})(),getUrl:function(resource){if (resource.indexOf('://')==-1&&resource.indexOf('/')!==0) resource=this.basePath+resource;if (this.timestamp) resource+=(resource.indexOf('?')>=0?'&':'?')+'t='+this.timestamp;return resource;}};})();};
+// if(!window.CKEDITOR)window.CKEDITOR=(function(){var a={timestamp:'',_:{},status:'unloaded',basePath:(function(){var d=window.CKEDITOR_BASEPATH||'';if(!d){var e=document.getElementsByTagName('script');for(var f=0;f<e.length;f++){var g=e[f].src.match(/(^|.*[\\\/])ckeditor(?:_basic)?(?:_source)?.js(?:\?.*)?$/i);if(g){d=g[1];break;}}}if(d.indexOf('://')==-1)if(d.indexOf('/')===0)d=location.href.match(/^.*?:\/\/[^\/]*/)[0]+d;else d=location.href.match(/^[^\?]*\/(?:)/)[0]+d;return d;})(),getUrl:function(d){if(d.indexOf('://')==-1&&d.indexOf('/')!==0)d=this.basePath+d;if(this.timestamp)d+=(d.indexOf('?')>=0?'&':'?')+('t=')+this.timestamp;return d;}},b=window.CKEDITOR_GETURL;if(b){var c=a.getUrl;a.getUrl=function(d){return b.call(a,d)||c.call(a,d);};}return a;})();
 
 // #### Raw code
@@ -28,5 +28,7 @@
 	window.CKEDITOR = (function()
 	{
-		return /** @lends CKEDITOR */ {
+		var CKEDITOR =
+		/** @lends CKEDITOR */
+		{
 
 			/**
@@ -75,4 +77,7 @@
 			/**
 			 * Contains the full URL for the CKEditor installation directory.
+			 * It's possible to manually provide the base path by setting a
+			 * global variable named CKEDITOR_BASEPATH. This global variable
+			 * must be set "before" the editor script loading.
 			 * @type String
 			 * @example
@@ -85,15 +90,19 @@
 
 				// Find out the editor directory path, based on its <script> tag.
-				var path = '';
-				var scripts = document.getElementsByTagName( 'script' );
+				var path = window.CKEDITOR_BASEPATH || '';
 
-				for ( var i = 0 ; i < scripts.length ; i++ )
+				if ( !path )
 				{
-					var match = scripts[i].src.match( /(^|.*[\\\/])ckeditor(?:_basic)?(?:_source)?.js(?:\?.*)?$/i );
+					var scripts = document.getElementsByTagName( 'script' );
 
-					if ( match )
+					for ( var i = 0 ; i < scripts.length ; i++ )
 					{
-						path = match[1];
-						break;
+						var match = scripts[i].src.match( /(^|.*[\\\/])ckeditor(?:_basic)?(?:_source)?.js(?:\?.*)?$/i );
+
+						if ( match )
+						{
+							path = match[1];
+							break;
+						}
 					}
 				}
@@ -118,4 +127,9 @@
 			 * returned by this function contains a querystring parameter ("t")
 			 * set to the {@link CKEDITOR.timestamp} value.
+			 * It's possible to provide a custom implementation to this
+			 * function by setting a global variable named CKEDITOR_GETURL.
+			 * This global variable must be set "before" the editor script
+			 * loading. If the custom implementation returns nothing, the
+			 * default implementation is used.
 			 * @returns {String} The full URL.
 			 * @example
@@ -141,4 +155,19 @@
 			}
 		};
+
+		// Make it possible to override the getUrl function with a custom
+		// implementation pointing to a global named CKEDITOR_GETURL.
+		var newGetUrl = window.CKEDITOR_GETURL;
+		if ( newGetUrl )
+		{
+			var originalGetUrl = CKEDITOR.getUrl;
+			CKEDITOR.getUrl = function ( resource )
+			{
+				return newGetUrl.call( CKEDITOR, resource ) ||
+					originalGetUrl.call( CKEDITOR, resource );
+			}
+		}
+		
+		return CKEDITOR;
 	})();
 }
Index: /CKEditor/trunk/ckeditor_basic_source.js
===================================================================
--- /CKEditor/trunk/ckeditor_basic_source.js	(revision 3090)
+++ /CKEditor/trunk/ckeditor_basic_source.js	(revision 3091)
@@ -6,5 +6,5 @@
 // Compressed version of core/ckeditor_base.js. See original for instructions.
 /*jsl:ignore*/
-if (!window.CKEDITOR){window.CKEDITOR=(function(){return/**@lends CKEDITOR*/{_:{},status:'unloaded',timestamp:'',basePath:(function(){var A='';var B=document.getElementsByTagName('script');for (var i=0;i<B.length;i++){var C=B[i].src.match(/(^|.*[\\\/])ckeditor(?:_basic)?(?:_source)?.js(?:\?.*)?$/i);if (C){A=C[1];break;}};if (A.indexOf('://')==-1){if (A.indexOf('/')===0) A=location.href.match(/^.*?:\/\/[^\/]*/)[0]+A;else A=location.href.match(/^[^\?]*\//)[0]+A;};return A;})(),getUrl:function(resource){if (resource.indexOf('://')==-1&&resource.indexOf('/')!==0) resource=this.basePath+resource;if (this.timestamp) resource+=(resource.indexOf('?')>=0?'&':'?')+'t='+this.timestamp;return resource;}};})();};
+if(!window.CKEDITOR)window.CKEDITOR=(function(){var a={timestamp:'',_:{},status:'unloaded',basePath:(function(){var d=window.CKEDITOR_BASEPATH||'';if(!d){var e=document.getElementsByTagName('script');for(var f=0;f<e.length;f++){var g=e[f].src.match(/(^|.*[\\\/])ckeditor(?:_basic)?(?:_source)?.js(?:\?.*)?$/i);if(g){d=g[1];break;}}}if(d.indexOf('://')==-1)if(d.indexOf('/')===0)d=location.href.match(/^.*?:\/\/[^\/]*/)[0]+d;else d=location.href.match(/^[^\?]*\/(?:)/)[0]+d;return d;})(),getUrl:function(d){if(d.indexOf('://')==-1&&d.indexOf('/')!==0)d=this.basePath+d;if(this.timestamp)d+=(d.indexOf('?')>=0?'&':'?')+('t=')+this.timestamp;return d;}},b=window.CKEDITOR_GETURL;if(b){var c=a.getUrl;a.getUrl=function(d){return b.call(a,d)||c.call(a,d);};}return a;})();
 /*jsl:end*/
 
Index: /CKEditor/trunk/ckeditor_source.js
===================================================================
--- /CKEditor/trunk/ckeditor_source.js	(revision 3090)
+++ /CKEditor/trunk/ckeditor_source.js	(revision 3091)
@@ -6,5 +6,5 @@
 // Compressed version of core/ckeditor_base.js. See original for instructions.
 /*jsl:ignore*/
-if (!window.CKEDITOR){window.CKEDITOR=(function(){return/**@lends CKEDITOR*/{_:{},status:'unloaded',timestamp:'',basePath:(function(){var A='';var B=document.getElementsByTagName('script');for (var i=0;i<B.length;i++){var C=B[i].src.match(/(^|.*[\\\/])ckeditor(?:_basic)?(?:_source)?.js(?:\?.*)?$/i);if (C){A=C[1];break;}};if (A.indexOf('://')==-1){if (A.indexOf('/')===0) A=location.href.match(/^.*?:\/\/[^\/]*/)[0]+A;else A=location.href.match(/^[^\?]*\//)[0]+A;};return A;})(),getUrl:function(resource){if (resource.indexOf('://')==-1&&resource.indexOf('/')!==0) resource=this.basePath+resource;if (this.timestamp) resource+=(resource.indexOf('?')>=0?'&':'?')+'t='+this.timestamp;return resource;}};})();};
+if(!window.CKEDITOR)window.CKEDITOR=(function(){var a={timestamp:'',_:{},status:'unloaded',basePath:(function(){var d=window.CKEDITOR_BASEPATH||'';if(!d){var e=document.getElementsByTagName('script');for(var f=0;f<e.length;f++){var g=e[f].src.match(/(^|.*[\\\/])ckeditor(?:_basic)?(?:_source)?.js(?:\?.*)?$/i);if(g){d=g[1];break;}}}if(d.indexOf('://')==-1)if(d.indexOf('/')===0)d=location.href.match(/^.*?:\/\/[^\/]*/)[0]+d;else d=location.href.match(/^[^\?]*\/(?:)/)[0]+d;return d;})(),getUrl:function(d){if(d.indexOf('://')==-1&&d.indexOf('/')!==0)d=this.basePath+d;if(this.timestamp)d+=(d.indexOf('?')>=0?'&':'?')+('t=')+this.timestamp;return d;}},b=window.CKEDITOR_GETURL;if(b){var c=a.getUrl;a.getUrl=function(d){return b.call(a,d)||c.call(a,d);};}return a;})();
 /*jsl:end*/
 
