Customization of login page

This is a forum to suggest new features for mojoPortal. 

This thread is closed to new posts. You must sign in to post in the forums.
6/5/2007 7:35:33 AM
Gravatar
Total Posts 488

Customization of login page

Need an opportunity to customize login page:

1. Completely change its look-and-feel to one I need.

2. Make it different on different sites of the same portal.

Is it possible to make some site-level option to choose login page?

6/5/2007 2:35:57 PM
Gravatar
Total Posts 18439

Re: Customization of login page

I would not create additional login pages.

The login page uses the same skin as the site home page. So its style is controlled by the css in that skin.

I would think that using css you can make it look any way you want to. However, in my opinion the best thing to do is to keep things very simple on the login page and be more creative on other pages.

Joe

6/6/2007 4:44:24 AM
Gravatar
Total Posts 488

Re: Customization of login page

Unfortunately, sometimes we need to do what our customers want, but not what we thing to be the best.

In my case all the site pages are to have some common top and bottom (that I suppose to include in layout.master of the custom skin), but login page must not contain it, it's quite different.

 

Would you mind if I create a refactoring patch that will make it easy to code custom login pages?

The thing I am going to do is to icreate a child control of asp.net login control that encapsulates all the portal login logic, so that this control could be used on both portal login page and my custom login pages.

6/6/2007 7:43:59 AM
Gravatar
Total Posts 18439

Re: Customization of login page

As long as that doesn't break anything I am not opposed to encapsulating the login control.

However there are easier strategies to solve this visual problem.

For example in my skin I have google ads so that they are on all site pages but some pages like login, user profile etc I don't want the google ads partly to avoid the browser message "this page contains both secure and insecure items". So my solution was to create a control called InsecurePanel (in mojoPortal.Web.Controls). This panel sets its own visibility property to false if the request is using ssl. I put an InsecurePanel in my layout.master file and I put my google ads inside the insecure panel.

<mp:InsecurePanel id="pnlGoogle" runat="server">
<script type="text/javascript"><!--
google_ad_client = "pub-2436514866607878";
google_ad_width = 120;
google_ad_height = 600;
google_ad_format = "120x600_as";
google_ad_type = "text_image";
google_ad_channel ="";
google_color_border = "f3f3f3";
google_color_bg = "f3f3f3";
google_color_link = "08619a";
google_color_url = "08619a";
google_color_text = "000000";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

</mp:InsecurePanel>

If your login page will use SSL then you can use the same control or you could create a custom panel that will not render if the request path contains Login.aspx or any other kind of logic.

Joe

6/6/2007 8:25:46 AM
Gravatar
Total Posts 488

Re: Customization of login page

Ok, I shall prepare the patch then.

As I need to completely redraw the page, it is easier in my case.

6/6/2007 9:10:30 AM
Gravatar
Total Posts 18439

Re: Customization of login page

Sounds good. I am on the verge of packaging up a new release and I may want to go ahead and make the release before applying the patch just to avoid any possibility of bugs introduced at the last minute.

Thanks,

Joe

6/6/2007 1:06:10 PM
Gravatar
Total Posts 488

Re: Customization of login page

I have sent you the patch.

I do not mind about the release as I use svn version for my development.

9/16/2008 6:30:51 AM
dvd
Gravatar
Total Posts 12

Re: Customization of login page

Hi Joe.

Can you tell me how to do for redirecting to an url when someone sign?.

I want to redirect to my page when everyone has signed but I cannot find it.

Regards.

9/16/2008 8:01:02 AM
Gravatar
Total Posts 18439

Re: Customization of login page

Hi,

In most cases I recommend you let mojoportal handle the redirecting after login unless you have a very specific reason for forcing it to a specific page. It can be a bad user experience to be redirected to an unexpected page after sign in.

By default mojoPortal will redirect to whatever page the user was already on before he clicked the login link. For example if the user is looking at the forums and wants to post he has to login first so he clicks the link and the login page smartly redirects him back to the forum after he signs in.

I implemented a simple feature for this today so it will be in the next release coming later this week, but again I generally don't recommend using this feature.

In the next release you will be able to make a setting to force redirecting to a specific page:

<add key="PageToRedirectToAfterSignIn" value="/yourcustompage.aspx" />

However, this feature will not work for a multi site installation, only for a single site installation. If you need more control than that you can implement a custom SignInHandler.

Best,

Joe

9/16/2008 1:55:20 PM
dvd
Gravatar
Total Posts 12

Re: Customization of login page

Ok, I understand.

What I'm trying is to direct to mypage.

Can you tell me where can I insert that release?.

<add key="PageToRedirectToAfterSignIn" value="/mypage.aspx" />

Many regards. This is the only site that makes me feel understood.

 

9/17/2008 9:05:49 AM
Gravatar
Total Posts 18439

Re: Customization of login page

Yes that would work once the new version is released. I also have it on my to do list to implement an option so that MyPage could be used as the default home page, probably not in this coming release but maybe the next one.

Best,

Joe

11/19/2008 5:53:28 AM
Gravatar
Total Posts 88

Re: Customization of login page

Hi Joe,

About <add key="PageToRedirectToAfterSignIn" value="/custompage.aspx" />....

how do I make this conditional so that the user is only re-directed if they have the role "Approved User" (a role I have added to my site)?

The page I want to re-direct to is only visible to Approved Users.

I added the key above but now, if a user not in "Approved Users" logs in, he gets an error page "you don't have permission to view this page". Instead I'd like him (her?) to stay on the home page.

Thanks,

Leah

11/19/2008 7:06:06 AM
Gravatar
Total Posts 18439

Re: Customization of login page

Hi Leah,

This redirect config option was only meant to solve the simple case preference for all users.

To redirect based on any logic like roles would require impelementing a UserSignInHandler.

Best,

Joe

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