I've modified the template for the user page, but I'm unable to change the
What I'm doing is making it so names like "Chris Vimes" appear as "Chris V." using PHP, and dynamically showing the name if you're logged in, or showing the partial name if logged out. The code I'm using is:
// splits first + last into "First L." for logged off users
if ($user->id <= 0) {
$toks = explode(" ", $this->user->name);
if (isset($toks[1])) {
$myName = $toks[0] . ' ' . substr($toks[1], 0, 1) . '.';
} else {
$myName = $this->user->name;
}
} else {
$myName = $this->user->name;
}
// end split name
However, when doing this, the title is still "Chris Vimes", for example, and I can't figure out how to change this.
Any help is greatly appreciated.