vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Field is not disappearing!! (https://vborg.vbsupport.ru/showthread.php?t=144690)

dbirosel 04-12-2007 09:34 PM

Field is not disappearing!!
 
Created a couple fields to show up on the postbit legacy. For those who didn't include any information, there is a box with nothing in it. Here is an example:

http://www.caraudiojunkyard.com/foru...5&postcount=45


This is how it suppose to look like:


http://www.caraudiojunkyard.com/foru...95&postcount=1


This is the current code:

Code:

        <div class="rm_userinfo" align="center">
                                <if condition="$post['field19']"><strong>Real Name:</strong> $post[field19]</if><br />
                <if condition="$post['field2']"><strong>$vbphrase[location_perm]:</strong> $post[field2]</if><br />
                <if condition="$post['age']"><strong>$vbphrase[age]:</strong> $post[age]</if>
        </div>


What did i do wrong?

deezelpope 04-12-2007 09:39 PM

Shouldn't the <if> conditionals be on the outside of the <div>?

I'm still new at this, too...but that would be my guess...

magnus 04-12-2007 10:00 PM

Quote:

Originally Posted by dbirosel (Post 1226222)
What did i do wrong?


Try this:
HTML Code:

        <div class="rm_userinfo" align="center">
                                <if condition="$post['field19'] != ''"><strong>Real Name:</strong> $post[field19]</if><br />
                <if condition="$post['field2'] != ''"><strong>$vbphrase[location_perm]:</strong> $post[field2]</if><br />
                <if condition="$post['age'] != ''"><strong>$vbphrase[age]:</strong> $post[age]</if>
        </div>


dbirosel 04-12-2007 10:05 PM

Nope, still does not work.

magnus 04-12-2007 10:10 PM

After checking the page, I think the problem is with the Mood Manger, not the code pasted. If the code in question was being displayed, you see "Real Name:".. since you don't, it shouldn't be that. Check the Mood Manager.

dbirosel 04-12-2007 10:13 PM

In the mood manager what should i be looking at?

magnus 04-12-2007 10:15 PM

Wait a second. It's not the Mood Manager. Duh, use this:

HTML Code:

<if condition="!$post['field19'] && !$post['field2'] && !$post['age']">
<div class="rm_userinfo" align="center">
        <if condition="$post['field19']"><strong>Real Name:</strong> $post[field19]<br /></if>
        <if condition="$post['field2']"><strong>$vbphrase[location_perm]:</strong> $post[field2]<br /></if>
        <if condition="$post['age']"><strong>$vbphrase[age]:</strong> $post[age]</if>
</div>
</if>

The catch, though, is all 3 fields need to be populated in order for it to display. If either field is left blank, then none will be displayed. You can modify the <if> container to check against whichever field you wish rather than all 3, it's up to you.

dbirosel 04-12-2007 11:32 PM

Nice!! There we go! Thanks alot...

Hmmm.. tested it and didnt work. This time, it does not show anything.

magnus 04-12-2007 11:46 PM

I told you why in the post above yours...

dbirosel 04-13-2007 12:04 AM

Oh i understand now thanks. While we are at it, how do i make this not visible when not entered:

Code:

        <!-- post specs_menu -->
        <div id="specs_$post[postid]" class="rm_userinfo" align="center">
                <a href="#specs">My Car Audio System</a>
                <script type="text/javascript"> vbmenu_register("specs_$post[postid]"); </script>
        </div>
<!-- / post specs_menu -->



All times are GMT. The time now is 05:02 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.01178 seconds
  • Memory Usage 1,737KB
  • 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
  • (2)bbcode_html_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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