The Arcive of vBulletin Modifications Site. | 
    |
| 
		 
			 
			#1  
			
			
			
			
			
		 
		
	 | 
||||
		
		
  | 
||||
| 
		
	
		
		
			
			 
			
			Playing around with custom profile fields, installing the ability for users to choose their gender. It works, but I think I want a postbit template conditional for making it display blue if they chose Male, and pink if they chose female. 
		
		
		
		
		
		
		
		
	
	Right now it displays like this: ![]() Here's the bit from the postbit template, where we're calling this up: Code: 
	<vb:if condition="$post['field12']"><dt>Gender</dt> <dd>{vb:raw post.field12}</dd></vb:if>
 | 
| 
		 
			 
			#2  
			
			
			
			
			
		 
		
	 | 
|||
		
		
  | 
|||
| 
		
	
		
		
			
			 
			
			I guess you want something like: 
		
		
		
		
		
		
		
		
	
	Code: 
	<vb:if condition="$post['field12']"><dt>Gender</dt> <dd style="color:<vb:if condition="$post['field12'] == 'Male'">blue<vb:else />pink</vb:if>" >{vb:raw post.field12}</dd></vb:if>
 | 
| Благодарность от: | ||
| Max Taxable | ||
| 
		 
			 
			#3  
			
			
			
			
			
		 
		
	 | 
||||
		
		
  | 
||||
| 
		
	
		
		
			
			 
			
			That sure looks like it might work... I will have it tried and let you know. 
		
		
		
		
		
		
		
		
	
	Thanks Kevin!  | 
| 
		 
			 
			#4  
			
			
			
			
			
		 
		
	 | 
||||
		
		
  | 
||||
| 
		
	
		
		
			
			 
			
			"Invalid tag nesting" error.
		 
		
		
		
		
		
		
		
		
	
	 | 
| 
		 
			 
			#5  
			
			
			
			
			
		 
		
	 | 
|||
		
		
  | 
|||
| 
		
	
		
		
			
			 
			
			Yeah, there were a couple of problems with that. I shouldn't even try to post things without testing them first, I don't have a very good record.  Anyway, I tried it and posted the fixed code above.
		 
		
		
		
		
		
		
		
		
	
	 | 
| 2 благодарности(ей) от: | ||
| CAG CheechDogg, Lynne | ||
| 
		 
			 
			#6  
			
			
			
			
			
		 
		
	 | 
||||
		
		
  | 
||||
| 
		
	
		
		
			
			 
			
			U Da Man, thank you again!
		 
		
		
		
		
		
		
		
		
	
	 | 
| 
		 
			 
			#7  
			
			
			
			
			
		 
		
	 | 
||||
		
		
  | 
||||
| 
		
	
		
		
			
			 
			
			We made the color "HotPink" to get it to stand out more. Nicely done Kevin and again, thank you for the help.
		 
		
		
		
		
		
		
		
		
	
	 | 
| 
		 
			 
			#8  
			
			
			
			
			
		 
		
	 | 
|||
		
		
  | 
|||
| 
		
	
		
		
			
			 
			
			Probably the "right" way to do it would be to change it to set a class based on the gender, then put CSS in additional.css to set the colors (and/or font, size, etc). Also that way you could have different colors per style if you wanted. But if it's doing what you want the way it is, I'd say that's fine.
		 
		
		
		
		
		
		
		
		
	
	 | 
| 
		 
			 
			#9  
			
			
			
			
			
		 
		
	 | 
||||
		
		
  | 
||||
| 
		
	
		
		
			
			 Quote: 
	
 This works for what they want, job well done.  | 
![]()  | 
	
	
		
  | 
	
		
  | 
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
						
  | 
				|
  More Information | 
				|
| 
						 Template Usage: 
						
 Phrase Groups Available: 
						
  | 
					
						 Included Files: 
						
 Hooks Called: 
						
  |