MyBB Community Forums

Full Version: user title error
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
[Image: BR09mG.png]
It's not an error, you can't use HTML in usertitles. Well, you can, but it's escaped.
what do I need to use, give me an example please
As I said above, you can't use HTML, it will be output as escaped plain text.

You need to use a plugin like this: http://mybbsource.com/mods.php?act=view&id=63 to enable HTML (not recommended).
I was working in version 1.6.16 but not working 1.8.3
^ that facility removed from MyBB 1.8.x to prevent some vulnerability
Follow the easy instructions below.

1. First of all, get this plugin (Allows you to have PHP in templates, which will help you out to get this custom usertitle).

Link: http://mybbhacks.zingaburga.com/showthread.php?tid=260

2. Install & activate it.

3. Go to "ACP > Templates & Style > choose the template you are currently using > Post Bit Templates > postbit (or postbit_classic [ONLY IF YOU ARE USING CLASSIC MODE!])

4. Find
{$post['usertitle']}

replace that with
<if $post['uid'] == UIDHERE then><i style="color: #F64EC1;font-style: normal;font-size: 13px;"><i>Custom usertitle</i><else>{$post['usertitle']}</if>

After it's done, it should look like this (In threads, posts, postbit..)
[Image: qxmxPhu.png]

Where it says "UIDHERE" replace that with your UID, and where it says "Custom usertitle" change that to whatever usertitle you want.

Feel free to change the color as well.
^ template conditionals plugin is preferred than php in templates to avoid any mischief activities by other admins