View Full Version : Field is not disappearing!!
dbirosel
04-12-2007, 09:34 PM
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/forum/showpost.php?p=13425&postcount=45
This is how it suppose to look like:
http://www.caraudiojunkyard.com/forum/showpost.php?p=12695&postcount=1
This is the current 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
What did i do wrong?
Try this:
<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:
<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:
<!-- 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 -->
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.