I want to use KFM which is a plugin i wish to incorporate for TinyMCE, but just want to make sure i can use it with an SQL Server database???
In the “configuration.dist” file, this snippet of lines-
// what type of database to use
// values allowed: mysql, pgsql, sqlite, sqlitepdo
$kfm_db_type = 'mysql';
// the following options should only be filled if you are not using sqlite/sqlitepdo as the database
$kfm_db_prefix = 'c2_';
$kfm_db_host = 'locahost';
$kfm_db_name = 'dbname';
$kfm_db_username = 'username';
$kfm_db_password = 'password';
$kfm_db_port = '';
Well that is PHP code, so you cannot use that. TinyMCE is just a javascript textbox, I use that with my .net sites all the time. Do not know about KFM tho
If that is ur question, then you should post in PHP section. But if you have a pre-existing solution and wana change it to mssql, you will need to change all references to mysql, not just the connection parameters
Well, here’s what I do. I use a regular <asp:fileupload> control (in WebForms, MVC just uses <input type=“file”/>) to upload images to one folder and documents to another (it chooses the folder based on the file extension).
Then I use TinyMCE’s external_image_list_url to put images in the Image button in the TinyMCE control and external_link_list_url to put documents into the Anchor control.
This not only doesn’t employ extra plugins to maintain but it also seems to be much easier for the end user to understand.
I dont understand why i get this error, as there is more than enough room on the server. I have tried uploading an image elsewhere and it works perfectly.
Ok, well there are a few things you need to change
if (FileUpload1.HasFile)
{
string filePath = HttpContext.Current.Server.MapPath("/images") + "/";
if (!Directory.Exists)
{
Directory.CreateDirectory(filePath);
}
FileUpload1.SaveAs(filepath + FileUpload1.FileName.ToString());
txt_body.Text += string.Format("<img src = '{0}' alt = '{1}' />", "/images/"+FileUpload1.FileName, FileUpload1.FileName.ToString());
}
That should work, just know that it is not a viable solution tho, as this will not work if you upload a file, with a filename that already exists. So Ideally what you want to do is write an upload method, like the one I posted a while ago in another thread of yours, that handles the uploading, renaming, etc and returns the new filename as a string.
Also, if you want it to be more ajaxy(lol) then you can google jQuery file upload. You can then upload files asynchronously.
I believe Directory.Exists() requires something to test so you’re going to have to do something like Directory.Exists(filepath) and if the not operator (!) still gives you issues try wrapping it in parentheses
It looks like it will work, but I have never used it before. Do they not offer a trial version to see if it will suit your needs?
As for the error your have, out this: filePath + FileUpload1.FileName.ToString()
Either with response.write() or with a debug break point and see what the path is and make sure it is correct. Also make sure the internet guest account has the appropriate permissions