vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Blank User Profile Field Causing Problems in Postbit Legacy (https://vborg.vbsupport.ru/showthread.php?t=230254)

Thamelas 12-15-2009 03:07 PM

Blank User Profile Field Causing Problems in Postbit Legacy
 
Ok here is my problem. I have user profile fields where users enter info. The problem is that if they don't enter info in later fields, it seems to re-post the same info in following fields that the user left blank.

Can anyone tell me how to stop this from happening?

Below are screenshots and the code I am using:

Code:

<div class="smallfont"><if condition="$post['field5']">
    Guild: <if condition="$post['field6']"><a href="$post[field6]" target="_blank">$post[field5]</a><else />$post[field5]</if></div>
</if>

<div class="smallfont"><if condition="$post['field16']">

    Profile: <if condition="$post['field13']"><a href="$post[field13]" target="_blank">$post[field16]</a><else />$post[field5]</if></div>


</if>

<div class="smallfont"><if condition="$post['field14']">
    Talent Spec: <if condition="$post['field15']"><a href="$post[field15]" target="_blank">$post[field14]</a><else />$post[field5]</if></div>



Correct Display:
https://vborg.vbsupport.ru/external/2009/12/131.jpg


Incorrect Display:
https://vborg.vbsupport.ru/external/2009/12/132.jpg

kh99 12-15-2009 03:24 PM

I think that might be happening because you have

Code:

<else />$post[field5]

in there for each field. Maybe if you just take those out they will be blank?

Thamelas 12-15-2009 03:51 PM

Thanks that fixed that problem.

Now another question. How can i have "Guild" "Profile" and "Talent Spec" not appear if users don't put any information in?

In addition to that, why is it that the fields displaying are not consistent? Note only the "Profile" displaying in the Magache area, and all three sections appearing in the Spitt area.

Example:

https://vborg.vbsupport.ru/external/2009/12/124.jpg

kh99 12-15-2009 04:14 PM

I think you can just move that text inside the "if" conditions like for instance:

HTML Code:

<if condition="$post['field15']">Talent Spec: <a href......


All times are GMT. The time now is 05:56 AM.

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.02687 seconds
  • Memory Usage 1,717KB
  • 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
  • (2)bbcode_code_printable
  • (1)bbcode_html_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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