[Typo3] To do list

Matt Valenti mv at mattvalenti.com
Mon Mar 7 21:20:57 CET 2005


I'm not exactly sure what you need but I've included some typoscript that I 
salvaged from the news group and modified to suit my own layout.  My 
understanding is that the <!--###USERNAME###--> tag will be rendered with 
the username automatically.  The rest of the code here displays a login box 
if no-one is logged in or the username if they are logged.

# when someone is logged in, show this part
[usergroup = *]
temp.10 = TEXT
temp.10.data  = TSFE : id
temp.10.wrap (
<form action="index.php?id= | " method="post">
<table class="tableLogin" border="0" cellpadding="0" cellspacing="0">
<tr>
  <td nowrap="1" width="115px">
    Login: <!--###USERNAME###-->
  </td>
  <td>
    <input name="image" type="image" title="Logout" 
src="fileadmin/template/main/images/locked.gif" alt="Login" align="middle" 
width="16" height="17" border="0">
  </td>
</tr>
</table>
<input type="hidden" name="logintype" value="logout">
</form>
)
# if nobody is logged in, show this part
[else]
temp.10 = TEXT
temp.10.data  = TSFE : id
temp.10.wrap (
<form action="index.php?id=20" method="post">
<table class="tableLogin" border="0" cellpadding="0" cellspacing="0">
<tr>
  <td nowrap="1" width="115px">
    <input name="user" type="text" id="user" title="Enter username" 
onfocus="if (this.value==this.defaultValue) this.value=''" value="" 
style="width:55px;" />
    <input name="pass" type="password" id="pass" title="Enter password" 
onfocus="if (this.value==this.defaultValue) this.value=''" value="" 
style="width:55px;" >
  </td>
  <td>
    <input name="image" type="image" title="Login" 
src="fileadmin/template/main/images/lock.gif" alt="Login" align="middle" 
width="16" height="17" border="0">
    <input type="hidden" name="redirect_url" value="index.php?id= | " />
    <input type="hidden" name="logintype" value="login"> <input 
type="hidden" name="pid" value="22">
  </td>
</tr>
</table>
</form>
)
[global]

---

"Mo Khalil" <mo at voodooskunk.com> wrote in message 
news:mailman.28.1109665203.22405.typo3-english at lists.netfielders.de...
> Hi people,
>
> Having a couple of probs with Typo3, hope somebody can help.
>
> How do I display a frontend user's login on every page (e.g. a little line 
> at the top of the page that reads "You are logged in as: Username"?
>
> Also, I'm using the extension mininews to display short articles on the 
> website. However, it only displays news on the page that the news content 
> was created on. I need it to display that news on every page, is this 
> possible or am I using the wrong news extension? I have configured a HTML 
> template with a tag <div id="news"> and set up typoscript to render news 
> content into that tag.
>
> Thank you very much!
>
> mo.
> 





More information about the TYPO3-english mailing list