<?php
$referer = $_SERVER["HTTP_REFERER"];
$check_referer = substr($referer,7,3);
// checks the 3-chars substring of the $referer thats following the "<a href="http://" target="_blank">http://</a>" part
if ($check_referer == "www") {
// if "www" has been detected
$BasePath = "<a href="http://www.your-domain.com/FCKeditor/" target="_blank">http://www.your-domain.com/FCKeditor/</a>";
}
else if ($check_referer == "loc") {
// if "localhost" has been detected
$BasePath = "<a href="http://localhost/FCKeditor/" target="_blank">http://localhost/FCKeditor/</a>";
}
else {
// if neither "www" nor "localhost" were detected, its obviously a domain without "www"...
$BasePath = "<a href="http://your-domain.com/FCKeditor/" target="_blank">http://your-domain.com/FCKeditor/</a>";
}
?>
RE: javascript permisson denied error upon lo
<input type="hidden" id="FCKTest" name="FCKTest" value="Some text">
<input type="hidden" id="FCKTest___Config" value="">
<div id="MyEditor" name="MyEditor">
<iframe id="FCKTest___Frame" name="FCKTest___Frame" src="FCKeditor/editor/fckeditor.html?InstanceName=FCKTest&Toolbar=MyToolbar" width="100%" height="200" frameborder="no" scrolling="no">
</iframe>
</div>
// redRemedy - Sweden
RE: javascript permisson denied error upon load
http://www.your-domain.com
http://your-domain.com
oFCKeditor.BasePath='<?php echo $BasePath; ?>' ;