[svn r17742] added advanced ajaxfilemanager option to blogs

skala
Juan Carlos Raña 16 years ago
parent 374af6cb2d
commit 1f8518a5f0
  1. 95
      main/inc/lib/blog.lib.php

@ -1319,8 +1319,34 @@ class Blog
$oFCKeditor->Height = '350';
$oFCKeditor->Width = '98%';
$oFCKeditor->Value = isset($_POST['post_full_text'])?stripslashes($_POST['post_full_text']):'';
$oFCKeditor->Config['CustomConfigurationsPath'] = api_get_path(REL_PATH)."main/inc/lib/fckeditor/myconfig.js";
$oFCKeditor->Config['IMUploadPath'] = "upload/blog/";
if (api_get_setting('advanced_filemanager') == 'true')
{
$oFCKeditor->Config['AdvancedFileManager'] = true;
$oFCKeditor->Config['CustomConfigurationsPath'] = api_get_path(REL_PATH)."main/inc/lib/fckeditor/myconfig_afm.js";
// For images
$oFCKeditor->Config['ImageBrowserURL'] = $oFCKeditor->BasePath . "editor/plugins/ajaxfilemanager/ajaxfilemanager.php";
// For flash
$oFCKeditor->Config['FlashBrowserURL'] = $oFCKeditor->BasePath . "editor/plugins/ajaxfilemanager/ajaxfilemanager.php";
// For MP3
$oFCKeditor->Config['MP3BrowserURL'] = $oFCKeditor->BasePath . "editor/plugins/ajaxfilemanager/ajaxfilemanager.php";
// For video
$oFCKeditor->Config['VideoBrowserURL'] = $oFCKeditor->BasePath . "editor/plugins/ajaxfilemanager/ajaxfilemanager.php";
// For flv Player (Videos)
$oFCKeditor->Config['VideoBrowserURL'] = $oFCKeditor->BasePath . "editor/plugins/ajaxfilemanager/ajaxfilemanager.php";
}
else
{
$oFCKeditor->Config['AdvancedFileManager'] = false;
$oFCKeditor->Config['CustomConfigurationsPath'] = api_get_path(REL_PATH)."main/inc/lib/fckeditor/myconfig.js";
$oFCKeditor->Config['IMUploadPath'] = "upload/blog/";
}
$oFCKeditor->ToolbarSet = "Blog";
$TBL_LANGUAGES = Database::get_main_table(TABLE_MAIN_LANGUAGE);
@ -1399,8 +1425,33 @@ class Blog
$oFCKeditor->Height = '350';
$oFCKeditor->Width = '98%';
$oFCKeditor->Value = isset($_POST['post_full_text'])?stripslashes($_POST['post_full_text']):$blog_post_text;
$oFCKeditor->Config['CustomConfigurationsPath'] = api_get_path(REL_PATH)."main/inc/lib/fckeditor/myconfig.js";
$oFCKeditor->Config['IMUploadPath'] = "upload/blog/";
if (api_get_setting('advanced_filemanager') == 'true')
{
$oFCKeditor->Config['AdvancedFileManager'] = true;
$oFCKeditor->Config['CustomConfigurationsPath'] = api_get_path(REL_PATH)."main/inc/lib/fckeditor/myconfig_afm.js";
// For images
$oFCKeditor->Config['ImageBrowserURL'] = $oFCKeditor->BasePath . "editor/plugins/ajaxfilemanager/ajaxfilemanager.php";
// For flash
$oFCKeditor->Config['FlashBrowserURL'] = $oFCKeditor->BasePath . "editor/plugins/ajaxfilemanager/ajaxfilemanager.php";
// For MP3
$oFCKeditor->Config['MP3BrowserURL'] = $oFCKeditor->BasePath . "editor/plugins/ajaxfilemanager/ajaxfilemanager.php";
// For video
$oFCKeditor->Config['VideoBrowserURL'] = $oFCKeditor->BasePath . "editor/plugins/ajaxfilemanager/ajaxfilemanager.php";
// For flv Player (Videos)
$oFCKeditor->Config['VideoBrowserURL'] = $oFCKeditor->BasePath . "editor/plugins/ajaxfilemanager/ajaxfilemanager.php";
}
else
{
$oFCKeditor->Config['AdvancedFileManager'] = false;
$oFCKeditor->Config['CustomConfigurationsPath'] = api_get_path(REL_PATH)."main/inc/lib/fckeditor/myconfig.js";
$oFCKeditor->Config['IMUploadPath'] = "upload/blog/";
}
$oFCKeditor->ToolbarSet = "Blog";
$TBL_LANGUAGES = Database::get_main_table(TABLE_MAIN_LANGUAGE);
@ -2440,8 +2491,34 @@ class Blog
$oFCKeditor->Height = '200';
$oFCKeditor->Width = '97%';
$oFCKeditor->Value = isset($_POST['comment_text'])?stripslashes($_POST['comment_text']):'';
$oFCKeditor->Config['CustomConfigurationsPath'] = api_get_path(REL_PATH)."main/inc/lib/fckeditor/myconfig.js";
$oFCKeditor->Config['IMUploadPath'] = "upload/blog/";
if (api_get_setting('advanced_filemanager') == 'true')
{
$oFCKeditor->Config['AdvancedFileManager'] = true;
$oFCKeditor->Config['CustomConfigurationsPath'] = api_get_path(REL_PATH)."main/inc/lib/fckeditor/myconfig_afm.js";
// For images
$oFCKeditor->Config['ImageBrowserURL'] = $oFCKeditor->BasePath . "editor/plugins/ajaxfilemanager/ajaxfilemanager.php";
// For flash
$oFCKeditor->Config['FlashBrowserURL'] = $oFCKeditor->BasePath . "editor/plugins/ajaxfilemanager/ajaxfilemanager.php";
// For MP3
$oFCKeditor->Config['MP3BrowserURL'] = $oFCKeditor->BasePath . "editor/plugins/ajaxfilemanager/ajaxfilemanager.php";
// For video
$oFCKeditor->Config['VideoBrowserURL'] = $oFCKeditor->BasePath . "editor/plugins/ajaxfilemanager/ajaxfilemanager.php";
// For flv Player (Videos)
$oFCKeditor->Config['VideoBrowserURL'] = $oFCKeditor->BasePath . "editor/plugins/ajaxfilemanager/ajaxfilemanager.php";
}
else
{
$oFCKeditor->Config['AdvancedFileManager'] = false;
$oFCKeditor->Config['CustomConfigurationsPath'] = api_get_path(REL_PATH)."main/inc/lib/fckeditor/myconfig.js";
$oFCKeditor->Config['IMUploadPath'] = "upload/blog/";
$oFCKeditor->Config['CreateDocumentDir'] = '../../courses/'.api_get_course_path().'/document/';
}
$oFCKeditor->ToolbarSet = "Blog";
$TBL_LANGUAGES = Database::get_main_table(TABLE_MAIN_LANGUAGE);
@ -2450,11 +2527,7 @@ class Blog
$isocode_language=mysql_result($result_sql,0,0);
$oFCKeditor->Config['DefaultLanguage'] = $isocode_language;
$oFCKeditor->Config['InDocument'] = false;
$oFCKeditor->Config['AdvancedFileManager'] = api_get_setting('advanced_filemanager') == 'true' ? true : false;
$oFCKeditor->Config['CreateDocumentDir'] = '../../courses/'.api_get_course_path().'/document/';
$oFCKeditor->Config['InDocument'] = false;
$oFCKeditor->Create() ;
echo ' <br /></td>

Loading…
Cancel
Save