I need to allow HTML to parse in a custom profile field in order to display a custom user image in the postbit for individual members. (It would be hidden and only editable by admin)
Any one know how to accomplish this? Or is there a better way to add custom user images in postbit?
You said postbit in OP and now you are showing profile.. Also I can't see any "CUSTOM USER IMAGE" there.
My bad, you are talking about postbit , not CP
EDITED--------------------
In my forum, I have to show a link in the custom fields, like so:
The configuration in control panel is as follows:
Nombre: Aviso Legal
Descripción corta: <a href="http://www.URL.com/foro/misc.php?page=lopd" target="_blank">Política de Protección de Datos</a>
Tipo: caja de validación
Opciones seleccionables: Acepto
Requerido: si
Editable: si
Oculto:si
the problem is that if you don't do anything, what it will show the description is not the URL but <a href="http://www.URL.com/foro/misc.php?page=lopd" target="_blank">Política de Protección de Datos</a>
To "fix that", I modified usercp.php with this (line 443)
if (strcmp($profilefield['name'], "Aviso Legal")==0) {
$url_legal="http://www.URL.com/foro/misc.php?page=lopd";
$profilefield['description'] = "<a href=$url_legal target=_blank>Política de protección de datos</a>";
}
I think you can adapt it for showing image.
regards
(2014-03-19, 10:39 PM)Destroy666 Wrote: [ -> ]You said postbit in OP and now you are showing profile.. Also I can't see any "CUSTOM USER IMAGE" there.
Sorry, I have the custom field set to be hidden so guests cant see it...(See Screen Cap below)
I did get the image to show in the profile page but when I ad {$post['fid13']} into the post bit, it shows the raw URL! I basically half fixed it, LOL!
How can I get the image to show in the postbit now?
I told you the correct variable above.....
(2014-03-20, 01:18 AM)Destroy666 Wrote: [ -> ]I told you the correct variable above.....
Sorry, I thought I mentioned this...
I couldn't get that plugin to work so I switched to
Mybbcode in Custom Fields plugin. That is the only way I could get the image to even display in the profile page. I just need to get it into the postbit now.
what you could do is use php in templates -
<if !empty($post['fidX']) then>
<?php
echo $parser->parse_message(htmlspecialchars_decode($post['fid4']),array('allow_imgcode'=>1));
?></if>
Code not tested.