MyBB Community Forums

Full Version: Gender in Post Bit
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Right, i have been looking for the answer to this question. I have also checked the mods area but found nothing.

I would like to know how you show a users gender in their profile bit in their posts, in the bit at the side (< to the left of this post) by an image. I have the images i just cannot seem to work it out.

Thanks
Do you mean something like this:

[Image: male.jpg]

??
yes. Though obviously the image would be different.
Add images with the exact same names as your available options (i.e. male, female, etc) then use the postid code that adds custom profile id's and include it in some html image tags (<img src.......>).
I'm sorry but i don't fully understand. What is the "postid code that adds custom profile id's and include it in some html image tags"


I understand php and html, as well as mysql but im not sure what your getting onto.
Upload gid.php into your ./inc/plugins/ folder and activate.
After activation; you need to check the Gender In Postbit settings, especially the FID of the Custom Field, if you use the Custom Field 'Sex' for the gender, the setting is already filled in correctly, '3'
Rename your images to male.gif and female.gif ; upload them in your ./images/ folder. When the user has filled in his/her UCP option to Male/Female your image will appear in their postbit; Users who have Other or Undisclosed as their option, won't see anything in their postbit ...

Ex. [Image: gender_in_postbit.jpg]
SupaComix Wrote:I understand php and html, as well as mysql but im not sure what your getting onto.
at0mik was kidding I suppose..what he mentioned wouldn't make sense to anyone. I was going to suggest that you create secondary usergroups: one for the male and one for the female and each should have its own image, and users should then select their secondary usergroups which should match their gender.
However, I believe that what LeX- suggested is far more easier than my method.
LeX- is a great helper indeed.


Regards
Thank you all for the help i have got it working and it has been greatly appreciated.
LOL sorry I was really tired when I was typing that and didn't get much into detail Toungue. Anyway what I meant was first go to "ACP > Custom Profile Fields" and make a new field called Gender, etc also taking note of the ID# after you have made it. Then make some images for the genders with naming as the available options in your Gender field (e.g. if they chose Male, then the male image in your folders would appear).

Then go to "ACP > Templates > Modify/Delete > *Expand* > Postbit Template > postbit". Then:
Quote:Find:
$post[userstars]

Add After:
<img src="images/images/{$post['fidX']}.gif" border="0" alt="{$post['fidX']}" /><br />

X = your ID#
Lex, great mod, but it's shifting the sex to the middle of the postbit..same for the xfire name and IP address, maybe even the top half too..any ideas?

http://www.absoluteeliteclan.com/forums/...hp?tid=303

I'd like to get it all aligned to to the left with the rest of the info.
Pages: 1 2