News:

Join the Facebook Fan Page.

Main Menu

More Genders

Started by 青山 素子, September 21, 2009, 12:35:43 AM

Previous topic - Next topic

青山 素子

Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


mattio41

Greetings, any chance anybody know how To install this into SMF 2.0.

All assistance is always appreciated.

C4G-TK

@ 青山 素子

I have this working on my 2.0.2 forum.  I emulated your RC2 package and only had one error.  It was the 2nd edit in Load.php

The code to look for in your package is:

'image' => !empty($profile['gender']) ? '<img src="' . $settings['images_url'] . '/' . ($profile['gender'] == 1 ? 'Male' : 'Female') . '.gif" alt="' . $gendertxt . '" border="0" />' : ''


But, the code should really be:

'image' => !empty($profile['gender']) ? '<img class="gender" src="' . $settings['images_url'] . '/' . ($profile['gender'] == 1 ? 'Male' : 'Female') . '.gif" alt="' . $gendertxt . '" />' : ''



This means the new replace code should be:

'image' => !empty($profile['gender']) ? '<img class="gender" src="' . $settings['images_url'] . '/' . $genderimg . '" alt="' . $gendertxt . '" />' : ''


As far as I can tell, I'm not getting any errors from doing it this way.  Hopefully, this saves you some time in updating the package.  I checked by going back into my profile and changing my gender multiple times while making sure the image in my posts changed.  LOL

-img removed-

C4G-TK

#43
@ 青山 素子

I run a darker themed forum.  Because of that, I cleaned up the edges of your gif images, so that the white didn't show.  I hope you don't mind.  Here you go.



Also, after making this post, I decided to change out all my gender images.  Instead of the symbols, I chose to use color as a way of distinguishing.  I'm aware that some of my choices may seem a bit antiquated.  I used blue for male and pink for female.  Then, I decided to layer my male and female images as 50% to make a purple-like intersexed image.  Finally, I used green for the transgender.  Anyone is more than welcome to use these as I added them to the post, too.


-img removed-

webewitch

QuoteQuote from: paulosf on January 27, 2010, 10:17:14 AM
Couple is a pair of person.
For example a husband and his wife are an heterosexual couple while two females are a lesbian couple.

This modification is only for individual persons, not groups. There are no group statuses included.

I realise there has been a long time since anyone posted on this thread.

On my forum quite a few are couples that share their member name.
I was wondering if in the interim that option had been included.

青山 素子

No, it's not included. When the modification was created, it was just a simple extension of the system, which is geared toward an individual person. You can always adjust the modification to fit your needs, if you wish.
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


Jade Elizabeth

Thanks for this Motoko! :D
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Jeremy M.

Need this updated for 2.0.11.

Kindred

#48
Installs fine on 2.0.11 -- with only one edit  (if you emulate SMF 2.0 RC2 in the package manager)

Code (find in Load.php) Select

'image' => !empty($profile['gender']) ? '<img src="' . $settings['images_url'] . '/' . ($profile['gender'] == 1 ? 'Male' : 'Female') . '.gif" alt="' . $gendertxt . '" border="0" />' : ''


Code (which actually reads) Select

'image' => !empty($profile['gender']) ? '<img class="gender" src="' . $settings['images_url'] . '/' . ($profile['gender'] == 1 ? 'Male' : 'Female') . '.gif" alt="' . $gendertxt . '" />' : ''


Code (replace with) Select

'image' => !empty($profile['gender']) ? '<img src="' . $settings['images_url'] . '/' . $genderimg . '" alt="' . $gendertxt . '" />' : ''



and, you may have to manually copy the images into your other themes/images directory

the mod should be pretty easily modified to add additional options as well....

ManageMembers.template.php (more <label statements)
Load.php (more case statements)
Profile-Modify.php (more statements in the array)

actually, if I were to re-write this mod, the ManageMembers would use a more generic term for the each one, thus allowing the addition of new options without modifying that code...   However, the list is constructed or used in three places in the code -- therefore edits need to be made in those three places, and the edits are pretty simple.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

WolfJ

I get that this topic is long dead but I wanted to see if anyone had a quick fix for this issue. I modified the code cause I only wanted to add one extra gender when you select this gender it shows in post view but not on the profile itself. It acts like when you don't have any gender set. Is there a way to fix this?

Chewing on Cyanide


Kindred

This was built for 2.0 rc2
That suggests that many of the template edits will fail

Additionally,  it's not needed. Just use a custom profile field instead.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Advertisement: