Community Documentation

v3 Knowledgebase

How to add new genders?

Notice: This feature requires phpFox v2.0.5dev2 or higher installed.

We have had several requests from the community to add the ability to add other genders. This can be done from your AdminCP by going to:

Settings >> System Settings >> Manage Settings >> Core

Look for the setting:


Notice where we have:

Add a New Value

This is where you will be adding a new value for your new gender. Adding a gender requires adding a value that is split up with a pipe "|" (without quotes). It requires 3 values with the 4th being optional. As an example lets look at the value we use for the Female gender:


Notice how we split up each value with the pipe "|". The first value:


is the unique numerical value of this gender. We provide 2 default genders (Male & Female) and these use ID numbers 1 & 2. When adding new genders its best to go up so the next ID would be 3. Next, we have:


This is the language phrase that identifies the gender, which in this case would output:


We will go over how to add a language phrase and attain the variable to use with our genders later in this article. The 3rd value we have:


This is the language phrase that identifies the gender itself, which in this case would output:


The 4th value is optional and controls the "noimage" image, which is the image we use to display if a user hasn't uploaded a photo. In this example we have:


On your server where you have phpFox installed if you check the folder:


You will notice the image:


Notice where we have:


This is how you can create a custom image for your new gender. When adding a new image be sure to add all the thumbnails. Just look at all the images that start with "female_" as an example and your new gender should have the same amount of images.

Once you have added your values in the input:

Add a New Value

and click the "Add" button be sure to scroll to the bottom of the page and click on the "Submit" button to save your changes.

Now lets go over how we actually get the phrase:




In phpFox we consider these to be variables. They hold the real value depending on the language package being used. So to add a phrase log into your AdminCP and go to:

Extensions >> Language >> Add Phrase

For the field:




Next, for the field:


Just leave that blank.
For the field:


Add how you will identify this gender, which using our example we use:


After you submit the form it will add the phrase and then give you examples on how to use the phrase. We will be using the "Text" method.