Go Back   vBulletin Setup > vBulletinSetup Information > vBulletin Questions


Please Register to get full access to the forums.
Post New Thread  Reply



#1   11-15-2007, 07:44 AM
Send a message via MSN to Norman Norman will become famous soon enough Join Date: Feb 2007 Posts: 49 Location: [Italy]
Table color by profile field..


Hi, I've setted a new profile field which ask for your gender. Now I would like to change a table color (in my postbit_legacy) depending by this choice.

I've tried to use this code:

Code:
<if condition="$userinfo['field20'] == '2'">class="tgender_female"<else /> class="thead"</if>
And in my additional CSS I've added this:

Code:
.tgender_female {
   background: #FFFFFF url(style/gradients/gradient_tgender_female.gif) repeat-x top left;
   bgcolor: red;
   font-color: #FFFFFF;
   font-style: bold;
   font-size: 10pt,
   font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif;
}
In my profile field I've put a Single-Selection Menu with:

Male
Female

Set Default: None.

It doesn't work. Is there something wrong? Can you help me?
Quote   |  



#2   11-15-2007, 08:59 AM
Michael Biddle is just really niceMichael Biddle is just really nice Join Date: Aug 2006 Posts: 1,644 Location: Anaheim, CA
Re: Table color by profile field..


well you just cant have the class like that. Either needs to be something like:

HTML Code:
<td class="<if condition="$userinfo['field20'] == '2'">tgender_female<else />thead</if>">
and maybe the '2' does not work, it might want Male or Female also.
--------------------
Do NOT PM me for Support!
Michael Biddle / vBulletin Setup Staff
Check out our Newsletter for the latest vB and SEO news.
Are you looking for vBulletin work to be done on your forums ?
Would you like to Help Support vBulletin Setup.
Be sure to check out our latest Contest for a Custom Style.
Quote   |  



#3   11-15-2007, 09:52 AM
Send a message via MSN to Norman Norman will become famous soon enough Join Date: Feb 2007 Posts: 49 Location: [Italy]
Re: Table color by profile field..


Now I try!
Quote   |  



#4   11-15-2007, 09:59 AM
Send a message via MSN to Norman Norman will become famous soon enough Join Date: Feb 2007 Posts: 49 Location: [Italy]
Re: Table color by profile field..


Arg, it seems to doesn't work.
Quote   |  



#5   11-15-2007, 10:10 AM
Michael Biddle is just really niceMichael Biddle is just really nice Join Date: Aug 2006 Posts: 1,644 Location: Anaheim, CA
Re: Table color by profile field..


Yea now that i looked at it, it wouldnt because of the double quotes, try this:

HTML Code:
<if condition="$userinfo['field20'] == '2'"> <td class="tgender_female"> <else /> <td class="thead"> </if>
--------------------
Do NOT PM me for Support!
Michael Biddle / vBulletin Setup Staff
Check out our Newsletter for the latest vB and SEO news.
Are you looking for vBulletin work to be done on your forums ?
Would you like to Help Support vBulletin Setup.
Be sure to check out our latest Contest for a Custom Style.
Quote   |  



#6   11-16-2007, 03:40 AM
Send a message via MSN to Norman Norman will become famous soon enough Join Date: Feb 2007 Posts: 49 Location: [Italy]
Re: Table color by profile field..


This was the right code:

Code:
<if condition="$post['field20'] == 'Female'">class="tgender_female"<else /> class="thead"</if>
Quote   |  



#7   11-16-2007, 08:53 AM
Michael Biddle is just really niceMichael Biddle is just really nice Join Date: Aug 2006 Posts: 1,644 Location: Anaheim, CA
Re: Table color by profile field..


I would remove the space before the class="thread"
--------------------
Do NOT PM me for Support!
Michael Biddle / vBulletin Setup Staff
Check out our Newsletter for the latest vB and SEO news.
Are you looking for vBulletin work to be done on your forums ?
Would you like to Help Support vBulletin Setup.
Be sure to check out our latest Contest for a Custom Style.
Quote   |  
Post New Thread  Reply
vBulletin Setup > vBulletinSetup Information > vBulletin Questions


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
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do people color their profile? paddap vBulletin Questions 7 03-07-2008 08:59 PM
Regex on custom user field callumj vBulletin Questions 0 11-21-2007 06:08 AM
Help needed - I need to add a new field to the forum table anuvenkatesh vBulletin Questions 0 11-15-2007 09:03 PM
Wikipedia leaves 100 Million dollars on the table Brent General Discussion 13 10-18-2007 03:02 AM
V3 Arcade Problem, importing user table to DB radarhunter vBulletin Questions 15 09-18-2006 07:31 PM


All times are GMT -6. The time now is 12:27 AM.

vBulletin Setup, vBulletin Setup Forums, vBulletin Services, vBulletin Blogs, vBulletin SEO, vBulletin Questions
vBulletin Skins, Styles, Templates, vBulletin Monetization, Blogs, vBulletin Link Directory,Quality Link Directory