Html or MyCode in Custom Profile Fields
leefish Offline
Hamster
*****
Posts: 1,009
Joined: Apr 2010
Post: #8
RE: Html or MyCode in Custom Profile Fields
Hmm, I am not sure what you mean exactly RateU, so I will give a bit more info:

I have a Custom Profile Field, fid6. It is a textarea field. As far as I know, without this plugin, then it is not possible to use BBCode in Profile fields.

I have a template conditional in my postbit:

Code:
1
2
3
4
5
6
7
8
9
<if ($post['fid6'] !="") then>

<div class="buttons" title="user policy">
<a href="javascript:;" onclick="Element.toggle('policy'); 
($('policy').visible() == false) ? $('policy2').update('Show Uploader Sharing Policy') : $('policy2').update('Hide Uploader Sharing Policy');" 
id="policy2">Show Uploader Sharing Policy</a>
</div>
<div id="policy" style="display: none;"><func nl2br>{$post['fid6']}</func></div>
</if>


The text from the profile field does display only if there is a value, and it was all on one line, no new lines. So I added the <func nl2br> in the postbit conditional. However, if there is a mycode in the text then it does not display formatted. Eg

Code:
[b]My Policy[/b] Bla bla bla



[Image: leelink.gif]
MYBB1.6 & XThreads
(This post was last modified: 03-25-2012 08:38 PM by leefish.)
03-25-2012 08:37 PM
Visit this user's website Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
RE: Html or MyCode in Custom Profile Fields - leefish - 03-25-2012 08:37 PM

 Standard Tools
Forum Jump: