Page view counter

Anyone successfully integrated Telerik products?

Last post 11-13-2003 9:38 AM by mbrandon. 6 replies.

Sort Posts:

  • Anyone successfully integrated Telerik products?

    06-04-2003, 5:08 PM
    • Loading...
    • Ronald.Ward
    • Joined on 11-11-2002, 12:40 PM
    • San Antonio, TX
    • Posts 229
    • Points 1,145
    I would like to talk to anyone that has implemented Telerik's menu control in DNN as well as the editor. I am not anticipating any issues with the editor really, I have run into a couple of questions though regarding the menu control.

    TIA,
    Ronald
  • Re: Anyone successfully integrated Telerik products?

    06-06-2003, 3:02 PM
    • Loading...
    • mbrandon
    • Joined on 04-30-2003, 10:36 AM
    • Posts 143
    • Points 725
    I have the editor working. I haven't spent the time to tightly couple it, though, so you have to first use telerik's update to save from the editor to DNN's edit page, and the use DNN's update to post changes to the database.

    Here are my files: (This assumes you have the RadControls dir in the host root... I'm not sure the best place to put it. This does force you to add a alias to the portalalias table to get image inserts)

    Caveat's: I made a change to the HTML module so that it doesn't inject the path to image files as it renders. Rather, I let R.A.D. code that into the html stream, and thus the database.
    So any existing html with src= would have to change.

    I think these are the only changes I needed. I can't swear to it. YMMV. :)

    All changes is .vb should be tagged with -MBRANDON. I didn't tag all my changes in .aspx... I think it's just in the panel that displays the FTB.

    Finally, I am still on 1.0.8, as I haven't had the time to start patching .9 with my enhancements.


    -Mark
    mbrandon@installed.net


    EditHTML.ascx:

    <%@ Register TagPrefix="radE" Namespace="Telerik.RadEditor" Assembly="RadEditor" %>
    <%@ Control language="vb" Inherits="DotNetNuke.EditHtml" CodeBehind="EditHtml.ascx.vb" AutoEventWireup="false" Explicit="True" %>
    <%@ Register TagPrefix="Portal" TagName="Title" Src="~/controls/DesktopModuleTitle.ascx"%>
    <% 'MBRANDON: Switch to RAD from ftb %>
    <% '@ Register TagPrefix="ftb" Namespace="FreeTextBoxControls" Assembly="FreeTextBox" %>
    <portal:title runat="server" id="Title1" />
    <br>
    <table cellspacing="2" cellpadding="2" border="0">
    <tr valign="top">
    <td>&nbsp;</td>
    <td align="middle">
    <asp:RadioButtonList ID="optView" Runat="server" CssClass="NormalTextBox" RepeatDirection="Horizontal" AutoPostBack="True">
    <asp:ListItem Value="B">Basic Text Box</asp:ListItem>
    <asp:ListItem Value="R">Rich Text Editor</asp:ListItem>
    </asp:RadioButtonList>
    </td>
    </tr>
    <tr valign="top">
    <td class="SubHead">
    Desktop Content:
    </td>
    <td>
    <asp:Panel ID="pnlBasicTextBox" Runat="server" Visible="False">
    <asp:TextBox id="txtDesktopHTML" runat="server" CssClass="NormalTextBox" columns="75" width="600" rows="12" textmode="multiline"></asp:TextBox>
    <BR>
    <asp:RadioButtonList id="optRender" AutoPostBack="True" RepeatDirection="Horizontal" CssClass="NormalTextBox" Runat="server">
    <asp:ListItem Value="T">Text</asp:ListItem>
    <asp:ListItem Value="H">HTML</asp:ListItem>
    </asp:RadioButtonList>
    </asp:Panel>
    <asp:Panel ID="pnlRichTextBox" Runat="server" Visible="False">
    <radE:RadEditor id="ftbDesktopText" Runat="server" LicenseFile="~/RadControls/LicenseFile.xml"></radE:RadEditor>
    </asp:Panel>
    </td>
    </tr>
    <tr valign="top">
    <td class="SubHead">
    Mobile Summary<br>
    (Optional):
    </td>
    <td>
    <asp:TextBox id="txtMobileSummary" runat="server" CssClass="NormalTextBox" columns="75" width="600" rows="3" textmode="multiline" />
    </td>
    </tr>
    <tr valign="top">
    <td class="SubHead">
    Mobile Details<br>
    (Optional):
    </td>
    <td>
    <asp:TextBox id="txtMobileDetails" runat="server" CssClass="NormalTextBox" columns="75" width="600" rows="5" textmode="multiline" />
    </td>
    </tr>
    </table>
    <p>
    <asp:LinkButton id="cmdUpdate" Text="Update" runat="server" class="CommandButton" BorderStyle="none" />
    &nbsp;
    <asp:LinkButton id="cmdCancel" Text="Cancel" CausesValidation="False" runat="server" class="CommandButton" BorderStyle="none" />
    &nbsp;
    <asp:LinkButton id="cmdPreview" Text="Preview" CausesValidation="False" runat="server" class="CommandButton" BorderStyle="none" />
    &nbsp;
    </p>
    <table width="750" cellspacing="0" cellpadding="0">
    <tr valign="top">
    <td>
    <asp:Label ID="lblPreview" Runat="server" CssClass="Normal"></asp:Label>
    </td>
    </tr>
    </table>

    EditHTML.ascx.vb:

    '
    ' DotNetNuke - http://www.dotnetnuke.com
    ' Copyright (c) 2002-2003
    ' by Shaun Walker ( sales@perpetualmotion.ca ) of Perpetual Motion Interactive Systems Inc. ( http://www.perpetualmotion.ca )
    '
    ' Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
    ' documentation files (the "Software"), to deal in the Software without restriction, including without limitation
    ' the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
    ' to permit persons to whom the Software is furnished to do so, subject to the following conditions:
    '
    ' The above copyright notice and this permission notice shall be included in all copies or substantial portions
    ' of the Software.
    '
    ' THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
    ' TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
    ' THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
    ' CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
    ' DEALINGS IN THE SOFTWARE.
    '

    Imports FreeTextBoxControls

    Namespace DotNetNuke

    Public Class EditHtml
    Inherits DotNetNuke.PortalModuleControl

    Protected WithEvents optView As System.Web.UI.WebControls.RadioButtonList
    Protected WithEvents pnlBasicTextBox As System.Web.UI.WebControls.Panel

    Protected WithEvents pnlRichTextBox As System.Web.UI.WebControls.Panel
    Protected WithEvents txtDesktopHTML As System.Web.UI.WebControls.TextBox
    Protected WithEvents optRender As System.Web.UI.WebControls.RadioButtonList

    'MBRANDON: Change ftb to RAD - also change all instance of .text to .value for RAD
    'Protected WithEvents ftbDesktopText As FreeTextBoxControls.FreeTextBox
    Protected WithEvents ftbDesktopText As Telerik.RadEditor.RadEditor

    Protected WithEvents txtMobileSummary As System.Web.UI.WebControls.TextBox
    Protected WithEvents txtMobileDetails As System.Web.UI.WebControls.TextBox
    Protected WithEvents cmdUpdate As System.Web.UI.WebControls.LinkButton
    Protected WithEvents cmdCancel As System.Web.UI.WebControls.LinkButton
    Protected WithEvents cmdPreview As System.Web.UI.WebControls.LinkButton
    Protected WithEvents lblPreview As System.Web.UI.WebControls.Label

    #Region " Web Form Designer Generated Code "

    'This call is required by the Web Form Designer.
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()

    End Sub

    Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
    'CODEGEN: This method call is required by the Web Form Designer
    'Do not modify it using the code editor.
    InitializeComponent()
    End Sub

    #End Region

    '****************************************************************
    '
    ' The Page_Load event on this Page is used to obtain the ModuleId
    ' of the xml module to edit.
    '
    ' It then uses the DotNetNuke.HtmlTextDB() data component
    ' to populate the page's edit controls with the text details.
    '
    '****************************************************************

    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    ' Obtain PortalSettings from Current Context
    Dim _portalSettings As PortalSettings = CType(HttpContext.Current.Items("PortalSettings"), PortalSettings)

    ' Get settings from the database
    Dim settings As Hashtable = PortalSettings.GetModuleSettings(ModuleId)

    Dim DesktopView As String = CType(settings("desktopview"), String)
    Dim LastDesktopView As String = DesktopView

    If optView.SelectedIndex <> -1 Then
    DesktopView = optView.SelectedItem.Value
    Dim admin As New AdminDB()
    admin.UpdateModuleSetting(ModuleId, "desktopview", DesktopView)
    End If

    If DesktopView <> "" Then
    optView.Items.FindByValue(DesktopView).Selected = True
    Else
    optView.SelectedIndex = 0
    End If

    Dim TextRender As String = CType(settings("textrender"), String)

    If optRender.SelectedIndex <> -1 Then
    TextRender = optRender.SelectedItem.Value
    Dim admin As New AdminDB()
    admin.UpdateModuleSetting(ModuleId, "textrender", TextRender)
    End If

    If TextRender <> "" Then
    optRender.Items.FindByValue(TextRender).Selected = True
    Else
    optRender.SelectedIndex = 0
    End If

    If optView.SelectedItem.Value = "B" Then
    pnlBasicTextBox.Visible = True
    pnlRichTextBox.Visible = False
    Else
    pnlBasicTextBox.Visible = False
    pnlRichTextBox.Visible = True
    'MBRANDON: change to RAD paths
    ftbDesktopText.ImagesPaths = New String() {_portalSettings.UploadDirectory.Substring(_portalSettings.UploadDirectory.IndexOf("/Portals/"))}
    ftbDesktopText.MediaPaths = New String() {_portalSettings.UploadDirectory.Substring(_portalSettings.UploadDirectory.IndexOf("/Portals/"))}
    ftbDesktopText.FlashPaths = New String() {_portalSettings.UploadDirectory.Substring(_portalSettings.UploadDirectory.IndexOf("/Portals/"))}

    ftbDesktopText.UploadImagesPaths = New String() {_portalSettings.UploadDirectory.Substring(_portalSettings.UploadDirectory.IndexOf("/Portals/"))}
    ftbDesktopText.UploadMediaPaths = New String() {_portalSettings.UploadDirectory.Substring(_portalSettings.UploadDirectory.IndexOf("/Portals/"))}
    ftbDesktopText.UploadFlashPaths = New String() {_portalSettings.UploadDirectory.Substring(_portalSettings.UploadDirectory.IndexOf("/Portals/"))}

    ftbDesktopText.AllowCustomColors = True

    'ftbDesktopText.ImageGalleryPath = _portalSettings.UploadDirectory.Substring(_portalSettings.UploadDirectory.IndexOf("/Portals/"))
    'MBRANDON: NOT needed for RAD
    'ftbDesktopText.HelperFilesParameters = "tabid=" & TabId
    End If

    If Page.IsPostBack = False Then

    ' Obtain a single row of text information
    Dim objHTML As New HtmlTextDB()
    Dim dr As SqlDataReader = objHTML.GetHtmlText(ModuleId)

    If dr.Read() Then

    If optRender.SelectedItem.Value = "T" Then
    txtDesktopHTML.Text = FormatText(CType(dr("DesktopHtml"), String))
    Else
    txtDesktopHTML.Text = Server.HtmlDecode(CType(dr("DesktopHtml"), String))
    End If
    ftbDesktopText.Value = Server.HtmlDecode(CType(dr("DesktopHtml"), String))
    txtMobileSummary.Text = Server.HtmlDecode(CType(dr("MobileSummary"), String))
    txtMobileDetails.Text = Server.HtmlDecode(CType(dr("MobileDetails"), String))

    Else

    ftbDesktopText.Value = "Add Content..."
    txtDesktopHTML.Text = "Add Content..."
    txtMobileSummary.Text = ""
    txtMobileDetails.Text = ""

    End If

    dr.Close()

    ' Store URL Referrer to return to portal
    If Not Request.UrlReferrer Is Nothing Then
    ViewState("UrlReferrer") = Request.UrlReferrer.ToString()
    Else
    ViewState("UrlReferrer") = ""
    End If
    Else
    If (LastDesktopView <> optView.SelectedItem.Value) And (Not LastDesktopView Is Nothing) Then
    If optView.SelectedItem.Value = "B" Then
    If optRender.SelectedItem.Value = "T" Then
    txtDesktopHTML.Text = FormatText(ftbDesktopText.Value)
    Else
    txtDesktopHTML.Text = ftbDesktopText.Value
    End If
    Else
    If optRender.SelectedItem.Value = "T" Then
    ftbDesktopText.Value = FormatHTML(txtDesktopHTML.Text)
    Else
    ftbDesktopText.Value = txtDesktopHTML.Text
    End If
    End If
    Else
    If optView.SelectedItem.Value = "B" Then
    If optRender.SelectedItem.Value = "T" Then
    txtDesktopHTML.Text = FormatText(txtDesktopHTML.Text)
    Else
    txtDesktopHTML.Text = FormatHTML(txtDesktopHTML.Text)
    End If
    End If
    End If
    End If

    End Sub


    Private Function FormatText(ByVal strHTML As String) As String

    Dim strText As String = strHTML

    strText = Replace(strText, "<br>", ControlChars.Lf)
    strText = Replace(strText, "<BR>", ControlChars.Lf)
    strText = Server.HtmlDecode(strText)

    Return strText

    End Function

    Private Function FormatHTML(ByVal strText As String) As String

    Dim strHTML As String = strText

    strHTML = Replace(strHTML, Chr(13), "")
    strHTML = Replace(strHTML, ControlChars.Lf, "<br>")

    Return strHTML

    End Function

    '****************************************************************
    '
    ' The cmdUpdate_Click event handler on this Page is used to save
    ' the text changes to the database.
    '
    '****************************************************************

    Private Sub cmdUpdate_Click(ByVal sender As Object, ByVal e As EventArgs) Handles cmdUpdate.Click

    Dim objHTML As New HtmlTextDB()

    Dim strDesktopHTML As String

    If pnlBasicTextBox.Visible Then
    If optRender.SelectedItem.Value = "T" Then
    strDesktopHTML = FormatHTML(txtDesktopHTML.Text)
    Else
    strDesktopHTML = txtDesktopHTML.Text
    End If
    Else
    strDesktopHTML = Server.HtmlEncode(ftbDesktopText.Value)
    End If

    ' Update the text within the HtmlText table
    objHTML.UpdateHtmlText(ModuleId, strDesktopHTML, Server.HtmlEncode(txtMobileSummary.Text), Server.HtmlEncode(txtMobileDetails.Text))

    ' Redirect back to the portal home page
    Response.Redirect(CType(ViewState("UrlReferrer"), String))

    End Sub


    '****************************************************************
    '
    ' The cmdCancel_Click event handler on this Page is used to cancel
    ' out of the page, and return the user back to the portal home
    ' page.
    '
    '****************************************************************'
    Private Sub cmdCancel_Click(ByVal sender As Object, ByVal e As EventArgs) Handles cmdCancel.Click

    ' Redirect back to the portal home page
    Response.Redirect(CType(ViewState("UrlReferrer"), String))

    End Sub


    Private Sub cmdPreview_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdPreview.Click

    ' Obtain PortalSettings from Current Context
    Dim _portalSettings As PortalSettings = CType(HttpContext.Current.Items("PortalSettings"), PortalSettings)

    Dim strDesktopHTML As String

    If pnlBasicTextBox.Visible Then
    strDesktopHTML = Server.HtmlEncode(txtDesktopHTML.Text)
    If optRender.SelectedItem.Value = "T" Then
    strDesktopHTML = Replace(strDesktopHTML, ControlChars.Lf, "<br>")
    End If
    Else
    strDesktopHTML = Server.HtmlEncode(ftbDesktopText.Value)
    End If

    lblPreview.Text = ManageUploadDirectory(Server.HtmlDecode(strDesktopHTML), _portalSettings.UploadDirectory)

    End Sub

    End Class

    End Namespace

    HTMLModule.ascx.vb:

    '
    ' DotNetNuke - http://www.dotnetnuke.com
    ' Copyright (c) 2002-2003
    ' by Shaun Walker ( sales@perpetualmotion.ca ) of Perpetual Motion Interactive Systems Inc. ( http://www.perpetualmotion.ca )
    '
    ' Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
    ' documentation files (the "Software"), to deal in the Software without restriction, including without limitation
    ' the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
    ' to permit persons to whom the Software is furnished to do so, subject to the following conditions:
    '
    ' The above copyright notice and this permission notice shall be included in all copies or substantial portions
    ' of the Software.
    '
    ' THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
    ' TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
    ' THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
    ' CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
    ' DEALINGS IN THE SOFTWARE.
    '

    Namespace DotNetNuke

    Public MustInherit Class HtmlModule
    Inherits DotNetNuke.PortalModuleControl

    Protected WithEvents HtmlHolder As System.Web.UI.HtmlControls.HtmlTableCell

    #Region " Web Form Designer Generated Code "

    'This call is required by the Web Form Designer.
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()

    End Sub

    Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
    'CODEGEN: This method call is required by the Web Form Designer
    'Do not modify it using the code editor.
    InitializeComponent()
    End Sub

    #End Region

    '*******************************************************
    '
    ' The Page_Load event handler on this User Control is
    ' used to render a block of HTML or text to the page.
    ' The text/HTML to render is stored in the HtmlText
    ' database table. This method uses the DotNetNuke.HtmlTextDB()
    ' data component to encapsulate all data functionality.
    '
    '*******************************************************

    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    ' Obtain PortalSettings from Current Context
    Dim _portalSettings As PortalSettings = CType(HttpContext.Current.Items("PortalSettings"), PortalSettings)

    ' Obtain the selected item from the HtmlText table
    Dim objHTML As New HtmlTextDB()
    Dim dr As SqlDataReader = objHTML.GetHtmlText(ModuleId)

    If dr.Read() Then

    ' Dynamically add the file content into the page
    Dim content As String = Server.HtmlDecode(CType(dr("DesktopHtml"), String))

    'MBRANDON - r.a.d. editor will inject Upload Dir.
    'HtmlHolder.Controls.Add(New LiteralControl(ManageUploadDirectory(content, _portalSettings.UploadDirectory)))
    HtmlHolder.Controls.Add(New LiteralControl(content))

    End If

    ' Close the datareader
    dr.Close()

    End Sub

    'MBRANDON - Function no longer used.
    'Private Function ManageUploadDirectory(ByVal strHTML As String, ByVal strUploadDirectory As String) As String

    ' Dim P As Integer

    ' P = InStr(1, strHTML.ToLower, "src=""")
    ' While P <> 0
    ' ManageUploadDirectory = ManageUploadDirectory & Left(strHTML, P + 4)

    ' strHTML = Mid(strHTML, P + 5)

    ' ' add uploaddirectory if we are linking internally

    ' Dim strSRC = Left(strHTML, InStr(1, strHTML, """") - 1)
    ' If InStr(1, strSRC, "://") = 0 Then
    ' strHTML = strUploadDirectory & strHTML
    ' End If

    ' P = InStr(1, strHTML.ToLower, "src=""")
    ' End While

    ' ManageUploadDirectory = ManageUploadDirectory & strHTML

    'End Function

    End Class

    End Namespace
  • Re: Anyone successfully integrated Telerik products?

    06-12-2003, 2:02 AM
    • Loading...
    • Bennyvi
    • Joined on 06-24-2002, 5:03 PM
    • WA, USA
    • Posts 6
    • Points 30
    i am having trouble with displaying the aspx pages in the RadControls folder...did you get this to work? if so what did you do?
    Thanks,

    Ben
  • Re: Anyone successfully integrated Telerik products?

    06-12-2003, 11:54 AM
    • Loading...
    • Bennyvi
    • Joined on 06-24-2002, 5:03 PM
    • WA, USA
    • Posts 6
    • Points 30
    ok,

    i think i found solution in this thread:
    http://www.asp.net/Forums/ShowPost.aspx?tabindex=1&PostID=192112

    will try it out tonight when get home...but i believe this to be the fix!

    Thanks,

    Ben
  • Re: Anyone successfully integrated Telerik products?

    06-13-2003, 10:43 AM
    • Loading...
    • terziev
    • Joined on 08-20-2002, 8:58 AM
    • Posts 15
    • Points 430
    To implement the telerik r.a.d.editor control in DotNetNuke you have to make the following
    steps:

    1) Update the PortalAlias field in the Portals table
    e.g.
    from:
    localhost/DotNetNuke
    to:
    localhost/DotNetNuke,localhost/DotNetNuke/RadControls

    2) Open the DesktopModules/HTML/EditHtml.ascx file and replace the FreeTextBox control with r.a.d.editor. e.g. <radE:RadEditor ID="editor1" Runat="server" SubmitControl="cmdUpdate" ......../>

    3) Open the DesktopModules/HTML/EditHtml.ascx.vb(cs). Declare "Telerik.RadEditor.RadEditor editor1" instead of "FreeTextBoxControls.FreeTextBox ftbDesktopText" in the beginning. Then replace "ftbDesktopText.Text" with "editor1.Value" throughout the code. (Comment the lines where the "ImageGalleryPath" and "HelperFilesParameters" properties are set)

    4) Open the Components/Configuration.vb(cs) file and in the constructor of the PortalSettings class put the "Me.UploadDirectory = ...." (vb)/"this.UploadDirectory = ...." (cs) line in a try/catch statement.

    5) Open DesktopModules/HTML/HtmlModel.ascx.vb(cs)
    Replace the following line:
    HtmlHolder.Controls.Add(New LiteralControl(ManageUploadDirectory(content, _portalSettings.UploadDirectory)))
    with:
    HtmlHolder.Controls.Add(New LiteralControl(content))

    as the ManageUploadDirectory function puts additional path info before each image src attribute
    Telerik Marketing Team
    http://www.telerik.com
    "Deliver more than expected"
  • Re: Anyone successfully integrated Telerik products?

    06-16-2003, 7:41 PM
    • Loading...
    • gsc4
    • Joined on 05-29-2003, 3:24 AM
    • Posts 193
    • Points 965
    Hi,

    I don't have any experience with the Telerik Rad Menu but I have integrated the ASPnetMenu into DNN v1.0.9. The ASPnetMenu works differently to the Solpart menu included with DNN and therefore proved to be a little challenging to get working. The biggest problem I had was being able to add child menu items using the TabStripDetails and TabSettings collections (as DNN does for Solpart).

    If you come across similar problems my code may help.

    see: http://www.asp.net/Forums/ShowPost.aspx?tabindex=1&PostID=248025
    or: http://dotnetnuke.daikyo.com.au
  • Re: Anyone successfully integrated Telerik products?

    11-13-2003, 9:34 AM
    • Loading...
    • mbrandon
    • Joined on 04-30-2003, 10:36 AM
    • Posts 143
    • Points 725
    There are a couple more things you can do to make it work a little nicer:
    (set all of these properties within the (page not postback) IF block)

    If you don't want RAD injecting your changes into the .aspx page (and forcing you to hit RAD's update button, and then DNN's)

    ftbDesktopText.SubmitControl = "cmdUpdate"
    ftbDesktopText.Editable = True

    If you want to be able to browse the portal file dir for content, set these three properties

    ftbDesktopText.ImagesPaths
    ftbDesktopText.MediaPaths
    ftbDesktopText.FlashPaths

    If you want to be able to upload through RAD as well:

    ftbDesktopText.UploadImagesPaths
    ftbDesktopText.UploadMediaPaths
    ftbDesktopText.UploadFlashPaths

    Setting the six above to:
    = New String() {_portalSettings.UploadDirectory.Substring(_portalSettings.UploadDirectory.IndexOf("/Portals/"))}

    Will point it to the current portal's upload dir.

    Also, if you would like to not have the add the radControl subdir to every portalAlias,
    you can add the following in the GetDomainName function (in globals.vb):

    Change:
    Case "admin", "controls", "desktopmodules", "mobilemodules", "premiummodules"
    To:
    Case "admin", "controls", "desktopmodules", "mobilemodules", "premiummodules", "radcontrols"

    This will allow any page/control in the radcontrols subdir to load.

    BTW - While you are there - you can change the IF in the case else below:

    ' check if filename or trace
    If (InStr(1, URL(intURL), ".aspx") = 0) And (InStr(1, URL(intURL), ".axd") = 0) Then

    Then you can use application tracing by browsing to "appdir/trace.axd" (after setting trace enabled in the system.web section of web.config)


    One last warning about the RAD editor: it was written in C#. If you are using Visual Studio, **DON'T** include the .aspx pages in you project- VS sometimes changes the @page language to .vb from .cs, and things start breaking!
Page 1 of 1 (7 items)