vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Profile Field Help ( urgent ) (https://vborg.vbsupport.ru/showthread.php?t=242730)

TimberFloorAu 05-17-2010 09:04 PM

Profile Field Help ( urgent )
 
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:
HTML Code:

<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.


All times are GMT. The time now is 11:23 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01069 seconds
  • Memory Usage 1,713KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_html_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete