This is a migrated thread and some comments may be shown as answers.

Database driven telerik Image Manager

10 Answers 221 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Amr Saafan
Top achievements
Rank 2
Amr Saafan asked on 07 Apr 2009, 03:34 PM
Hello all,
How can I convert the Telerik Image Manager to be Database Driven control?

Thanks,
Amr Saafan
Senior Software Developer
http://amrsaafan.blogspot.com

10 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 10 Apr 2009, 11:04 AM
Hi Amr,

You can implement you own FileBrowserContentProvider that allows using virtually any type of file sources for the FileBrowser dialogs (Image Manager, DocumentManager, Media Manager, Flash Manager, Template Manager):
  • Database
  • Custom role-based CMS system
  • Web service
  • Applications which use URL Rewriters

The  Custom File Dialogs Content Provider example demonstrates the implementation of a custom FileBrowserContentProvider, using a database as a file source.

The DBContentProvider.cs file is located in the C:\Program Files\telerik\RadControls for ASPNET AJAX Q1 2009\Live Demos\App_Code\Editor folder.

All the best,
Rumen
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
Chris
Top achievements
Rank 1
answered on 06 May 2009, 10:33 PM
Would it be possible for you to post a link directly to this data provider file? Our environment does not allow us to install the live demo, so I do not have these files on my local system and can't seem to find them anywhere else.
0
Rumen
Telerik team
answered on 11 May 2009, 06:17 AM
Hi Chris,

You can find attached all files used in the example. The other information is available in the provided link Custom File Dialogs Content Provider and this help article Custom FileBrowserContent Provider.

Best regards,
Rumen
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Amr Saafan
Top achievements
Rank 2
answered on 19 Sep 2009, 06:16 PM
Thank you for your help.
Now I have managed to have a Database Driven Image Manager and I have another question,
How can I select a specific file or Image in a specific directory when I open the Image Manager.

Thank you,
Amr Saafan
Senior Software Developer
My Blog
My Group


0
Fiko
Telerik team
answered on 24 Sep 2009, 10:12 AM
Hello Amr,

The RadEditor control does not have a property that sets the initial path of the RadFileExploreder control (used in the ImageManager). In this case you need to use the approach implemented in the attached demo. It will work with the DBContentProvider as well.

I hope this helps.

Sincerely yours,
Fiko
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Amr Saafan
Top achievements
Rank 2
answered on 24 Sep 2009, 05:28 PM
Thank you for help,
I am facing another problem.
When I open the Image Manager in IE 7 it works fine but I am getting this error when I try to open in FireFox

Web.Config Registration missing!
The Telerik Dialogs require a HttpHandler registration in the Web.Config file. Please use the control's Smart Tag to add the handler automatically, or see the help for more information: Controls > Editor > Dialogs.

and here is the web.config file content
<?xml version="1.0"?> 
<!--  
    Note: As an alternative to hand editing this file you can use the  
    web admin tool to configure settings for your application. Use 
    the Website->Asp.Net Configuration option in Visual Studio. 
    A full list of settings and comments can be found in  
    machine.config.comments usually located in  
    \Windows\Microsoft.Net\Framework\v2.x\Config  
