You don't mention what version of mahara you're using, but if you have a look at lib/web.php -> smarty() and search for assign_by_ref('USER' you'll see that the user variable is already always assigned to templates so you should be able to use this relatively easily.
The theme change you want is probably more akin to:
{if $USER->is_logged_id()}{$USER|display_name}{/if}
Of course, I'd highly recommend that if you're doing this you should do it in the following way:
I'd really advise against making changes to the raw theme as you'll find things get difficult to upgrade in the future.
Hope that this helps,
Andrew
]]>Saludos.
Iñaki.
For example, this works:
I put this in view/view.php:
$smarty->assign('thisUsername',$_SESSION['user/username']);
and I put this in footer.tpl:
{$thisUsername}
If I then hit view/view.php, I see the username in the footer. I'm hoping not to have to do the above assign() for each php page that uses smarty though.
I do see in footer.tpl that {$WWWROOT} is visible to this template, and I don't see that it's assigned via $smarty->assign in pages such as \view\view.php, so I'm thinking there must be a way to globally set a variable that will be visible to all the .tpl files.
Thanks.
]]>