1
hi,
i want to include in my home page a short "Welcome back, [username]" with the username that varies depending on which user logs in.
so i edited [theme]%2Ftheme.html and created a login box:
<?php if (!$xoops_isuser): ?>
<form action="<?php echo $this->_tpl_vars['xoops_url']; ?>
/user.php" method="post"><b>User: </b>
<input type='text' name='uname' value='username' size=7 maxlenght=20 onMouseOver="this.focus();" onFocus="if(this.value == 'username') this.value = '';">
<b>Pass: </b>
<input type="password" size="7" maxlenght=15 name="pass"/>
<input type="hidden" name="op" value="login" />
<input type="submit" value="login" />
<a href="<?php echo $this->_tpl_vars['xoops_url']; ?>
/register.php"><b>
Join</b></a>
</form>
<?php else: ?>
Welcome back, <b><?php echo $this->_tpl_vars['user_realname']; ?>
<?php endif; ?>
Unfortunately it only works while browsing the User Page, the other pages give a "Welcome back,." with no username.
What function shall i include to make it work???