MyBB Community Forums

Full Version: Profile postbit pink/blue, if user is girl or boy
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi, there is a tutorial or plugin for to have profile postbit pink, if user is a girl, or blue, if user is a boy?

During registration user choose if is girl or boy.

Thank you in advance for help!
1.Admin CP -> configuration -> Custom Profile Fields and addd New Profile Field
Title - Gender
Short Description * - Your gender
Field Type * - select Box
Field Length * - /leave blank
Selectable Options? * - 
male
female
Display Order * - 1
Required? * - Yes

2.Go to Templates and styles -> templates -> <your theme template set> -> postbit templates -> postbit_classic (or postbit)

and paste {$post['fidx']} (replace x, WHERE x is your gender field id,you can see that profile field id under custom profile fields) near {$altbg} table cell class.

3.Go to global.css (templates and styles -> themes -> <your current forum theme> -> edit theme -> global.css and paste

.male {
   background-color:blue;
}

.female {
   background-color:pink;
}
Hi Johnny S, thank you very much, I have a problem, I don't understand where add {$post['fidx']}.

In postbit classic I have:
<td class="trow1_profilo" width="18%" valign="top" style="white-space: nowrap; text-align: center;">
			{$post['userstars']}
			{$post['groupimage']}
			{$post['useravatar']}<br />
<strong class="strongreen">{$post['usertitle']}</strong><br />

I tried with "trow1_profilo{$post['fid3']}" and "trow1_profilo"{$post['fid3']} but doesn't work Sad
After trow1_profilo and you need space between that two classes (trow1_profilo {$post['fid3']}).


It should look like this:
<td class="trow1_profilo {$post['fid3']}" width="18%" valign="top" style="white-space: nowrap; text-align: center;">
             {$post['userstars']}
             {$post['groupimage']}
             {$post['useravatar']}<br />
 <strong class="strongreen">{$post['usertitle']}</strong><br />
Thank you johnnyyyyyy!!! Big Grin I have edited directly in css with .trow1male instead of .male and .trow1female instead of .female Big Grin
It's perfect, Heart