vBulletin Mods

The Official vBulletin Modifications Site

Advanced [YOU] BB Code (with options) by BOP5
by BirdOPrey5
28 Nov 2010 19:46

3 Attachment(s)
Developer: BirdOPrey5 - http://www.vbulletin.org/forum/member.php?u=258922

Tested With vBulletin 3.8.x and 4.0.8, may work with older and newer versions.
VB 4.x Thread: http://www.vbulletin.org/forum/showthread.php?t=254373

Demo: http://www.juot.net/forums/showthread.php?t=47856

This mod introduces the [YOU] "BB Code." When a user types in [YOU] the forum will replace it with the Username of the User currently viewing the forum. For example if you make a post that says "[YOU] was here." and your username is BirdOPrey5 you will see, after submitting the post, "BirdOPrey5 was here." Meanwhile at the same time another user, say Joe 113, will see "Joe 113 was here."

Why do this? The most prevalent reason is just to mess with people, use your imagination on how... But there can be some legitimate uses too. I have a "Welcome" thread on my forum that Welcome's every user by name. They will see a sticky in my off-topic with their username to make them feel special- eventually they'll figure out it was the [you] code, but not for a while usually.

I have marked this mod both as BETA and Reusable Code. THIS IS A STABLE BETA and I run it on my forum without incident. It is a BETA because there are some minor missing features I'll detail a little later. However it works for my needs so it's not a priority for me to further develop. The code is reusable in hopes someone with more time and skill might finish everything and/or expand upon it.

There are other [YOU] BB Codes but what makes this one special is:
  • It's "Advanced" - There are settings in vBulletin options to enable, disable, block, and make users immune to this code.
  • You can set a phrase to be displayed to guests/unregistered users who otherwise would simply see "Unregistered" in place of [you].
  • This [YOU] code works in search result thread titles, including "New Posts." Some other [you] codes don't work here.
  • [YOU] works in Signatures

Usage is simple... just type [you] or [YOU] into any of the following locations:
  • A Post or Thread Title
  • The Body of a Post (Message)
  • Your Signature
  • Your User title
  • Polls


This isn't a true BB Code, it's a mod that acts LIKE a BB Code.

In Admin CP go to Plugins & Products -> Manage Products -> Add/Import Product
Click on "Choose File" and browse to the product XML file that is included in this .zip.
Click on "Import" and let the file import.

You MUST go to the Mod Options to Enable this Mod and set its settings. It is OFF by default.
In Admin CP go to vBulletin Options -> Advanced [YOU] Settings (near the bottom)
Choose "Yes" to enable the mod.

In settings you can set:
Block Usergroups - Any usergroups you enter here will not be allowed to use the [YOU] code in their posts, signatures, or user titles. If they attempt to use [YOU] everyone will simply see [YOU] - no replacement will be made.

Disable [YOU] in Selected Forums - If you don't want to enable [YOU] in certain forums enter their forum ids here. If anyone uses [YOU] in these forums the other users will see [YOU] - no replacement will be made.

[YOU] for Guests - This is the name, or word, you want unregistered/not logged in/guest users to see if they come across a post that uses [YOU]. In other [you] BB Codes guests would simply see "Unregistered" - now you can make it anything. I suggest simply "you."

Immune Usergroups - Anyone in the immune usergroups will always see the code [YOU] no matter who uses it or where. This is useful possibly for mods or admins who don't want to risk being fooled by this code.


The main limitation of this Beta is that the option "Block Usergroups From Using [YOU]" isn't fully implemented. It WILL block [YOU] from working in their posts and signatures, which is most important- but in certain areas like "New Post Preview" and "Review" the block doesn't work. This isn't a big deal because the other users of the forum will never have the [YOU] code work on posts by blocked users, but for the user who is blocked it may be confusing. If they view a preview of their post they will see the [YOU] code working but when they submit it, it won't work.

I couldn't get this working in this version because it would require another database query (or at least changing an existing one) and that is beyond my ability at the moment. I hope to fix this one day, unless someone else comes along and does it first.

Also when previewing your signature in your User CP you will see the [YOU] code in the signature, however it WILL work correctly in posts with the signature attached.

Please Mark as Installed if you use this. :)

As always use this mod at your own risk. I strongly suggest backing up your site before making any changes.

Update - 11/28/2010 - Updated to V 0.91 - Added 1 plugin for breadcrumbs
Update - 12/7/2010 - Updated to 0.92 - Added 2 plugins to work in Polls (Questions and Options)

Install as normal, Allow Overwrite = Yes

BirdOPrey5 28 Nov 2010 20:31


BirdOPrey5 07 Dec 2010 16:55

Updated to v 0.92 - Added plugins to let [you] work in poll questions and options.

Thanks for sharing!
by Blueracer66
13 Dec 2010 21:53

*Installed. Excellent!* I just installed this on my board at http://allconsolegamers.com/ and seems to be working well!:D

BirdOPrey5 07 Jan 2011 13:58

To get [YOU] to work in VB Advanced CMPS "Recent Threads" requires a manual file edit since hooks aren't available... also it will convert all [YOU] codes, it won't be able to be restricted by usergroup- but I find this is a lot better than nothing.

In your /modules/ directory edit your recentthreads.php file.

Find the line:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

It's around line 246 in VBA version 3.2.2...
And directly under that put:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

I suggest saving a backup of the original file just in case, but it's working fine for me.

Lynne 14 Jun 2012 05:25

I just have to say that this tag is amazingly fun! I installed it right before April Fools this year for a specific purpose that day. We had a couple of threads get started that day that are still going, and going, and going.... all these users that no one had ever heard of and they are all posting and wondering why they see their name in a thread title! So much fun! (I did have to modify the code to make it only work in a couple of threads after some users realized how to use it in a negative way though. ) Thanks.

All times are GMT. The time now is 08:24.

Powered by vBulletin® Version 3.8.12
Copyright © 2019, MH Sub I, LLC dba vBulletin. All Rights Reserved. vBulletin® is a registered trademark of MH Sub I, LLC
Copyright ©2001 - , vbulletin.org. All rights reserved.