Quote:
Originally Posted by Deaths
I believe PM's use the $post array aswell, but I'm not sure about this.
I cannot check it from where am now, though I will look into this ASAP.
This hack was intended for forum post, not for PM's.
I will look into this though, thank you for the feedback.
|
Take inspiration from this snippet I've made on my board:
Code:
global $post;
if ('' == $post[username]) {
global $reputation;
if ('' == $reputation[username]) {
global $pm;
if ('' == $pm[fromusername]) {
$meUsername = $bbuserinfo[username];
} else {
$meUsername = $pm[fromusername];
}
} else {
$meUsername = $reputation[username];
}
} else {
$meUsername = $post[username];
}
By the end of that $meUsername contains the correct name for a /me code.