I have just posted an alternative method that does not break the template concept of avoiding mixing PHP into your HTML.
Edit the "public function tpl_defaults()"
in app.inc.php
add this to the bottom of the function:
Code:
if(isset($_SESSION['s']['user'])) {
$this->tpl->setVar('cpuser', $_SESSION['s']['user']['username']);
}
Then in your templates you can use
<tmpl_var format="strtoupper" name="cpuser">
for example alongside the word LOGOUT in main.tpl.htm
Hopefully the 'bosses' will include my suggested change to app.inc.php in future versions!
Recent comments
3 hours 10 min ago
4 hours 10 min ago
7 hours 57 min ago
9 hours 11 min ago
12 hours 47 min ago
20 hours 2 min ago
1 day 4 hours ago
1 day 6 hours ago
1 day 21 hours ago
1 day 23 hours ago