Login functions
The following can be used to create custom login forms into extra- or intranet pages.
{login_name}
Inserts text field for login name or if user is already logged in displays user name.
Parameters
- boxstyle - allows custom style definition. If not set default style is 'width:60 class=searchbox size=3'
- fontstyle - allows custom font style.
- value - defines what should be displayed in text field.
{login_pass}
Inserts text field for password.
Parameters
- boxstyle - allows custom style definition. If not set default style is 'width:60 class=searchbox size=3'
- fontstyle - allows custom font style.
- value - defines what should be displayed in text field.
{login_button}
Insert submit button and necessary hidden field for login form. If user is already logged in, displays logout button.
Example 1 : Simple login formParameters
- boxstyle - allows custom style definition. Default style: class="searchbtn"
- fontstyle - allows custom font style definition. Default style: class=navi2_on
- value - defines the text in button. By default it will be system string "log in" or "log out" in case of already logged in user.
- targeturl - URL where page is directed after the login button is pressed. Since version 3.2.1
<form action="{$self}" method=post>
login: {login_name}
pass: {login_pass}
{login_button}
</form>
Example 2 : Simple login form
<form action="{$self}" method=post>
login: {login_name}
pass: {login_pass}
<input type="submit" value="Login">
<input type=hidden name="op" value="login">
<input type=hidden name="url" value="{$url|@urlencode}">
</form>
Example 3 : Login form with custom styles and some javascript
<form method=post>
{login_name boxstyle='style="width:90px;height:18px;background-color:#D1E8E0;color:#29644F;font-family:Verdana,Arial,Helvetica;font-size:11px;border:1px;border-color:#29644F;line-height:14px;"onFocus="if(this.value==\'Username:\')this.value=\'\'";onBlur="if(this.value==\'\')this.value= \'Username:\';"onChange="this.value= this.value.toLowerCase();"'fontstyle='class="white"' value="Username:"}
{login_pass boxstyle='style="width:90px;height:18px;background-color:#D1E8E0;color:#29644F;font-family:Verdana,Arial,Helvetica;font-size:11px;border:1px;border-color:#29644F;line-height:14px;"onFocus="if(this.value==\'*******\')this.value=\'\'";onBlur="if(this.value==\'\')this.value= \'*******\';"onChange="this.value= this.value.toLowerCase();"'fontstyle='class="white"' value="*******"}
{login_button boxstyle='class="frm" style= "width:50px;height:18px;color:#E3F1EC"'fontstyle='class="white"' value="Log in"}
</form>
Example 4 : Simple login form with redirecting to URL "?id=1234"
<form action="{$self}" method=post>
login: {login_name}
pass: {login_pass}
{login_button targeturl="?id=1234"}
</form>
RSS