XF 1.2 how can I update old bbcode user tag from vb to xf @tagging

dvsDave

Well-known member
Just migrated from vb4, and we used the [user] bbcode extensively. How can I update all of those tags to the xF @tagging method. The post find/replace tool from @Kier appears to be for xf1.0 only. Is there a resource that I'm just missing or a better method?
 
When you @tag someone, XenForo converts it into [USER] bb code automatically... so chances are you do not need to do anything.

What is the full syntax of your USER bb code in vBulletin?

Here it's:

@dvsDave = [USER=1107]dvsDave[/USER]
 
Unfortunately, then, this will probably require some custom development.

Changing that old code to @dvsDave won't actually do anything because it's not until a post is saved that the @dvsDave is converted to [USER=1107]dvsDave[/USER].

The custom development would, I envisage, a rebuilder that looks at the content of every post on your forum, finds a [USER]username[/USER] BB Code in the message content, performs a regular expression to get the username, performs a database query to fetch the User ID from the username (usernames are always unique) and if a matching user ID is found then it could convert it to the new style BB code in the format of [USER=user_id]username[/USER].

Failing that, you might just want to use the Post Content Replacement tool (it does work on 1.2) to remove the [user][/user] bits, just leaving the username.

You could, I guess, convert it to @Username but, again, it isn't converted to a clickable link until the post is saved.
 
Top Bottom