MyBB Community Forums
Username replacement - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Extensions (https://community.mybb.com/forum-201.html)
+--- Forum: Plugins (https://community.mybb.com/forum-73.html)
+---- Forum: Plugin Requests (https://community.mybb.com/forum-65.html)
+---- Thread: Username replacement (/thread-31750.html)



Username replacement - Amadeus - 2008-05-24

I am a member at a multitude of discussion boards, and one of them being vBulletin.

There is a code that I saw, called 'You replacement'. Basically, when a user makes a post, and types in the bbcode "[you]", it replaces that code with the username of the person viewing it.

I was just wondering if there was anything of that effect made for mybb. If not, then I do have a copy of the xml code, and was wondering if it could be ported to mybb.

<?xml version="1.0" encoding="ISO-8859-1"?>

<product productid="j00_replace" active="1">
	<title>j00 Replacement</title>
	<description><![CDATA[This will replace a word with the viewing member's name.]]></description>
	<version>1.0.1</version>
	<url />
	<versioncheckurl />
	<apm_releasedate>1201597200</apm_releasedate>
	<apm_author>Boofo</apm_author>
	<apm_relatedurl />
	<apm_extrainfo />
	<apm_extraedit />
	<dependencies>
	</dependencies>
	<codes>
	</codes>
	<templates>
	</templates>
	<plugins>
		<plugin active="1" executionorder="5">
			<title><![CDATA[[j00] Archive Edit]]></title>
			<hookname>archive_complete</hookname>
			<phpcode><![CDATA[$output = str_replace('[j00]', $vBulletin->userinfo['username'], $output);]]></phpcode>
		</plugin>
		<plugin active="1" executionorder="5">
			<title><![CDATA[[j00] Global]]></title>
			<hookname>global_complete</hookname>
			<phpcode><![CDATA[$output = str_replace('[j00]', $vBulletin->userinfo['username'], $output);]]></phpcode>
		</plugin>
		<plugin active="1" executionorder="5">
			<title><![CDATA[[j00] Profile Edit]]></title>
			<hookname>profile_complete</hookname>
			<phpcode><![CDATA[$output = str_replace('[j00]', $vbulletin->userinfo['username'], $output);]]></phpcode>
		</plugin>
	</plugins>
	<phrases>
	</phrases>
	<options>
	</options>
	<helptopics>
	</helptopics>
	<cronentries>
	</cronentries>
	<faqentries>
	</faqentries>
</product>

This is the vB code. I'm not sure how the coding for mybb works, or else I would have done it myself.

If anybody can help me out with this, it would be greatly appreciated.


RE: Username replacement - Ferron - 2008-05-24

I think this is what you are looking for. Wink


RE: Username replacement - Amadeus - 2008-05-24

computergeek67 Wrote:I think this is what you are looking for. Wink

YES.

Thank you.