Форуми / Cotonti / Skins / login fields in header and index

pieter
#1 04.09.2010 14:10
Hello guys,

Standard template the login is in an other screen.

Here at cotonti it is in the header.
How can we do this.
Can it also be done in the index?

Before we needed the leetlogin

Thx
... can we help you ...
Kort
#2 04.09.2010 14:25
<ul>
<!-- BEGIN: GUEST -->
	<form name="login" action="{HEADER_GUEST_SEND}" method="post">
	<li>{PHP.skinlang.header.Welcome}</li>
	<li><input type="text" class="tinput" name="rusername" maxlength="32" value="{PHP.L.User}" onfocus="if(this.value=='{PHP.L.User}') this.value=''"
onblur="if(this.value=='') this.value='{PHP.L.User}'" /></li>
	<li><input type="password" class="tinput" name="rpassword" maxlength="32" value="{PHP.L.Password}" onfocus="if(this.value=='{PHP.L.Password}') this.value=''"
onblur="if(this.value=='') this.value='{PHP.L.Password}'"/></li>
	<li><label><input type="checkbox" name="rremember" />{PHP.skinlang.usersauth.Rememberme}</label></li>
	<li><input type="submit" class="tinput" value="{PHP.L.Login}" /></li>
	<li><a href="users.php?m=register">{PHP.L.Register}</a></li>
	<li><a href="plug.php?e=passrecover">{PHP.skinlang.usersauth.Lostpassword}</a></li>
	</form>
<!-- END: GUEST -->
<!-- BEGIN: USER -->
	<li>{PHP.L.User}: {PHP.usr.name}</li>
<!-- IF {PHP.usr.profile.user_avatar} -->
	<li><img src="{PHP.usr.profile.user_avatar}" alt="{PHP.L.Avatar}" /></li>
<!-- ELSE -->
	<li><img src="datas/defaultav/blank.png" alt="{PHP.L.Avatar}" /></li>
<!-- ENDIF -->
<!-- IF {PHP.usr.isadmin} -->
	<li><a href="admin.php" title="{PHP.L.Adminpanel}">{PHP.L.Adminpanel}</a></li>
<!-- ENDIF -->
	<li><a href="users.php?m=profile" title="{PHP.L.Profile}">{PHP.L.Profile}</a></li>
	<li><a href="users.php" title="{PHP.L.Users}">{PHP.L.Users}</a></li>
	<li><a href="pfs.php" title="{PHP.L.PFS}">{PHP.L.PFS}</a></li>
	<li><a href="pm.php" title="{PHP.L.Private_Messages}">{PHP.L.PM}</a></li>
	<li><a href="{PHP.out.loginout_url}" title="{PHP.L.Logout}">{PHP.L.Logout}</a></li>
<!-- END: USER -->
</ul>
Placing login form in index.tpl requires
<form name="login" action="{PHP.cfg.mainurl}/users.php?m=auth&a=check" method="post">
Leetlogin can be discarded in Cotonti.
SED.by - создание сайтов, разработка плагинов и тем для Котонти
pieter
#3 04.09.2010 14:49
thx
... can we help you ...
Kort
#4 04.09.2010 15:10
It's time we started Cotonti knowledge base to record most commonly requested stuff.
SED.by - создание сайтов, разработка плагинов и тем для Котонти
pieter
#5 04.09.2010 19:50
Good idea. Maybe install a Cotonti-pedia
... can we help you ...
fraze
#6 05.09.2010 17:32
what <ul> style do you use for the login box on cotonti.com? cos if you add that code into the current sed-light header.tpl you dont get an inline list, just standard bullet-points.

thanks :)
pieter
#7 05.09.2010 18:53
You can add:

#header #userBar .text ul { padding:0; margin:0; }
#header #userBar .text li { display:inline; list-style:none; padding:0; margin:0; }
... can we help you ...
fraze
#8 05.09.2010 22:24
hmm - i've installed a fresh version of 0.6.10 the the header code doesnt work...

is there anything i need to change elsewhere?
zboy812
#9 28.09.2010 07:47
<!-- BEGIN: GUEST -->
not working in index. now how to do?
pieter
#10 28.09.2010 15:53
you can use:

<!-- IF {PHP.usr.id} < 1 -->
CODE YOU WANT TO BE VIEWED BY GUESTS
<!-- ENDIF -->
... can we help you ...
zboy812
#11 29.09.2010 03:38
so awesome, thanx!
Franco
#12 24.07.2011 23:47

i know it's an old bump, but appartently the <!-- BEGIN: USER --> isn't working either in the index, and if i use <!-- IF {PHP.usr.id} > 1 --> or <!-- IF {PHP.usr.maingrp} > 1 --> it has some kind of conflict with the IF of the avatar and admin panel