Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
  #1  
Old 04-12-2007, 09:34 PM
dbirosel dbirosel is offline
 
Join Date: Feb 2007
Location: San Diego
Posts: 587
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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?
Reply With Quote
  #2  
Old 04-12-2007, 09:39 PM
deezelpope deezelpope is offline
 
Join Date: Feb 2007
Posts: 1,272
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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...
Reply With Quote
  #3  
Old 04-12-2007, 10:00 PM
magnus's Avatar
magnus magnus is offline
 
Join Date: Apr 2002
Location: Miami, FL
Posts: 1,107
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by dbirosel View Post
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>
Reply With Quote
  #4  
Old 04-12-2007, 10:05 PM
dbirosel dbirosel is offline
 
Join Date: Feb 2007
Location: San Diego
Posts: 587
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nope, still does not work.
Reply With Quote
  #5  
Old 04-12-2007, 10:10 PM
magnus's Avatar
magnus magnus is offline
 
Join Date: Apr 2002
Location: Miami, FL
Posts: 1,107
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #6  
Old 04-12-2007, 10:13 PM
dbirosel dbirosel is offline
 
Join Date: Feb 2007
Location: San Diego
Posts: 587
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

In the mood manager what should i be looking at?
Reply With Quote
  #7  
Old 04-12-2007, 10:15 PM
magnus's Avatar
magnus magnus is offline
 
Join Date: Apr 2002
Location: Miami, FL
Posts: 1,107
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #8  
Old 04-12-2007, 11:32 PM
dbirosel dbirosel is offline
 
Join Date: Feb 2007
Location: San Diego
Posts: 587
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

Hmmm.. tested it and didnt work. This time, it does not show anything.
Reply With Quote
  #9  
Old 04-12-2007, 11:46 PM
magnus's Avatar
magnus magnus is offline
 
Join Date: Apr 2002
Location: Miami, FL
Posts: 1,107
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I told you why in the post above yours...
Reply With Quote
  #10  
Old 04-13-2007, 12:04 AM
dbirosel dbirosel is offline
 
Join Date: Feb 2007
Location: San Diego
Posts: 587
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 -->
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:18 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.04808 seconds
  • Memory Usage 2,251KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (2)bbcode_html
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete