• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

How to default "checked" stay loggedin?

Jake Bunce

XenForo moderator
Staff member
#3
Here are detailed instructions:

Admin CP -> Appearance -> Templates -> login_bar_form

Add the red code (scroll right):

Code:
		<dl class="ctrlUnit submitUnit">
			<dt></dt>
			<dd>
				<input type="submit" class="button primary" value="{xen:phrase log_in}" tabindex="105" data-loginPhrase="{xen:phrase log_in}" data-signupPhrase="{xen:phrase sign_up}" />
				<label for="ctrl_remember" class="rememberPassword"><input type="checkbox" name="remember" value="1" id="ctrl_remember" tabindex="104" checked="checked" /> {xen:phrase stay_logged_in}</label>
			</dd>
		</dl>
There are two similar edits in this template:

Admin CP -> Appearance -> Templates -> helper_login_form

Add the red code (scroll right):

Code:
<xen:if is="{$xenOptions.registrationSetup.enabled}">
	<dl class="ctrlUnit">
		<dt><label for="ctrl_pageLogin_password">{xen:phrase do_you_already_have_account}</label></dt>
		<dd>
			<ul>
				<li><label for="ctrl_pageLogin_not_registered"><input type="radio" name="register" value="1" id="ctrl_pageLogin_not_registered" />
					{xen:phrase no_create_account_now}</label></li>
				<li><label for="ctrl_pageLogin_registered"><input type="radio" name="register" value="0" id="ctrl_pageLogin_registered" checked="checked" class="Disabler" />
					{xen:phrase yes_my_password_is}:</label></li>
				<li id="ctrl_pageLogin_registered_Disabler">
					<input type="password" name="password" class="textCtrl" id="ctrl_pageLogin_password" />					
					<div><label for="ctrl_pageLogin_remember" class="rememberPassword"><input type="checkbox" name="remember" value="1" id="ctrl_pageLogin_remember" checked="checked" /> {xen:phrase stay_logged_in}</label></div>
				</li>
			</ul>
		</dd>
	</dl>
<xen:else />
	<dl class="ctrlUnit">
		<dt><label for="ctrl_pageLogin_password">{xen:phrase password}:</label></dt>
		<dd>
			<input type="password" name="password" class="textCtrl" id="ctrl_pageLogin_password" />					
			<div><label for="ctrl_pageLogin_remember" class="rememberPassword"><input type="checkbox" name="remember" value="1" id="ctrl_pageLogin_remember" checked="checked" /> {xen:phrase stay_logged_in}</label></div>
		</dd>
	</dl>
</xen:if>
 

RoldanLT

Well-known member
#5
Here are detailed instructions:

Admin CP -> Appearance -> Templates -> login_bar_form

Add the red code (scroll right):

Code:
<dl class="ctrlUnit submitUnit">
<dt></dt>
<dd>
<input type="submit" class="button primary" value="{xen:phrase log_in}" tabindex="105" data-loginPhrase="{xen:phrase log_in}" data-signupPhrase="{xen:phrase sign_up}" />
<label for="ctrl_remember" class="rememberPassword"><input type="checkbox" name="remember" value="1" id="ctrl_remember" tabindex="104" checked="checked" /> {xen:phrase stay_logged_in}</label>
</dd>
</dl>
There are two similar edits in this template:

Admin CP -> Appearance -> Templates -> helper_login_form

Add the red code (scroll right):

Code:
<xen:if is="{$xenOptions.registrationSetup.enabled}">
<dl class="ctrlUnit">
<dt><label for="ctrl_pageLogin_password">{xen:phrase do_you_already_have_account}</label></dt>
<dd>
<ul>
<li><label for="ctrl_pageLogin_not_registered"><input type="radio" name="register" value="1" id="ctrl_pageLogin_not_registered" />
{xen:phrase no_create_account_now}</label></li>
<li><label for="ctrl_pageLogin_registered"><input type="radio" name="register" value="0" id="ctrl_pageLogin_registered" checked="checked" class="Disabler" />
{xen:phrase yes_my_password_is}:</label></li>
<li id="ctrl_pageLogin_registered_Disabler">
<input type="password" name="password" class="textCtrl" id="ctrl_pageLogin_password" />
<div><label for="ctrl_pageLogin_remember" class="rememberPassword"><input type="checkbox" name="remember" value="1" id="ctrl_pageLogin_remember" checked="checked" /> {xen:phrase stay_logged_in}</label></div>
</li>
</ul>
</dd>
</dl>
<xen:else />
<dl class="ctrlUnit">
<dt><label for="ctrl_pageLogin_password">{xen:phrase password}:</label></dt>
<dd>
<input type="password" name="password" class="textCtrl" id="ctrl_pageLogin_password" />
<div><label for="ctrl_pageLogin_remember" class="rememberPassword"><input type="checkbox" name="remember" value="1" id="ctrl_pageLogin_remember" checked="checked" /> {xen:phrase stay_logged_in}</label></div>
</dd>
</dl>
</xen:if>
Xf 1.1.3 code is different.
 

JamesBrown

Well-known member
#8
Here are detailed instructions:

Admin CP -> Appearance -> Templates -> login_bar_form

Add the red code (scroll right):

Code:
        <dl class="ctrlUnit submitUnit">
            <dt></dt>
            <dd>
                <input type="submit" class="button primary" value="{xen:phrase log_in}" tabindex="105" data-loginPhrase="{xen:phrase log_in}" data-signupPhrase="{xen:phrase sign_up}" />
                <label for="ctrl_remember" class="rememberPassword"><input type="checkbox" name="remember" value="1" id="ctrl_remember" tabindex="104" checked="checked" /> {xen:phrase stay_logged_in}</label>
            </dd>
        </dl>
There are two similar edits in this template:

Admin CP -> Appearance -> Templates -> helper_login_form

Add the red code (scroll right):

Code:
<xen:if is="{$xenOptions.registrationSetup.enabled}">
    <dl class="ctrlUnit">
        <dt><label for="ctrl_pageLogin_password">{xen:phrase do_you_already_have_account}</label></dt>
        <dd>
            <ul>
                <li><label for="ctrl_pageLogin_not_registered"><input type="radio" name="register" value="1" id="ctrl_pageLogin_not_registered" />
                    {xen:phrase no_create_account_now}</label></li>
                <li><label for="ctrl_pageLogin_registered"><input type="radio" name="register" value="0" id="ctrl_pageLogin_registered" checked="checked" class="Disabler" />
                    {xen:phrase yes_my_password_is}:</label></li>
                <li id="ctrl_pageLogin_registered_Disabler">
                    <input type="password" name="password" class="textCtrl" id="ctrl_pageLogin_password" />                   
                    <div><label for="ctrl_pageLogin_remember" class="rememberPassword"><input type="checkbox" name="remember" value="1" id="ctrl_pageLogin_remember" checked="checked" /> {xen:phrase stay_logged_in}</label></div>
                </li>
            </ul>
        </dd>
    </dl>
<xen:else />
    <dl class="ctrlUnit">
        <dt><label for="ctrl_pageLogin_password">{xen:phrase password}:</label></dt>
        <dd>
            <input type="password" name="password" class="textCtrl" id="ctrl_pageLogin_password" />                   
            <div><label for="ctrl_pageLogin_remember" class="rememberPassword"><input type="checkbox" name="remember" value="1" id="ctrl_pageLogin_remember" checked="checked" /> {xen:phrase stay_logged_in}</label></div>
        </dd>
    </dl>
</xen:if>

can't find this code in 1.3