Page view counter

New Module: Content Links

Last post 03-30-2006 3:26 PM by nitro001. 20 replies.

Sort Posts:

  • Re: New Module: Content Links

    08-08-2005, 9:07 AM
    • Loading...
    • nitro001
    • Joined on 07-28-2003, 7:32 AM
    • Kent, OH
    • Posts 267
    • Points 1,335
    Sorry, I was out of town on vacation...

    That is a new one for me.  You said the results are not displayed, do you get an error, or what happens?

    I am revising the vb code a little because there is also a problem displaying the content in another pane other than the content pane.

    I think I have it almost fixed, maybe that will fix your other problem also

    Try clearing your site cache also.  Then instead of all users, try creating a group that has view access and put the users in there to see
    if they show up.  99% of my instances only have registered users, or a custom group.

    Thanks,
    Nathan
  • Re: New Module: Content Links

    08-08-2005, 1:16 PM
    • Loading...
    • dwbell99
    • Joined on 10-17-2003, 12:05 AM
    • Posts 3
    • Points 15

    After some testing, I placed a text/HTML box in the contents pane then the links would open and be displayed.

    I am thinking that since I was trying to open the Content Link results in an empty pane, DNN closed the pane on the page (since it was empty)
    and even though the status bar showed the linking as working  (no errors) there was no target available.

    Does this compte?
    Dave





  • Re: New Module: Content Links

    08-08-2005, 3:38 PM
    • Loading...
    • nitro001
    • Joined on 07-28-2003, 7:32 AM
    • Kent, OH
    • Posts 267
    • Points 1,335
    Yes that's basically what I am running into when trying to place in other panes that don't have content, such as Top and Bottom.

    I am almost there with it.  I get the link to show, but I had to change the way I was retrieving the ID.  Instead of Looking for the server ID of ContentPane, I look for the ClientID = dnn_ContentPane.  This works now for all panes except the ContentPane, which is the exact opposite I was having before.

    Sorry for the long post below but this is what I am running into...

    I created two functions to try to locate it:

    Public Function RecursivelyFindControl(ByRef oParentControls As Web.UI.ControlCollection, ByVal ServerID As String) As Web.UI.Control

    Dim oChild As Web.UI.Control

    If oParentControls.Count > 0 Then

    For Each oChild In oParentControls

    'Response.Write("Control: " & oChild.ID & " (" & oChild.ClientID & ")<br>")

    If oChild.ID = ServerID Then

    'Response.Write("Found Control: " & oChild.ID & " (" & oChild.ClientID & ")<br>")

    Return oChild

    Exit Function

    End If

    If oChild.HasControls Then

    oChild = RecursivelyFindControl(oChild.Controls, ServerID)

    If Not oChild Is Nothing Then

    'Response.Write("Recursive Found Control: " & oChild.ID & " (" & oChild.ClientID & ")<br>")

    Return oChild

    Exit Function

    End If

    End If

    Next

    End If

    End Function

    Public Function RecursivelyFindClientControl(ByRef oParentControls As Web.UI.ControlCollection, ByVal ClientID As String) As Web.UI.Control

    Dim oChild As Web.UI.Control

    If oParentControls.Count > 0 Then

    For Each oChild In oParentControls

    'Response.Write("Control: " & oChild.ID & " (" & oChild.ClientID & ")<br>")

    If oChild.ClientID = ClientID Then

    'Response.Write("Found Control: " & oChild.ID & " (" & oChild.ClientID & ")<br>")

    Return oChild

    Exit Function

    End If

    If oChild.HasControls Then

    oChild = RecursivelyFindClientControl(oChild.Controls, ClientID)

    If Not oChild Is Nothing Then

    'Response.Write("Recursive Found Control: " & oChild.ID & " (" & oChild.ClientID & ")<br>")

    Return oChild

    Exit Function

    End If

    End If

    Next

    End If

    End Function



    I tried to call them by

    oControl = RecursivelyFindClientControl(Page.Controls, "dnn_" & sPane)

    and

    oControl = RecursivelyFindControl(Page.Controls, sPane)


    If I use the first call to find the ClientID and use it, It will display but will not retrieve the correct height so it does not display full height and is rendered as:
        <TD id="dnn_ContentPane" class="contentpane" valign="top" align="center"><iframe id="iContentPane" src="http://www.kent.edu"  height="100%"  width="100%"  scrolling="auto"  frameborder="0" >your Browser Does Not Support Frames</iframe></TD>


    If I uncomment the response.write lines from the first method I get the following:

    ----------------------
    Control: StylePlaceholder (StylePlaceholder)
    Control: CSS (CSS)
    Control: _Portals__default_ (_Portals__default_)
    Control: _Portals__default_Skins_dnn_blue_ (_Portals__default_Skins_dnn_blue_)
    Control: _Portals__default_Containers_DNN_Blue_ (_Portals__default_Containers_DNN_Blue_)
    Control: _Portals_0_ (_Portals_0_)
    Control: FAVICON (FAVICON)
    Control: Body (Body)
    Control: (_ctl0)
    Control: Form (Form)
    Control: (_ctl1)
    Control: SkinError (SkinError)
    Control: (_ctl2)
    Control: SkinPlaceHolder (SkinPlaceHolder)
    Control: dnn (dnn)
    Control: (dnn__ctl0)
    Control: ControlPanel (dnn_ControlPanel)
    Control: (dnn__ctl1)
    Control: dnnLOGO (dnn_dnnLOGO)
    Control: hypLogo (dnn_dnnLOGO_hypLogo)
    Control: imgLogo (dnn_dnnLOGO_imgLogo)
    Control: (dnn__ctl2)
    Control: dnnBANNER (dnn_dnnBANNER)
    Control: lblBanner (dnn_dnnBANNER_lblBanner)
    Control: (dnn__ctl3)
    Control: dnnMENU (dnn_dnnMENU)
    Control: ctlMenu (dnn_dnnMENU_ctlMenu)
    Control: (dnn_dnnMENU__ctl0)
    Control: (dnn__ctl4)
    Control: dnnSEARCH (dnn_dnnSEARCH)
    Control: txtSearch (dnn_dnnSEARCH_txtSearch)
    Control: (dnn_dnnSEARCH__ctl0)
    Control: cmdSearch (dnn_dnnSEARCH_cmdSearch)
    Control: (dnn_dnnSEARCH__ctl1)
    Control: (dnn__ctl5)
    Control: dnnCURRENTDATE (dnn_dnnCURRENTDATE)
    Control: lblDate (dnn_dnnCURRENTDATE_lblDate)
    Control: (dnn_dnnCURRENTDATE__ctl0)
    Control: (dnn__ctl6)
    Control: dnnBREADCRUMB (dnn_dnnBREADCRUMB)
    Control: lblBreadCrumb (dnn_dnnBREADCRUMB_lblBreadCrumb)
    Control: (dnn_dnnBREADCRUMB__ctl0)
    Control: (dnn__ctl7)
    Control: dnnUSER (dnn_dnnUSER)
    Control: hypRegister (dnn_dnnUSER_hypRegister)
    Control: (dnn__ctl8)
    Control: dnnLOGIN (dnn_dnnLOGIN)
    Control: hypLogin (dnn_dnnLOGIN_hypLogin)
    Control: (dnn__ctl9)
    Control: TopPane (dnn_TopPane)
    Control: (dnn__ctl10)
    Control: LeftPane (dnn_LeftPane)
    Control: (dnn__ctl11)
    Control: ctr345 (dnn_ctr345)
    Control: (dnn_ctr345__ctl0)
    Control: dnnACTIONS (dnn_ctr345_dnnACTIONS)
    Control: ctlActions (dnn_ctr345_dnnACTIONS_ctlActions)
    Control: (dnn_ctr345_dnnACTIONS__ctl0)
    Control: (dnn_ctr345_dnnACTIONS__ctl1)
    Control: (dnn_ctr345__ctl1)
    Control: dnnICON (dnn_ctr345_dnnICON)
    Control: imgIcon (dnn_ctr345_dnnICON_imgIcon)
    Control: (dnn_ctr345__ctl2)
    Control: dnnTITLE (dnn_ctr345_dnnTITLE)
    Control: lblTitle (dnn_ctr345_dnnTITLE_lblTitle)
    Control: (dnn_ctr345__ctl3)
    Control: dnnVISIBILITY (dnn_ctr345_dnnVISIBILITY)
    Control: cmdVisibility (dnn_ctr345_dnnVISIBILITY_cmdVisibility)
    Control: imgVisibility (dnn_ctr345_dnnVISIBILITY_imgVisibility)
    Control: dnnACTIONBUTTON5 (dnn_ctr345_dnnACTIONBUTTON5)
    Control: (dnn_ctr345__ctl4)
    Control: ContentPane (dnn_ctr345_ContentPane)
    Control: (dnn_ctr345__ctl5)
    Control: (dnn_ctr345__ctl6)
    Control: dnnACTIONBUTTON1 (dnn_ctr345_dnnACTIONBUTTON1)
    Control: (dnn_ctr345__ctl7)
    Control: dnnACTIONBUTTON2 (dnn_ctr345_dnnACTIONBUTTON2)
    Control: (dnn_ctr345__ctl8)
    Control: dnnACTIONBUTTON3 (dnn_ctr345_dnnACTIONBUTTON3)
    Control: ico7 (dnn_ctr345_dnnACTIONBUTTON3_ico7)
    Control: (dnn_ctr345_dnnACTIONBUTTON3__ctl0)
    Control: (dnn_ctr345__ctl9)
    Control: dnnACTIONBUTTON4 (dnn_ctr345_dnnACTIONBUTTON4)
    Control: (dnn_ctr345__ctl10)
    Control: (dnn__ctl12)
    Control: ctr346 (dnn_ctr346)
    Control: (dnn_ctr346__ctl0)
    Control: dnnACTIONS (dnn_ctr346_dnnACTIONS)
    Control: ctlActions (dnn_ctr346_dnnACTIONS_ctlActions)
    Control: (dnn_ctr346_dnnACTIONS__ctl0)
    Control: (dnn_ctr346_dnnACTIONS__ctl1)
    Control: (dnn_ctr346__ctl1)
    Control: dnnICON (dnn_ctr346_dnnICON)
    Control: imgIcon (dnn_ctr346_dnnICON_imgIcon)
    Control: (dnn_ctr346__ctl2)
    Control: dnnTITLE (dnn_ctr346_dnnTITLE)
    Control: lblTitle (dnn_ctr346_dnnTITLE_lblTitle)
    Control: (dnn_ctr346__ctl3)
    Control: dnnVISIBILITY (dnn_ctr346_dnnVISIBILITY)
    Control: cmdVisibility (dnn_ctr346_dnnVISIBILITY_cmdVisibility)
    Control: imgVisibility (dnn_ctr346_dnnVISIBILITY_imgVisibility)
    Control: dnnACTIONBUTTON5 (dnn_ctr346_dnnACTIONBUTTON5)
    Control: (dnn_ctr346__ctl4)
    Control: ContentPane (dnn_ctr346_ContentPane)
    Control: (dnn_ctr346__ctl5)
    Control: MessagePlaceHolder (dnn_ctr346_MessagePlaceHolder)
    Control: ModuleContent (dnn_ctr346_ModuleContent)
    Control: HtmlModule (dnn_ctr346_HtmlModule)
    Control: HtmlHolder (dnn_ctr346_HtmlModule_HtmlHolder)
    Control: (dnn_ctr346_HtmlModule__ctl0)
    Control: (dnn_ctr346__ctl6)
    Control: (dnn_ctr346__ctl7)
    Control: dnnACTIONBUTTON1 (dnn_ctr346_dnnACTIONBUTTON1)
    Control: (dnn_ctr346__ctl8)
    Control: dnnACTIONBUTTON2 (dnn_ctr346_dnnACTIONBUTTON2)
    Control: (dnn_ctr346__ctl9)
    Control: dnnACTIONBUTTON3 (dnn_ctr346_dnnACTIONBUTTON3)
    Control: ico7 (dnn_ctr346_dnnACTIONBUTTON3_ico7)
    Control: (dnn_ctr346_dnnACTIONBUTTON3__ctl0)
    Control: (dnn_ctr346__ctl10)
    Control: dnnACTIONBUTTON4 (dnn_ctr346_dnnACTIONBUTTON4)
    Control: (dnn_ctr346__ctl11)
    Control: (dnn__ctl13)
    Control: ContentPane (dnn_ContentPane)
    Found Control: ContentPane (dnn_ContentPane)
    Recursive Found Control: ContentPane (dnn_ContentPane)
    Recursive Found Control: ContentPane (dnn_ContentPane)
    Recursive Found Control: ContentPane (dnn_ContentPane)
    Recursive Found Control: ContentPane (dnn_ContentPane)
    ----------------------

    The ID's in () are the client ID's, theother if it exists is the Server ID


    If I use the second method FindControl, which looks at server-side ID's, it doesn't find the correct pane.  For Example, when searching for ContentPane using a default install of DNN 3.1 with the default panes and my contentlinks added in the content pane, it will display in the regular links module in the left pane that has the default 5 links for the DNN site.  It renders that section as:
    <TD id="dnn_ctr345_ContentPane" align="left"><iframe id="iContentPane" src="http://www.kent.edu"  height="100%"  width="100%"  scrolling="auto"  frameborder="0" >your Browser Does Not Support Frames</iframe></TD>

    Which makes me wonder why a module in the left pane would have ContentPane in the ClientID and have the Serverside ID = ContentPane 

    If I use the seond method and uncomment out the response.write lines in the code, I get the following responses at the top:

    ----------------------
    Control: StylePlaceholder (StylePlaceholder)
    Control: CSS (CSS)
    Control: _Portals__default_ (_Portals__default_)
    Control: _Portals__default_Skins_dnn_blue_ (_Portals__default_Skins_dnn_blue_)
    Control: _Portals__default_Containers_DNN_Blue_ (_Portals__default_Containers_DNN_Blue_)
    Control: _Portals_0_ (_Portals_0_)
    Control: FAVICON (FAVICON)
    Control: Body (Body)
    Control: (_ctl0)
    Control: Form (Form)
    Control: (_ctl1)
    Control: SkinError (SkinError)
    Control: (_ctl2)
    Control: SkinPlaceHolder (SkinPlaceHolder)
    Control: dnn (dnn)
    Control: (dnn__ctl0)
    Control: ControlPanel (dnn_ControlPanel)
    Control: (dnn__ctl1)
    Control: dnnLOGO (dnn_dnnLOGO)
    Control: hypLogo (dnn_dnnLOGO_hypLogo)
    Control: imgLogo (dnn_dnnLOGO_imgLogo)
    Control: (dnn__ctl2)
    Control: dnnBANNER (dnn_dnnBANNER)
    Control: lblBanner (dnn_dnnBANNER_lblBanner)
    Control: (dnn__ctl3)
    Control: dnnMENU (dnn_dnnMENU)
    Control: ctlMenu (dnn_dnnMENU_ctlMenu)
    Control: (dnn_dnnMENU__ctl0)
    Control: (dnn__ctl4)
    Control: dnnSEARCH (dnn_dnnSEARCH)
    Control: txtSearch (dnn_dnnSEARCH_txtSearch)
    Control: (dnn_dnnSEARCH__ctl0)
    Control: cmdSearch (dnn_dnnSEARCH_cmdSearch)
    Control: (dnn_dnnSEARCH__ctl1)
    Control: (dnn__ctl5)
    Control: dnnCURRENTDATE (dnn_dnnCURRENTDATE)
    Control: lblDate (dnn_dnnCURRENTDATE_lblDate)
    Control: (dnn_dnnCURRENTDATE__ctl0)
    Control: (dnn__ctl6)
    Control: dnnBREADCRUMB (dnn_dnnBREADCRUMB)
    Control: lblBreadCrumb (dnn_dnnBREADCRUMB_lblBreadCrumb)
    Control: (dnn_dnnBREADCRUMB__ctl0)
    Control: (dnn__ctl7)
    Control: dnnUSER (dnn_dnnUSER)
    Control: hypRegister (dnn_dnnUSER_hypRegister)
    Control: (dnn__ctl8)
    Control: dnnLOGIN (dnn_dnnLOGIN)
    Control: hypLogin (dnn_dnnLOGIN_hypLogin)
    Control: (dnn__ctl9)
    Control: TopPane (dnn_TopPane)
    Control: (dnn__ctl10)
    Control: LeftPane (dnn_LeftPane)
    Control: (dnn__ctl11)
    Control: ctr345 (dnn_ctr345)
    Control: (dnn_ctr345__ctl0)
    Control: dnnACTIONS (dnn_ctr345_dnnACTIONS)
    Control: ctlActions (dnn_ctr345_dnnACTIONS_ctlActions)
    Control: (dnn_ctr345_dnnACTIONS__ctl0)
    Control: (dnn_ctr345_dnnACTIONS__ctl1)
    Control: (dnn_ctr345__ctl1)
    Control: dnnICON (dnn_ctr345_dnnICON)
    Control: imgIcon (dnn_ctr345_dnnICON_imgIcon)
    Control: (dnn_ctr345__ctl2)
    Control: dnnTITLE (dnn_ctr345_dnnTITLE)
    Control: lblTitle (dnn_ctr345_dnnTITLE_lblTitle)
    Control: (dnn_ctr345__ctl3)
    Control: dnnVISIBILITY (dnn_ctr345_dnnVISIBILITY)
    Control: cmdVisibility (dnn_ctr345_dnnVISIBILITY_cmdVisibility)
    Control: imgVisibility (dnn_ctr345_dnnVISIBILITY_imgVisibility)
    Control: dnnACTIONBUTTON5 (dnn_ctr345_dnnACTIONBUTTON5)
    Control: (dnn_ctr345__ctl4)
    Control: ContentPane (dnn_ctr345_ContentPane)
    Found Control: ContentPane (dnn_ctr345_ContentPane)
    Recursive Found Control: ContentPane (dnn_ctr345_ContentPane)
    Recursive Found Control: ContentPane (dnn_ctr345_ContentPane)
    Recursive Found Control: ContentPane (dnn_ctr345_ContentPane)
    Recursive Found Control: ContentPane (dnn_ctr345_ContentPane)
    Recursive Found Control: ContentPane (dnn_ctr345_ContentPane)
    Recursive Found Control: ContentPane (dnn_ctr345_ContentPane)
    ----------------------

    The ID's in () are the client ID's, theother if it exists is the Server ID.  Look at the find control.  It found a serverID of ContentPane,
    but that clientID shows as the Links module in the left pane.

    Compare that to the output from the first function, which finds a clientID of dnn_ContentPane, but the serverID is also ContentPane.
    How can multiple controls have the same server id name?

    It is driving me crazy.

    Does anyone have a better suggestion on how I can find the correct pane ID via server or client-side ID?

    As I mentioned I can get it by the Client-Side, but I can't get the height to render properly.  I don't think 100% works right.


    Thank you,
    Nathan

  • Re: New Module: Content Links

    08-08-2005, 3:50 PM
    • Loading...
    • nitro001
    • Joined on 07-28-2003, 7:32 AM
    • Kent, OH
    • Posts 267
    • Points 1,335
    After that long message...

    My main problem is locating the correct pane properly in order to inject the iframe tag I use to render the content.

    This is the only way I can think of to do it.

    If any DNN guru's out there that may be more familiar with the way modules/panes are generated/rendered could give me a little advice it would be appriciated.

    Thanks,
    Nathan
  • Re: New Module: Content Links

    03-30-2006, 11:21 AM
    • Loading...
    • nitro001
    • Joined on 07-28-2003, 7:32 AM
    • Kent, OH
    • Posts 267
    • Points 1,335

    ALL,

    YES I AM STILL HERE!

    And to those who contacted me about updates I apoligize for not being able to get to them.

    I have finally had time to revisit the module and update it for DNN 3.2.2.  I haven't tested it in DNN 4.0.x yet since we are not running it currently.

    The Source Code can be found: http://www.registrars.kent.edu/home/dotnetnuke/ContentLinks.zip

    And the PA (Built from the Modules Page inside DNN) can be found:

    http://www.registrars.kent.edu/home/dotnetnuke/ContentLinksPA.zip

     

    I have rearchitected how the iframe is injected and look for the "Pane" name in the ID (ex. ContentPane), then inject and adjust height with a javascript routine that is injected at the end of the current page.

     

  • Re: New Module: Content Links

    03-30-2006, 3:26 PM
    • Loading...
    • nitro001
    • Joined on 07-28-2003, 7:32 AM
    • Kent, OH
    • Posts 267
    • Points 1,335

    Well,

    I had a small bug where it could not find any pane except the ContentPane.  I fixed this before anyone else had caught it.

    I published the new version of the zip files noted in the previous message.
    Only the code behind of the Links.ascx.vb page changed so if you have deployed it, just replace the dll files you don't have to worry about the ascx pages.

    One thing I have noticed is that if you render it in a pane that has no size, such as the right pane without any content, and the other panes are sized to take the rest, the iframe will render if you look at the code, but the width will be the width of the table cell, 0.

    If someone else comes up with a solution for it, let me know, I will work to see if I can correct it.

Page 2 of 2 (21 items) < Previous 1 2