custom login module

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.
11/18/2009 4:56:10 PM
Nux
Gravatar
Total Posts 183

custom login module

Hey Joe and others,

I'm a bit experiencing with custom modules and I'm trying to make a login module.
So I copied the "EmptyModule.ascx", renamed it and added:

<asp:Panel ID="pnlWrapper" runat="server" CssClass="panelwrapper stats">
<portal:ModuleTitleControl id="Title1" runat="server" />
<portal:SiteLogin ID="LoginCtrl" runat="server" CssClass="login" >

[everything like in the /secure/login.aspx]

</portal:SiteLogin>
</asp:Panel>

Added the module via Administration Menu > Advanced Tools > Feature Installation/Configuration, put it on a page and testing.
Strange thing is that everything is working (log in with the wrong password gives me the 'Login Failed!), except for the translations or hidding some sitelabels. So I see "email: userid", but nothing near the remember me checkbox.

Does anyone have an idea why this is happening?
Cause I expected other "errors" to see.

Thanks

Stef

11/19/2009 12:42:02 AM
Nux
Gravatar
Total Posts 183

Re: custom login module

Nobody who can help me?
Or is this the wrong forum I'm putting this in?

One more thing: I have put this at the top of the control:
<%@ Control Language="C#" AutoEventWireup="false" Inherits="mojoPortal.Web.SiteModuleControl" %>
so the pnlWrapper and ModuleTitleControl would work.

What I don't understand is that I have copied everything in <portal:SiteLogin>, portal: is linking to mojoPortal.Web.UI in the web.config,
so I expect that everything in mojoPortal.Web.UI.SiteLogin should be executed cause of the <portal:SiteLogin> in the control.

Am I missing something here?

Thanks

Stef

11/19/2009 6:27:20 AM
Gravatar
Total Posts 18439

Re: custom login module

Take a look at the code in /Secure/Login.aspx.cs and you will see how the labels and buttons get localized.

Hope it helps,

Joe

11/19/2009 6:59:00 AM
Nux
Gravatar
Total Posts 183

Re: custom login module

Joe,

thanks for your reply.

Am I correct when I say that the logic to login is in the mojoPortal.Web.UI.SiteControl, while filling in the labels/check to see which login system is used, is in the login.aspx? If so, that means that I have to make a custom module, which has the login.aspx code, correct?

Thanks

Stef

11/19/2009 7:03:16 AM
Gravatar
Total Posts 18439

Re: custom login module

You may not need all the code from Login.aspx.cs but at least you will need any code from there that configures the SiteLogin control.

Best,

Joe

11/19/2009 7:11:27 AM
Nux
Gravatar
Total Posts 183

Re: custom login module

Ok, some work for tonight Smile.

Joe, any reason why that logic is in the page and not in a login class?
Any reason why you don't want to put this in a module?
Cause I can just put the translations in the module and it works for me, but I don't like working that way and that way I also learn how to make programmable modules ( to bad I didn't see the yamisee course Cry). But if you already have tried that, and you found difficulties doing that, it would be nice to know.

Any thoughts?

Thanks
Stef

4/8/2010 10:46:31 AM
Gravatar
Total Posts 4

Re: custom login module

I managed to make this work by setting the Codebehind for my custom module to be "Login.aspx.cs". I.e.

<%@ Control language="c#" Codebehind="Login.aspx.cs" AutoEventWireup="false" Inherits="mojoPortal.Web.ContentUI.EmptyModule" %>

 

Seems to work ok.

Martin.

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