> Forums > Active Social > Themes and Templates > AS User Control Disappears in Some Modes
Last Post 24 Jul 2011 09:58 AM by Cliff Hammock. 11 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Not Resolved
Cliff Hammock
Customers
Cliff Hammock
Post Count:667

--
22 Jul 2011 11:09 AM
    • Active Social Version: 1.9.3
    • DotNetNuke Version: 5.6.2
    I might not get the terminology correct on this but I think you will understand my issue.

    I have the AS user control on my site at the top right. See the attached image.

    Some modules go into an edit type of mode and redirect to a page with a url like this.

    homeschoolcommunity.com/Homeschool-Content/Event-Calendar/ctl/MyEvents/mid/550.aspx


    This appears to be a standard DNN practice as it happens at some point on almost all modules.

    When that happens my AS user control disappears. See the other attached image.

    What is the cause of this and is there a straightforward solution without waiting for AS in the DNN Core?

    Thanks.

    NormalModeWithUserControl.jpg
    NormalModeWithoutUserControl.jpg

    Will Morgenweck Forum Admin
    DotNetNuke Staff
    Will Morgenweck
    Post Count:7672

    --
    22 Jul 2011 01:56 PM
    Edit mode uses the admin skin and only displays the module referenced by the "ctl" parameter of the url. In your case, this means only the MyEvents would be visible. What you are seeing is the expected behavior.


    Will Morgenweck
    Director of Product Management
    DotNetNuke Corp.
    Cliff Hammock
    Customers
    Cliff Hammock
    Post Count:667

    --
    22 Jul 2011 03:19 PM
    Posted By Will Morgenweck on 22 Jul 2011 02:56 PM
    Edit mode uses the admin skin and only displays the module referenced by the "ctl" parameter of the url. In your case, this means only the MyEvents would be visible. What you are seeing is the expected behavior.

    Although this is the expected behavior, would you agree that it isn't the desired behavior?

    My question still exists, is there a straightforward way to resolve this? I can't recall all of the details about this Mini Login and Welcome Center. Are they available as skin objects? If so, would installing them that way resolve the issue?

    If you can offer any alternatives that I can investigate to reach my desired state, that would be awesome.


    Will Morgenweck Forum Admin
    DotNetNuke Staff
    Will Morgenweck
    Post Count:7672

    --
    22 Jul 2011 04:01 PM
    Although this is the expected behavior, would you agree that it isn't the desired behavior?

    No, I wouldn't. This is how DNN has operated since day one. The way your module is constructed(based upon the URL you pasted) the page is switching into edit mode. Edit mode has always been just for a view of the current module that is being edited. This is why you will see modules like Active Forums and Active Social that support multiple views load the views within the module and not use the "ctl" method.

    My question still exists, is there a straightforward way to resolve this? I can't recall all of the details about this Mini Login and Welcome Center. Are they available as skin objects? If so, would installing them that way resolve the issue?

    The welcome center did originally exist as a skin object, but I'm not sure if that is still possible today. I'll see if we can do some investigating on this for you.


    Will Morgenweck
    Director of Product Management
    DotNetNuke Corp.
    Cliff Hammock
    Customers
    Cliff Hammock
    Post Count:667

    --
    22 Jul 2011 05:51 PM
    Posted By Will Morgenweck on 22 Jul 2011 05:01 PM
    No, I wouldn't. This is how DNN has operated since day one. The way your module is constructed(based upon the URL you pasted) the page is switching into edit mode. Edit mode has always been just for a view of the current module that is being edited. This is why you will see modules like Active Forums and Active Social that support multiple views load the views within the module and not use the "ctl" method.

    I think you missed my point. I was just saying that it isn't desirable as a site owner for my Welcome Center to disappear. That is why I am looking for alternatives.

    Posted By Will Morgenweck on 22 Jul 2011 05:01 PM
    The welcome center did originally exist as a skin object, but I'm not sure if that is still possible today. I'll see if we can do some investigating on this for you.

    Thanks for any ideas you find that might help resolve this issue. I don't think that I am going to be able to get almost every module vendor out there to rewrite their modules to not use the ctl method. 


    Steven Webster
    Customers
    Steven Webster
    Post Count:1665

    --
    23 Jul 2011 05:52 AM
    The welcome center did originally exist as a skin object, but I'm not sure if that is still possible today. I'll see if we can do some investigating on this for you.


    It still works as a skin object. I'm running like that on my site.


    Steven Webster
    dnnOsphere.com, An Independent Community for DotNetNuke Users
    Cliff Hammock
    Customers
    Cliff Hammock
    Post Count:667

    --
    23 Jul 2011 12:24 PM
    Posted By Steven Webster on 23 Jul 2011 06:52 AM

    It still works as a skin object. I'm running like that on my site.

    Steven, could you possibly share what you are using as the skin object and let me know how to install it? I see some people putting code up about the skin object from last year. But don't I have to install something to make a skin object work? I tried to just copy and paste the Welcome Center code and I was able to get something to work. But when I enter ctl mode it still disappears. :(


    Jeff Blanks
    Customers
    Jeff Blanks
    Post Count:387

    --
    23 Jul 2011 09:13 PM
    Cliff,

    Make sure to also register the AS control:
    <%@ Register TagPrefix="active" Assembly="Active.Modules.Social" Namespace="Active.Modules.Social.Controls" %> 


    Cheers! Jeff
    @northeastok | @jeffblanks | My Blog
    Steven Webster
    Customers
    Steven Webster
    Post Count:1665

    --
    24 Jul 2011 09:13 AM
    Yes, Jeff is absolutely correct. You need to register the control at the top of your skin.ascx file. Here is some code I'm using in an Artisteer designed skin:

    
    <div class="welcome_center">
        <active:socialwelcome id="ctrlWelcome" runat="server">
        <AuthenticatedTemplate>
            <div class="MiniProfileImg"><active:ProfilePicture id=&amp;#39;ctlPicsm&amp;#39; ProfileUserId=&amp;#39;&amp;#91;DNN:PROFILE:USERID&amp;#93;&amp;#39; ImageAlt=&amp;#39;&amp;#91;DNN:PROFILE:DISPLAYNAME&amp;#93;&amp;#39; ProfilePictureFile=&amp;#39;&amp;#91;DNN:PROFILE:ProfilePicture&amp;#93;&amp;#39; PicSize=&amp;#39;mini&amp;#39;  runat=&amp;#39;server&amp;#39;/></div>
            <div class="MiniProfileIntro">
                <div class="MiniProfileGreeting">&#160;[RESX:Welcome], [AS:CONTROL:PROFILELINK]&#160;>&#160;</div>
                    <active:messagecenter id=&amp;#39;ctlMsgCenter&amp;#39; runat=&amp;#39;server&amp;#39;>
                        <displaytemplate>
                            <div class="MiniProfileMessages"><a href=&amp;#39;&amp;#91;AS:PM:LINK&amp;#93;&amp;#39;>Inbox</a>&#160;<span class="superscript">([INBOXCOUNT])</span>&#160;|&#160;<a href=&amp;#39;&amp;#91;AS:PM:NOTIFICATIONS&amp;#93;&amp;#39;>Notifications</a>&#160;<span class="superscript">([NOTIFYCOUNT])</span></div>
                        </displaytemplate>
                    </active:messagecenter>
                &#160;|&#160;<a href="[AS:URL:LOGOUT]">[RESX:Logout]</a>
            </div>
        </AuthenticatedTemplate>
        <AuthPendingVerify>
            [RESX:AccountVerifyRequired]
        </AuthPendingVerify>
        <AnonTemplate>
            <a href="[AS:URL:REGISTER]">[RESX:Register]</a> | <a href="[AS:URL:LOGIN]">[RESX:Login]</a>
        </AnonTemplate>
    </active:socialwelcome>  
    </div>
    


    Steven Webster
    dnnOsphere.com, An Independent Community for DotNetNuke Users
    Cliff Hammock
    Customers
    Cliff Hammock
    Post Count:667

    --
    24 Jul 2011 09:15 AM
    Posted By Jeff Blanks on 23 Jul 2011 10:13 PM

    Cliff,



    Make sure to also register the AS control:

    <!--Register TagPrefix="active" Assembly="Active.Modules.Social" Namespace="Active.Modules.Social.Controls"--> 


    Thanks Jeff. I did register that control. Without it the skin won't render and it defaults to the plain DNN skin.



    When I am not logged in all I see is a Login link instead of the actual username / password boxes. Once I login I do see the Welcome Center. But the Welcome Center doesn't display on pages that already have a AS module on them. So maybe that is a clue of what I have done wrong.



    I just don't think I have gone through the process of getting this done correctly. All I did was register the control and copy some code from an earlier post into my ascx file. That is why I was asking for explicit instructions and code to make sure that I didn't overlool something.



    Steven Webster
    Customers
    Steven Webster
    Post Count:1665

    --
    24 Jul 2011 09:20 AM
    That produced this

    Login.png

    Steven Webster
    dnnOsphere.com, An Independent Community for DotNetNuke Users
    Cliff Hammock
    Customers
    Cliff Hammock
    Post Count:667

    --
    24 Jul 2011 09:58 AM
    Thanks Steven. I think the copy and paste might have done something to your code. I copied it into my ascx and now my skin didn't render at all. I had to replace the control characters for the single quotes around things like runat='server' and brackets [ ] also.



    So I did get it to work and I realized that I probably had it working correctly with the code I copied before because the Mini Login is not encapsulated within the Welcome Center object. Is it possible to install the Mini Login as a skin object? If not, maybe I can just use the module approach for the Mini Login since it will only be shown to Unauthenticated users and they won't use any capability like Submit Articles or Add Events that uses the ctl method, which was the basis of my problem.



    One issue still remains is that the skin object disappears on any page that already had an AS module on it.





    You are not authorized to post a reply.
    > Forums > Active Social > Themes and Templates > AS User Control Disappears in Some Modes
    test
    Copyright 2012 by DotNetNuke Corporation / Terms of Use / Privacy