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.
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.
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]
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.
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?
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,
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?
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.
Ok, some work for tonight .
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 ). But if you already have tried that, and you found difficulties doing that, it would be nice to know.
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.