MyBB Community Forums

Full Version: HTML (and/or BBCode) in custom profile fields
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
My board is: http://wolvenlore.com/odemarken/

Problem area (look at 'bilder'): http://wolvenlore.com/odemarken/member.p...file&uid=4

What you will see is this:
<a href="http://i44.tinypic.com/vzigyx.png">x</a>

When it should look like this:
x

I know that it is possible to have HTML and/or BBCode in your custom profile fields. I was told that this page has the correct instructions on how to do this. I have followed the instructions and now have this in my FTP file:
http://i43.tinypic.com/whid0l.png

The 'bilder' field ID is 27, which means that the field should be displaying as a link rather than a bunch of HTML. However, it is not. Am I doing something wrong? Can anyone help me?
That kind of relates to what I am talking about, but not really. I am specifically asking about what I was doing with this documentation. As it is posted on the MyBB website, I assume that it is something that works that I am simply doing incorrectly. I would rather try to figure out what I started doing rather than zig zag around the issue with a plugin that may or may not work.
Hello friend. How did you do finally?
@cafeina, this plugin does it (+ provides other useful profile field options): http://mybbhacks.zingaburga.com/showthread.php?tid=1271
Thanks Destroy666 as always, but I didn't explain well. What I wanted it was to show HTML in description of custom fields, specific, a URL, so I typed in description box the next:

<a href="http://www.example.com" target="_blank">Política de Protección de Datos</a>

It worked in new registers, but it didn't show properly in control panel because off htmlspecialchars_uni.
So adding a few lines in usercp.php in this while: while($profilefield = $db->fetch_array($query))

worked for me:

if (strcmp($profilefield['name'], "Aviso Legal")==0) {
$url_legal="http://www.example.com/foro/misc.php?page=lopd";
$profilefield['description'] = "<a href=$url_legal target=_blank>Pol&iacute;tica de protecci&oacute;n de datos</a>";
}

(its a checkbox required for users accepting legal disclaimer)