--> 
<configuration> 
    <configSections> 
        <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
            <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
                <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/> 
                <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
                    <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere"/> 
                    <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/> 
                    <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/> 
                    <section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/> 
                </sectionGroup> 
            </sectionGroup> 
        </sectionGroup> 
    </configSections> 
    <appSettings/> 
    <connectionStrings/> 
    <system.web> 
        <!--  
            Set compilation debug="true" to insert debugging  
            symbols into the compiled page. Because this  
            affects performance, set this value to true only  
            during development. 
        --> 
        <compilation debug="true"
            <assemblies> 
                <add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/> 
                <add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> 
                <add assembly="System.Drawing.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/> 
                <add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> 
                <add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> 
                <add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> 
                <add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> 
                <add assembly="Telerik.Charting, Version=2.0.1.0, Culture=neutral, PublicKeyToken=D14F3DCC8E3E8763"/> 
                <add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> 
            </assemblies> 
        </compilation> 
        <!-- 
            The <authentication> section enables configuration  
            of the security authentication mode used by  
            ASP.NET to identify an incoming user.  
        --> 
        <authentication mode="Windows"/> 
        <!-- 
            The <customErrors> section enables configuration  
            of what to do if/when an unhandled error occurs  
            during the execution of a request. Specifically,  
            it enables developers to configure html error pages  
            to be displayed in place of a error stack trace. 
 
        <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm"
            <error statusCode="403" redirect="NoAccess.htm" /> 
            <error statusCode="404" redirect="FileNotFound.htm" /> 
        </customErrors> 
        --> 
        <httpHandlers> 
            <remove path="*.asmx" verb="*"/> 
            <add path="*.asmx" verb="*" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/> 
            <add path="Telerik.Web.UI.SpellCheckHandler.axd" verb="*" type="Telerik.Web.UI.SpellCheckHandler, Telerik.Web.UI" validate="false"/> 
            <add path="*_AppService.axd" verb="*" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/> 
            <add path="ScriptResource.axd" verb="GET,HEAD" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/> 
            <add path="Telerik.Web.UI.DialogHandler.aspx" verb="*" type="Telerik.Web.UI.DialogHandler, Telerik.Web.UI, Version=2008.1.515.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4" validate="false"/> 
        </httpHandlers> 
        <pages> 
            <controls> 
                <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> 
                <add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> 
            </controls> 
        </pages> 
        <httpModules> 
            <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> 
        </httpModules> 
    </system.web> 
    <system.codedom> 
        <compilers> 
            <compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CSharp.CSharpCodeProvider,System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="4"
                <providerOption name="CompilerVersion" value="v3.5"/> 
                <providerOption name="WarnAsError" value="false"/> 
            </compiler> 
            <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="4"
                <providerOption name="CompilerVersion" value="v3.5"/> 
                <providerOption name="OptionInfer" value="true"/> 
                <providerOption name="WarnAsError" value="false"/> 
            </compiler> 
        </compilers> 
    </system.codedom> 
    <!--  
        The system.webServer section is required for running ASP.NET AJAX under Internet 
        Information Services 7.0.  It is not necessary for previous version of IIS. 
    --> 
    <system.webServer> 
        <handlers> 
            <remove name="WebServiceHandlerFactory-Integrated"/> 
            <remove name="ScriptHandlerFactory"/> 
            <remove name="ScriptHandlerFactoryAppServices"/> 
            <remove name="ScriptResource"/> 
            <add name="Telerik_Web_UI_DialogHandler_aspx" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler, Telerik.Web.UI"/> 
            <add name="Telerik_Web_UI_SpellCheckHandler_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler, Telerik.Web.UI"/> 
            <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> 
            <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> 
            <add name="ScriptResource" verb="GET,HEAD" path="ScriptResource.axd" preCondition="integratedMode" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> 
        </handlers> 
        <validation validateIntegratedModeConfiguration="false"/> 
        <modules> 
            <remove name="ScriptModule"/> 
            <add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> 
        </modules> 
    </system.webServer> 
    <runtime> 
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"
            <dependentAssembly> 
                <assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/> 
                <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/> 
            </dependentAssembly> 
            <dependentAssembly> 
                <assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/> 
                <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/> 
            </dependentAssembly> 
        </assemblyBinding> 
    </runtime> 
</configuration> 
 

I am using RadEditor in the same website and it is working fine in both IE and Firefox but the Image Manager Alone it is not working in FireFox,
Please Advice,

Thank you,
Amr Saafan


0
Rumen
Telerik team
answered on 29 Sep 2009, 12:01 PM
Hi Amr,

Please, try the suggestions in these articles:
Error: Web.config registration missing! The Telerik dialogs require a HttpHandler registration in the web.config file,
Blank Dialogs Problem
and
Error: "Sys is not defined" in RadEditor dialogs.

