07-23-2010, 03:26 PM
11-08-2014, 06:47 PM
Ok i haven't played around in awhile on a mybb board so i have got back into it and redone everything mentioned in this thread but now im stuck on the color change for username on gender ?
Example: So username would be blue for men and pink for female username?
I just don't want to have create another user group hopefully the Username color is possible for these 2 genders.
Example: So username would be blue for men and pink for female username?
I just don't want to have create another user group hopefully the Username color is possible for these 2 genders.
11-09-2014, 07:57 AM
Have you done what was mentioned in this message :
http://www.mybbcodes.com/showthread.php?...2#pid12902
http://www.mybbcodes.com/showthread.php?...2#pid12902
11-09-2014, 08:24 AM
(11-09-2014 07:57 AM)exdiogene Wrote: [ -> ]Have you done what was mentioned in this message :
http://www.mybbcodes.com/showthread.php?...2#pid12902
Yes 1 profile field is already there by default in ACP and I enabled so its required upon registration to choose man or women ONLY and code placed so fid3 replaced the text in postbit to the left from (Gender: male) to (Gender: icon.gif) ONLY in postbit, im just stuck at where i would need to edit so that the 2 colors would be displayed for man blue and women pink USERNAME automatically.
Thanks.
11-09-2014, 08:45 AM
(07-21-2010 08:54 PM)exdiogene Wrote: [ -> ]For the background you would simply put the username section inside a span tag with a male or female class.
Something like : < span class="{$post['fid3']}" >< strong >< span class="largetext">{$post['profilelink']}< /span >< /strong >< /span >
You now have to create the classes in the CSS file by adding this in AdminCP -> Templates & Style -> Themes -> YourTheme -> global.css
.male {
background: #e0e0ff;
padding: 2px;
}
.female{
background: #ffe0e0;
padding: 2px;
}
I have temporarely installed these changes to MyBBCodes.com, have a look at a few members posts...
This is where it goes over my head sorry, the global css i understand but the part im stuck
Code:[Highlight]
< span class="{$post['fid3']}" >[/b]< strong >< span class="largetext">{$post['profilelink']}< /span >< /strong >[b]< /span >
a. where does this code go above
b. will the code automatically change the color of USERNAME according to gender?
11-09-2014, 09:56 AM
It goes inside the template where you want the username background colour to change. Mainly in the postbit template where you will find :
You just need to surround it with the gender colouring span section :
Code:[Highlight]
<span class="largetext">{$post['profilelink']}</span>
You just need to surround it with the gender colouring span section :
Code:[Highlight]
<span class="{$post['fid3']}"> ... </span>
11-09-2014, 09:39 PM
(11-09-2014 09:56 AM)exdiogene Wrote: [ -> ]It goes inside the template where you want the username background colour to change. Mainly in the postbit template where you will find :
Code:[Highlight]
<span class="largetext">{$post['profilelink']}</span>
You just need to surround it with the gender colouring span section :
Code:[Highlight]
<span class="{$post['fid3']}"> ... </span>
<span class="{$post['fid3']}"> ... </span>
So if i want Usernames for men gender and username for women gender to be their own color how to go about this?
11-09-2014, 09:52 PM
11-10-2014, 09:45 AM
Simply replace this :
With this :
Inside your "postbit" template.
If you made the proper insertion in the style sheet, the background behind the username will be pink for "female" and blue for "male". But be sure that your profile field for the gender is really fid3!
Code:[Highlight]
<span class="largetext">{$post['profilelink']}</span>
Code:[Highlight]
<span class="{$post['fid3']}"><span class="largetext">{$post['profilelink']}</span></span>
Inside your "postbit" template.
If you made the proper insertion in the style sheet, the background behind the username will be pink for "female" and blue for "male". But be sure that your profile field for the gender is really fid3!
11-10-2014, 08:36 PM
(11-10-2014 09:45 AM)exdiogene Wrote: [ -> ]Code:[Highlight]
<span class="largetext">{$post['profilelink']}</span>
Code:[Highlight]
<span class="{$post['fid3']}"><span class="largetext">{$post['profilelink']}</span></span>
@exdiogene thanks for help up to now, almost
Code:[Highlight]
<div class="author_information">
<strong><span class="{$post['fid3']}"><span class="largetext">{$post['profilelink']}</span></span></strong> {$post['onlinestatus']}<br />
<span class="smalltext">
{$post['usertitle']}<br />
{$post['userstars']}
{$post['groupimage']}
I copied this exact code above and replaced it with the original (default theme postbit) but still no color change ?