[Typo3] newloginbox in template

Mike Fabricius mike at mikefab.net
Wed May 11 09:49:51 CEST 2005


chetan wrote:
> Hi all
> 
> I need to associate a login box with all the pages in my site, just like 
> the one in typo3's website. User should be able to login from any page 
> and should have option to logout from any other page. I am using 
> `newloginbox` extention for this. Now the problem is how to use the same 
> plugin for all the pages. Can anybody suggest me a solution for this?
> 
> 
> with regards
> 
> Chetan
> Srijan Technologies Pvt. Ltd.
> 
> 

Put a marker in your template for the login box. My example below is 
designed to be used with a TV FCE, but this could work just as well 
substituting a subpart marker. Code the form in typoscript, and don't 
forget to change the PIDs of the page where the login box is and the 
page where the FE users are stored, and well as the page where the 
profile editing page is if you want this shown. I learnt this from a 
previous post which I now can't find.

Mike



temp.login_logout = TEXT
temp.login_logout.insertData = 1
temp.login_logout.value (

<form name="login" id="login" method="post" action="index.php?id=48">
                       <p>
                         <label>Username:<br />
                 <input name="user" type="text" class="loginbox" 
id="user" size="20" />
                         </label>
                       </p>
                       <p>
                         <label>Password:
                         <br />
                         <input name="pass" type="password" 
class="loginbox" size="20" />
                        </label>
                       </p>
                       <p>
                         <input name="Submit" type="submit" 
class="loginbutton" value="Sign in" />
                       </p>
<input type="hidden" name="logintype" value="login">
<input type="hidden" name="redirect_url" value="index.php?id={TSFE:id}">
<input type="hidden" name="pid" value="49">
        <p><a 
href="index.php?id=48&no_cache=1&tx_newloginbox_pi1[forgot]=1">Forgot 
password?
                           <label></label>
               </a></p>
             </form>
)

[usergroup = *]

temp.loginScript=PHP_SCRIPT
temp.loginScript.file= fileadmin/scripts/fe_user.inc
temp.login_logout >
temp.login_logout = TEXT
temp.login_logout.insertData = 1
temp.login_logout.value (

<form action="index.php?id=48" method="POST">
<br />
  <span class="subhead">Logged in as: </span>
  <span class="logintext"><!--###USERNAME###--></span>
<p>
  <input type="submit" value="Log out" class="loginbutton">
  <input type="hidden" name="logintype" value="logout">
  <input type="hidden" name="redirect_url" value="index.php?id={TSFE:id}">
<p class="logintext"><a href="/index.php?id=54">Update your profile</a></p>
</form>
)

[global]

lib.loginform < temp.login_logout



More information about the TYPO3-english mailing list