Author: Mickroz
Description: With the You, me, we and us BBCode you can use tags that will show viewers name, posters name, posters and viewers name, boardname in the posts.
File edits
Open: includes/ucp/ucp_pm_viewmessage.php
Find:
Code: Select all
$message = bbcode_nl2br($message);
$message = smiley_text($message);
Code: Select all
$your_username = get_username_string('full', $user->data['user_id'], $user->data['username'], $user->data['user_colour'], $user->lang['GUEST']);
$my_username = get_username_string('full', $message_row['user_id'], $message_row['username'], $message_row['user_colour']);
$find = array('[we]', '[me]', '[you]', '[us]');
$replace = array(
"$your_username and $my_username",
$my_username,
$your_username,
'<span style="color: red;">' . $config['sitename'] . '</span>',
);
$message = str_replace($find, $replace, $message);
Find:
Code: Select all
$message = bbcode_nl2br($message);
$message = smiley_text($message);
Code: Select all
$your_username = get_username_string('full', $user->data['user_id'], $user->data['username'], $user->data['user_colour'], $user->lang['GUEST']);
$my_username = get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']);
$find = array('[we]', '[me]', '[you]', '[us]');
$replace = array(
"$your_username and $my_username",
$my_username,
$your_username,
'<span style="color: red;">' . $config['sitename'] . '</span>',
);
$message = str_replace($find, $replace, $message);
Now we need to create 4 BBCodes
You, showing viewers name
BBCode:
Code: Select all
[you][/you]
Code: Select all
[you]
Code: Select all
[you] Viewers name: [you][/you]
Code: Select all
[you][/you]
[you][/you]
Me, showing posters name
BBCode:
Code: Select all
[me][/me]
Code: Select all
[me]
Code: Select all
[me] Posters name: [me][/me]
Code: Select all
[me][/me]
[me][/me]
We, showing posters & viewers name
BBCode:
Code: Select all
[we][/we]
Code: Select all
[we]
Code: Select all
[we] Posters & Viewers name: [we][/we]
Code: Select all
[we][/we]
[we][/we]
Us, showing board name
BBCode:
Code: Select all
[us][/us]
Code: Select all
[us]
Code: Select all
[us] Board name: [us][/us]
Code: Select all
[us][/us]
[us][/us]