If you still experience the problem after trying the provided suggestions, then please send a live URL where we can test the dialog and reproduce the error. We will check with Fiddler what is causing the issue.


Sincerely yours,
Rumen
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Yvonne Patakidou
Top achievements
Rank 1
answered on 22 Feb 2010, 11:19 AM
Hello Amr ,

Did you find any solution  about  the dialog window of Image/Document Manager in Firefox? I have followed the instructions, but with no luck. In IE 7 and 8 I have not an issue.

Best Regards
Yvonne
0
Amr Saafan
Top achievements
Rank 2
answered on 22 Feb 2010, 11:52 AM
Send to me your code and I will compare with mine and tell you where is the bug.
0
Yvonne Patakidou
Top achievements
Rank 1
answered on 22 Feb 2010, 02:45 PM

Dear Amr,

Below is the web.config part.

<
httpHandlers> 
 
        <add path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" validate="false"/>  
 
            <add verb="*" path="*.aspx" type="Exodus.Ecentric.Common.Portal.HttpHandler.ECHttpHandlerAdmin,Exodus.Ecentric.Common.Portal"/>  
            <add verb="*" path="GetFile.axd" type="Exodus.Ecentric.Common.DocumentManager.FileHTTPHandler,Exodus.Ecentric.Common.DocumentManager"/>  
            <add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false"/>  
            <remove verb="*" path="*.asmx"/>  
            <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>  
            <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>  
            <add verb="GET,HEAD" path="ScriptResource.axd" validate="false" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>  
      <add path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" validate="false"/>  
      <add path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" validate="false"/>  
      <add path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" validate="false"/>  
    </httpHandlers> 
        <pages> 
            <controls> 
                <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>  
                <add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>  
  <add tagPrefix="telerik" namespace="Telerik.Web.UI" assembly="Telerik.Web.UI"/>  
</controls></pages>  
        <httpModules> 
            <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></httpModules></system.web>  
    <system.codedom> 
        <compilers> 
            <compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CSharp.CSharpCodeProvider,System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="4">  
                <providerOption name="CompilerVersion" value="v3.5"/>  
                <providerOption name="WarnAsError" value="false"/></compiler></compilers></system.codedom> 
 
    <system.webServer> 
        <handlers> 
            <remove name="WebServiceHandlerFactory-Integrated"/>  
            <remove name="ScriptHandlerFactory"/>  
            <remove name="ScriptHandlerFactoryAppServices"/>  
            <remove name="ScriptResource"/><add name="Telerik_Web_UI_WebResource_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource"/>  
            <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>  
            <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>  
            <add name="ScriptResource" verb="GET,HEAD" path="ScriptResource.axd" preCondition="integratedMode" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>  
            <add name="Telerik_Web_UI_DialogHandler_aspx" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" /> 
 
        </handlers></system.webServer
I call and open the Dialog window  from javascript code
 function OpenDocumentManager(fileFld) {  
 
                var args = new Telerik.Web.UI.EditorCommandEventArgs("DocumentManager"nulldocument.createElement("a"));  
                args.CssClasses = [];  
 
                controlId = fileFld;  
 
                var oDocManager = $find('<%= DialogOpener1.ClientID %>');  
 
                if (oDocManager) {  
                    oDocManager.open('DocumentManager', args);  
                }  
 
            }  
 
where the Dialogopener1 is in aspx page :
    <telerik:dialogopener runat="server" id="DialogOpener1"   
    AdditionalQueryString="" HandlerUrl="Telerik.Web.UI.DialogHandler.aspx"   
    style="display: none;"></telerik:dialogopener>      
 
Do you need any other code?
Thanks in advance
Tags
Editor
Asked by
Amr Saafan
Top achievements
Rank 2
Answers by
Rumen
Telerik team
Chris
Top achievements
Rank 1
Amr Saafan
Top achievements
Rank 2
Fiko
Telerik team
Yvonne Patakidou
Top achievements
Rank 1
Share this question
or