Using the existing filemanager with a Custom Feature

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
5/20/2011 9:51:15 AM
Gravatar
Total Posts 76

Using the existing filemanager with a Custom Feature

Dear all,

I'm trying to use a custom feature along with the existing filemanager.It's another slideshow that I'm creating.

But, I need to access the same control that is used in this html editor while inserting images. I'm unable to find that in the mojoportal source code.

Where do I find this control which comes up when we insert images? Which project, where is the code for it?

I mean this dialog which comes up when we insert an image using this editor that has the "browse server" button.

Thanks.

5/20/2011 10:04:10 AM
Gravatar
Total Posts 18439

Re: Using the existing filemanager with a Custom Feature

Take a look at the Edit.aspx page in the mojoPortal.Features.UI project in the List folder for the List/Links feature.

It uses a control FileBrowseTextBoxExtender.cs (from mojoPortal.Web project in the Controls folder).

This extender allows browsing files and setting the path for the selected file in a textbox. 

Hope that helps,

Joe

5/20/2011 10:15:26 AM
Gravatar
Total Posts 18439

Re: Using the existing filemanager with a Custom Feature

Note that this control by default browses all files not just images, but if you get the very latest code from the repository I just added a new property on the control to make it configurable to filter file types. So if you just want images you can set the browser type property like this:

<portal:FileBrowserTextBoxExtender id="fileBrowser" runat="server" BrowserType="image" />

valid options are file, image, and media

from code you must set the TextBoxClientId property to the textbox where it should set the file path like this:

fileBrowser.TextBoxClientId = txtUrl.ClientID;

where txtUrl is the server side id of a TextBox control

5/21/2011 5:57:53 AM
Gravatar
Total Posts 76

Re: Using the existing filemanager with a Custom Feature

Joe,

Thank you so much for that second reply where you've mentioned about setting the property. It has saved us hours of searching. 

But, we kept searching for that Edit dialog though and ultimately found that it was part of TinyMCE and cannot be used without TinyMCE. So,we've had to drop using that edit dialog. FileBrowser is quite useful though.

Thanks.

You must sign in to post in the forums. This thread is closed to new posts.