trong forum này hình như vẫn chưa có mod "Dùng để thay chử [you] bằng tên nick của người đang đọc nó"

Admin ơi thêm mod này vào đi rất hay đó,đặc biệt là phần chữ ký của member

A replacement BB Code for the username of the person viewing the post. You can use either [YOU] or [you] in a post, post title or thread title.

[you] Example: (based upon the username of the person viewing thread being Bob)

Hi [you]

Hi Bob

/you Example: (based upon the username of the person viewing thread being Bob)

/you is here

* Bob is here

The replacement occurs in the following places:

* EDITPOST preview
* NEWTHREAD preview
* SHOWPOST
* SHOWTHREAD
* Archive
* SEARCH

Clicked Installed for Notifications of when this modification is updated.
code:
Code:
<?xml version="1.0" encoding="ISO-8859-1"?>

<product productid="youbbcode" active="1">
	<title><![CDATA[[you] BB Code]]></title>
	<description><![CDATA[Replaces [you] in posts with the username of the person logged into forum]]></description>
	<version>1.2</version>
	<url><![CDATA[http://www.vbulletin.org/forum/misc.php?do=producthelp&pid=youbbcode]]></url>
	<versioncheckurl><![CDATA[http://www.vbulletin.org/forum/misc.php?do=productcheck&pid=youbbcode]]></versioncheckurl>
	<dependencies>
	</dependencies>
	<codes>
	</codes>
	<templates>
	</templates>
	<plugins>
		<plugin active="1" executionorder="5">
			<title>Replacement in ARCHIVE</title>
			<hookname>archive_complete</hookname>
			<phpcode><![CDATA[$output = str_replace("[you]", $vbulletin->userinfo[username], $output);
$output = str_replace("[YOU]", $vbulletin->userinfo[username], $output);]]></phpcode>
		</plugin>
		<plugin active="1" executionorder="5">
			<title>Replacement in EDITPOST preview</title>
			<hookname>editpost_edit_complete</hookname>
			<phpcode><![CDATA[$postpreview = str_replace("[you]", $vbulletin->userinfo[username], $postpreview);
$postpreview = str_replace("[YOU]", $vbulletin->userinfo[username], $postpreview);]]></phpcode>
		</plugin>
		<plugin active="1" executionorder="5">
			<title>Replacement in INDEX for thread title</title>
			<hookname>forumbit_display</hookname>
			<phpcode><![CDATA[$forum['lastpostinfo'] = str_replace("[you]", $vbulletin->userinfo[username], $forum['lastpostinfo']);
$forum['lastpostinfo'] = str_replace("[YOU]", $vbulletin->userinfo[username], $forum['lastpostinfo']);]]></phpcode>
		</plugin>
		<plugin active="1" executionorder="5">
			<title>/you replacement in newpost preview</title>
			<hookname>newpost_preview</hookname>
			<phpcode><![CDATA[$previewmessage = explode ("\n", $previewmessage);
$yourusername = '* ' . $vbulletin->userinfo[username] . ' ';
foreach ($previewmessage as &$postmessageline)
{
if (substr($postmessageline, 0, 5) == '/you ')
{
if (substr($postmessageline, -4) == '<br>')
{
$postmessageline = substr($postmessageline, 0, -4);
$addbr = true;
}
else
{
$addbr = false;
}
$postmessageline = '<font color="red">' . $postmessageline . '</font>';
$postmessageline = str_replace('/you ', $yourusername, $postmessageline);
if ($addbr)
{
$postmessageline = $postmessageline . "<br>";
}
}
}
unset($postmessageline);
$previewmessage = implode ("\n", $previewmessage);]]></phpcode>
		</plugin>
		<plugin active="1" executionorder="5">
			<title>Replacement for /you</title>
			<hookname>newpost_process</hookname>
			<phpcode><![CDATA[/*$post['message'] = explode("\r\n", $post['message']);
foreach ($post['message'] as $no => $line)
{
if(substr($line, 0, 5) == '/you ')
{
$line = str_replace('/you ', '[you]', $line);
$line = '* ' . $line . ' ';
}
}
print_r($post['message']);
exit;
$post['message'] = implode("\r\n", $post['message']);
$dataman->setr('pagetext', $post['message']);*/]]></phpcode>
		</plugin>
		<plugin active="1" executionorder="5">
			<title>Replacement in NEWTHREAD preview</title>
			<hookname>newthread_form_complete</hookname>
			<phpcode><![CDATA[$postpreview = str_replace("[you]", $vbulletin->userinfo[username], $postpreview);
$postpreview = str_replace("[YOU]", $vbulletin->userinfo[username], $postpreview);]]></phpcode>
		</plugin>
		<plugin active="1" executionorder="5">
			<title>/you replacement for postbit</title>
			<hookname>postbit_display_complete</hookname>
			<phpcode><![CDATA[global $vbulletin;
$post['message'] = explode ("\n", $post['message']);
$yourusername = '* ' . $vbulletin->userinfo['username'] . ' ';
foreach ($post['message'] as &$postmessageline)
{
if (substr($postmessageline, 0, 5) == '/you ')
{
if (substr($postmessageline, -4) == '<br>')
{
$postmessageline = substr($postmessageline, 0, -4);
$addbr = true;
}
else
{
$addbr = false;
}
$postmessageline = '<font color="red">' . $postmessageline . '</font>';
$postmessageline = str_replace('/you ', $yourusername, $postmessageline);
if ($addbr)
{
$postmessageline = $postmessageline . "<br>";
}
}
}
unset($postmessageline);
$post['message'] = implode ("\n", $post['message']);]]></phpcode>
		</plugin>
		<plugin active="1" executionorder="5">
			<title><![CDATA[[you] replacement SEARCH]]></title>
			<hookname>search_results_postbit</hookname>
			<phpcode><![CDATA[$post['posttitle'] = str_replace("[YOU]", $vbulletin->userinfo[username], $post['posttitle']);
$post['posttitle'] = str_replace("[you]", $vbulletin->userinfo[username], $post['posttitle']);
$post['pagetext'] = str_replace("[YOU]", $vbulletin->userinfo[username], $post['pagetext']);
$post['pagetext'] = str_replace("[you]", $vbulletin->userinfo[username], $post['pagetext']);
$post['threadtitle'] = str_replace("[YOU]", $vbulletin->userinfo[username], $post['threadtitle']);
$post['threadtitle'] = str_replace("[you]", $vbulletin->userinfo[username], $post['threadtitle']);]]></phpcode>
		</plugin>
		<plugin active="1" executionorder="5">
			<title>Replacement in SHOWPOST</title>
			<hookname>showpost_complete</hookname>
			<phpcode><![CDATA[$postbits = str_replace("[you]", $vbulletin->userinfo[username], $postbits);
$postbits = str_replace("[YOU]", $vbulletin->userinfo[username], $postbits);
$threadinfo[title] = str_replace("[you]", $vbulletin->userinfo[username], $threadinfo[title]);
$threadinfo[title] = str_replace("[YOU]", $vbulletin->userinfo[username], $threadinfo[title]);]]></phpcode>
		</plugin>
		<plugin active="1" executionorder="65535">
			<title>Replacement in SHOWTHREAD</title>
			<hookname>showthread_complete</hookname>
			<phpcode><![CDATA[$postbits = str_replace("[you]", $vbulletin->userinfo[username], $postbits);
$postbits = str_replace("[YOU]", $vbulletin->userinfo[username], $postbits);
$thread['title'] = str_replace("[you]", $vbulletin->userinfo[username], $thread['title']);
$thread['title'] = str_replace("[YOU]", $vbulletin->userinfo[username], $thread['title']);]]></phpcode>
		</plugin>
		<plugin active="1" executionorder="5">
			<title>Replacement in SHOWTHREAD for thread title</title>
			<hookname>showthread_postbit_create</hookname>
			<phpcode><![CDATA[if (!$gjgfkjdgf)
{
$thread['title'] = str_replace("[you]", $vbulletin->userinfo[username], $thread['title']);
$thread['title'] = str_replace("[YOU]", $vbulletin->userinfo[username], $thread['title']);
$gjgfkjdgf = 1;
}]]></phpcode>
		</plugin>
		<plugin active="1" executionorder="5">
			<title>Replacement in FORUMDISPLAY for thread title</title>
			<hookname>threadbit_display</hookname>
			<phpcode><![CDATA[$thread['threadtitle'] = str_replace("[you]", $vbulletin->userinfo[username], $thread['threadtitle']);
$thread['threadtitle'] = str_replace("[YOU]", $vbulletin->userinfo[username], $thread['threadtitle']);]]></phpcode>
		</plugin>
	</plugins>
	<phrases>
	</phrases>
	<options>
	</options>
	<helptopics>
	</helptopics>
	<cronentries>
	</cronentries>
	<faqentries>
	</faqentries>
</product>
notebook lưu lại với đuôi ".xml" để install :big_grin: