Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0ow to dynamically change base directory for FCKEditor in DNN 4.9?ow to dynamically change base directory for FCKEditor in DNN 4.9?
Previous
 
Next
New Post
5/20/2009 6:15 AM
 

Hi everyone,

I'm having a problem with FCKEditors add image feature, when you press browse server button it opens up all files to the user. Where I need to restrict the user to a single directory where he can see his own uploaded images. I think if I'm able to change the directory dynamically, it can solve my problem. We're trying to give the user the facility to add html to blog posts. It would be really nice to give each user his own directory that would appear when he presses the
Add Image button >browse server button

 

FYI, I've noticed that FCK editor has

private bool CheckAuthentication()  

    {  

        // WARNING : DO NOT simply return "true". By doing so, you are allowing  

        // "anyone" to upload and list the files in your server. You must implement  

        // some kind of session validation here. Even something very simple as...  

        //  

        //      return ( Session[ "IsAuthorized" ] != null && (bool)Session[ "IsAuthorized" ] == true );  

        //  

        // ... where Session[ "IsAuthorized" ] is set to "true" as soon as the  

        // user logs in your system.  

        return false;  

    }  

    public override void SetConfig()  

    {  

        // SECURITY: You must explicitly enable this "connector". (Set it to "true").  

        Enabled = CheckAuthentication();  

        // URL path to user files.  

        UserFilesPath = "/userfiles/";  

        // The connector tries to resolve the above UserFilesPath automatically.  

        // Use the following setting it you prefer to explicitely specify the  

        // absolute path. Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'.  

        // Attention: The above 'UserFilesPath' URL must point to the same directory.  

        UserFilesAbsolutePath = "";  

...

 

 these two functions in the config.ascx control.

Any help would be greatly appreciated.

--

Imran Akram

 
New Post
5/20/2009 6:14 PM
 

Rocky,

I'm looking for the same answer - I noted that the underlying FckEditor Control (FckEditorControl.vb in the FckHTMLEditorProvider source code) has a write-only property ImageUploadURL, but have not been able to figure out how to access it from module-level code.

Perhaps we can get something figured out...

Marty

Rocky wrote
 

Hi everyone,

I'm having a problem with FCKEditors add image feature, when you press browse server button it opens up all files to the user. Where I need to restrict the user to a single directory where he can see his own uploaded images. I think if I'm able to change the directory dynamically, it can solve my problem. We're trying to give the user the facility to add html to blog posts. It would be really nice to give each user his own directory that would appear when he presses the
Add Image button >browse server button

 

FYI, I've noticed that FCK editor has

private bool CheckAuthentication()  

    {  

        // WARNING : DO NOT simply return "true". By doing so, you are allowing  

        // "anyone" to upload and list the files in your server. You must implement  

        // some kind of session validation here. Even something very simple as...  

        //  

        //      return ( Session[ "IsAuthorized" ] != null && (bool)Session[ "IsAuthorized" ] == true );  

        //  

        // ... where Session[ "IsAuthorized" ] is set to "true" as soon as the  

        // user logs in your system.  

        return false;  

    }  

    public override void SetConfig()  

    {  

        // SECURITY: You must explicitly enable this "connector". (Set it to "true").  

        Enabled = CheckAuthentication();  

        // URL path to user files.  

        UserFilesPath = "/userfiles/";  

        // The connector tries to resolve the above UserFilesPath automatically.  

        // Use the following setting it you prefer to explicitely specify the  

        // absolute path. Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'.  

        // Attention: The above 'UserFilesPath' URL must point to the same directory.  

        UserFilesAbsolutePath = "";  

...

 

 these two functions in the config.ascx control.

Any help would be greatly appreciated.

--

Imran Akram

 
New Post
5/21/2009 7:40 AM
 

 unfortunaltely DNN URL control does not support to specify a base folder.


Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0ow to dynamically change base directory for FCKEditor in DNN 4.9?ow to dynamically change base directory for FCKEditor in DNN 4.9?


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out