PDA

View Full Version : Profile Field Help ( urgent )


TimberFloorAu
05-17-2010, 09:04 PM
We have profile fields, that display in postbit. We have conditional, so that only premium member usergroup can see them.

BUT

I want the profile fields NOT TO show if the user hasnt edited them.

Also can maths be done with profile fields ?

say field 5 = 56
and field 6 = 34

can we display on profile result = field5-field6 so it displays Result = 22

Lynne
05-17-2010, 09:43 PM
How do you tell if it's been edited or not? Is the default blank? If so, then just do a condition of If Not Blank then....

The fields are strings. You cannot add strings. So, you'll have to convert the string to binary first (do a google search).

TimberFloorAu
05-17-2010, 09:49 PM
The conditional I have this far is:

<vb:if condition="is_member_of($bbuserinfo, 34)"><dt>Diet Start Date: </dt> <dd>{vb:raw post.field39}</dd></vb:if>

Where 34 is usergroup.

Presume i would wrap the entire set of profile fields with:

<vb:if condition="is_member_of($bbuserinfo, 34)">
Individual vb conditionals here.

</vb:if>

Not sure what you mean by:

If Not Blank then.

I understand the principle, just not the code.

Yes fields are blank to begin with

Lynne
05-17-2010, 09:52 PM
I mean, if it's blank, then it hasn't been edited, right? So:
<vb:if condition="is_member_of($bbuserinfo, 34) AND $post['field39'] != ''"><dt>Diet Start Date: </dt> <dd>{vb:raw post.field39}</dd></vb:if>

TimberFloorAu
05-17-2010, 10:06 PM
Thanks Lynne will give that bash.