
02-17-2005, 09:37 PM
|
 |
|
|
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили:
0 раз(а) в 0 сообщениях
|
|
Quote:
Originally Posted by buro9
Erwin! I've got it!
Could you update your hack?
Code:
// HACK : START : ME
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];
}
$bbcode = preg_replace('#^/me (.*)$#im', "<span class=\"postAction\">* $meUsername \\1 *</span>", $bbcode);
// HACK : END : ME
Note I've changed one thing regards the formatting that you might not want to change... I use a stylesheet for it so that I can use different colours according to style in use.
But it's the nested if's that is important... solves /me for PM's and reputation bits 
|
Awesome!  I sure will...
|