CS Nuggets

This blog is for addons, bugs, fixes, and issues pertaining to Community Server.

CS: Friendly login page for New Users

If some one who is not logged in attempts to access a resource that requires them to be logged in, the site redirects them to a login page.  If the user is registered, they just enter their login information and they able to access the resource.  But if they aren't registered, many users don't notice the tiny "Join" option in the upper right corner, and get totally frustrated not being able to find it.

What I have done is add a "Join" button to the right of the "Sign In >>" button on the login page, to allow unregistered users to register.  All you need to do is modify your "/Themes/default/Skins/Skin-Login.ascx" file to look like:

<%@ Control Language="C#" %>
<%@ Import Namespace="CommunityServer.Controls" %>
<%@ Import Namespace="CommunityServer.Components" %>
<%@ Register TagPrefix="CS" Namespace="CommunityServer.Controls" Assembly="CommunityServer.Controls" %>
<%@ Register TagPrefix="CSD" Namespace="CommunityServer.Discussions.Controls" Assembly="CommunityServer.Discussions" %>
<div align="center">
    <div class="CommonMessageArea">
        <h4 class="CommonMessageTitle">
            <CS:ResourceLabel runat="server" ResourceName="Login_Title" />
        </h4>
        <div class="CommonMessageContent">
            <div class="CommonFormArea">
                <table cellspacing="1" border="0" cellpadding="5" width="100%">
                    <tr>
                        <td align="right" class="CommonFormFieldName">
                            <CS:ResourceLabel runat="server" ResourceName="Login_UserName" />
                        </td>
                        <td class="CommonFormField">
                            <CS:DefaultButtonTextBox CssClass="CommonTextBig" Button="loginButton" ID="username" runat="server" size="30" MaxLength="64" />
                        </td>
                    </tr>
                    <tr>
                        <td align="right" class="CommonFormFieldName">
                            <CS:ResourceLabel runat="server" ResourceName="Login_Password" />
                        </td>
                        <td class="CommonFormField">
                            <CS:DefaultButtonTextBox CssClass="CommonTextBig" Button="loginButton" TextMode="Password" ID="password" runat="server" size="11" MaxLength="64" />
                            <span class="txt4">(<CSD:ForumAnchor AnchorType="UserForgotPassword" runat="server" />)</span>
                        </td>
                    </tr>
                    <tr>
                        <td>
                        </td>
                        <td align="left" class="CommonFormField" nowrap>
                            <asp:CheckBox type="checkbox" Checked="true" runat="server" ID="autoLogin" />
                        </td>
                    </tr>
                    <tr>
                        <td class="CommonFormField" colspan="2" nowrap>
                            <table border="0" cellspacing="0" cellpadding="0" width="100%">
                                <tr>
                                    <td align="center" width="50%">
                                        <asp:LinkButton ID="loginButton" runat="server" CssClass="CommonTextButtonBig" /></td>
                                    <td align="center" width="50%">
                                        <a class="CommonTextButtonBig" href="<% =Globals.GetSiteUrls().UserRegister %>">
                                            <% =ResourceManager.GetString("register") %>
                                        </a>
                                    </td>
                                </tr>
                            </table>
                        </td>

                    </tr>
                </table>
            </div>
        </div>
    </div>
</div>

The bolded text denotes the changed lines.

Leave a Comment

(required) 

(required) 

(optional)

(required)