|
Piet van Zanten
HTML editor with image browser June 05, 2012 04:04PM |
$uploadpath = "/MyProject_WEB/my_images/";Exit and save the file.
#BEGIN PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL PHPIniDir "C:\Program Files (x86)\PHP" LoadModule php5_module "C:\Program Files (x86)\PHP/php5apache2_2.dll" #END PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALLRestart the Apache service.
LOCAL
sParam,sUploadDir is string
sParam="/MyProject_WEB/pdw_file_browser/index.php?editor=ckeditor"
sUploadDir="/MyProject_WEB/"+"/my_images/"
JSMethod("CKEDITOR","replace",edt_Text1..Alias) //edt_Text1 is the edit control
//JSProperty("CKEDITOR.config","filebrowserBrowseUrl")=sParam
JSProperty("CKEDITOR.config","filebrowserImageBrowseUrl")=sParam+"&filter=image
//JSProperty("CKEDITOR.config","filebrowserFlashBrowseUrl")=sParam+"&filter=flash
JSProperty("CKEDITOR.config","filebrowserWindowWidth")=1000
JSProperty("CKEDITOR.config","filebrowserWindowHeight")=720
Behold, your edit control has turned into a full blown HTML WYSIWYG editor.:cool:
<Files YourApp_Name/pdw_file_browser> ForceType None </Files>(this is for Apache, don't know about IIS)
// $uploadpath = "/VZTC_WEB_WEB/02303/my_images/"; // absolute path from root to upload folder (DON'T FORGET SLASHES)
// Modified PVZ : $uploadpath becomes a parameter when calling index.php
// Get upload path
if(!empty($_REQUEST['upload_path'])) {
$uploadpath = $_REQUEST['upload_path'];
$_SESSION['upload_path'] = $uploadpath;
} elseif (isset($_SESSION['upload_path'])) {
$uploadpath = $_SESSION['upload_path'];
} else {
$uploadpath = "";
}
Now we can go to Webdev and add the upload path as a parameter in code.
LOCAL
sParam,sUploadDir is string
sParam="/MyProject_WEB/pdw_file_browser/index.php?editor=ckeditor"
sUploadDir="/MyProject_WEB/"+sVerNr+"/my_images/"
JSMethod("CKEDITOR","replace",edt_Text1..Alias)
//JSProperty("CKEDITOR.config","filebrowserBrowseUrl")=sParam+"&upload_path="+sUploadDir
JSProperty("CKEDITOR.config","filebrowserImageBrowseUrl")=sParam+"&filter=image&upload_path="+sUploadDir
//JSProperty("CKEDITOR.config","filebrowserFlashBrowseUrl")=sParam+"&filter=flash&upload_path="+sUploadDir
JSProperty("CKEDITOR.config","filebrowserWindowWidth")=1000
JSProperty("CKEDITOR.config","filebrowserWindowHeight")=720
Well, I hope this is clear and wish you happy developping.
|
Piet van Zanten
Re: HTML editor with image browser June 06, 2012 06:25PM |
|
Allard
Re: HTML editor with image browser August 13, 2013 03:57PM |
|
Alexander S.
Re: HTML editor with image browser August 27, 2013 08:02PM |
|
hehe222222
Re: HTML editor with image browser May 15, 2015 11:33AM |