Ok. I've been having a "dynamic" browsing/upload folder issue. I've tried about 4 different things... all to no avail.
Now, I found something here:
That has this PHP code to possibly fix this issue. If this does indeed work and allows the user to override the folder settings dynamically, can someone please help convert this into ASP? It just doesn't seem to work for me.
//----------------------------------
// Add jsavscript to HEAD to replace textarea with HTML editor
// The name of the textarea we want to replace is 'text_content'
// Notice that we specify a oFCKeditor.Config[\'ImageBrowserURL\'] and a oFCKeditor.Config[\'LinkBrowserURL\']
// We can dynamically assign the folders the user can look at by changing the ServerPath variable.
$server_path = BASE_PATH.'content/';
$server_path_img = $server_path.'images/';
$server_path_links = $server_path.'links/';
$server_path_flash = $server_path.'flash/';
$_js = '
<script type="text/javascript" src="fkeditor/fckeditor.js"></script>
<script type="text/javascript">
window.onload = function()
{
var oFCKeditor = new FCKeditor( \'text_content\' ) ; // Instantiate an editor with
// the name of the TEXTAREA input.
oFCKeditor.BasePath = "fkeditor/" ; // This may need to change depending on the name
// of the folder you have FCKeditor in.
oFCKeditor.Height = "500"; // NOTE: do not put px, just leave the numbers as is
// See the documentation for more parameters. Width, setToolbar etc...
// NOTE: it is important to have the ../../ in the file path
// There probably is a bug that needs to be fixed.
// Also we pass the Type and the ServPath variable
oFCKeditor.Config[\'ImageBrowserURL\'] = oFCKeditor.BasePath + \'../../filemanager/browser/default/browser.html?Connector=connectors/php/connector.php&Type=Image&ServerPath='.$server_path_img.'\';
oFCKeditor.Config[\'LinkBrowserURL\'] = oFCKeditor.BasePath + \'../../filemanager/browser/default/browser.html?Connector=connectors/php/connector.php&ServerPath='.$server_path_links.'\';
oFCKeditor.Config[\'FlashBrowserURL\'] = oFCKeditor.BasePath + \'../../filemanager/browser/default/browser.html?Connector=connectors/php/connector.php&Type=Flash&ServerPath='.$server_path_flash.'\';
// This line must come in last once all the configs have been made.
oFCKeditor.ReplaceTextarea() ;
}
</script>
';
$tpl->append('HEAD',$_js);
//-----------------------------------------------
Thanks!
Pete
Now, I found something here:
That has this PHP code to possibly fix this issue. If this does indeed work and allows the user to override the folder settings dynamically, can someone please help convert this into ASP? It just doesn't seem to work for me.
//----------------------------------
// Add jsavscript to HEAD to replace textarea with HTML editor
// The name of the textarea we want to replace is 'text_content'
// Notice that we specify a oFCKeditor.Config[\'ImageBrowserURL\'] and a oFCKeditor.Config[\'LinkBrowserURL\']
// We can dynamically assign the folders the user can look at by changing the ServerPath variable.
$server_path = BASE_PATH.'content/';
$server_path_img = $server_path.'images/';
$server_path_links = $server_path.'links/';
$server_path_flash = $server_path.'flash/';
$_js = '
<script type="text/javascript" src="fkeditor/fckeditor.js"></script>
<script type="text/javascript">
window.onload = function()
{
var oFCKeditor = new FCKeditor( \'text_content\' ) ; // Instantiate an editor with
// the name of the TEXTAREA input.
oFCKeditor.BasePath = "fkeditor/" ; // This may need to change depending on the name
// of the folder you have FCKeditor in.
oFCKeditor.Height = "500"; // NOTE: do not put px, just leave the numbers as is
// See the documentation for more parameters. Width, setToolbar etc...
// NOTE: it is important to have the ../../ in the file path
// There probably is a bug that needs to be fixed.
// Also we pass the Type and the ServPath variable
oFCKeditor.Config[\'ImageBrowserURL\'] = oFCKeditor.BasePath + \'../../filemanager/browser/default/browser.html?Connector=connectors/php/connector.php&Type=Image&ServerPath='.$server_path_img.'\';
oFCKeditor.Config[\'LinkBrowserURL\'] = oFCKeditor.BasePath + \'../../filemanager/browser/default/browser.html?Connector=connectors/php/connector.php&ServerPath='.$server_path_links.'\';
oFCKeditor.Config[\'FlashBrowserURL\'] = oFCKeditor.BasePath + \'../../filemanager/browser/default/browser.html?Connector=connectors/php/connector.php&Type=Flash&ServerPath='.$server_path_flash.'\';
// This line must come in last once all the configs have been made.
oFCKeditor.ReplaceTextarea() ;
}
</script>
';
$tpl->append('HEAD',$_js);
//-----------------------------------------------
Thanks!
Pete
RE: Help Converting PHP fix to ASP
ooopss.. here is the link where I got this PHP fix from:
http://wiki.fckeditor.net/Developer%27s ... le_Browser