Altering 'Gender' text in profile
4 posters
Page 1 of 1
Altering 'Gender' text in profile
Technical Details
Forum version : #phpBB3
Position : Founder
Concerned browser(s) : Mozilla Firefox
Screenshot of problem : https://i.servimg.com/u/f93/09/03/24/30/gndr-t10.png
Who the problem concerns : All members
Forum link : https://darkfx.darkbb.com
Description of problem
hello.. i'm attempting to alter the profile template on my board as so the Gender options for 'Male' & 'Female' are replaced with 'Predacon' & 'Starseeker'.There is no specific option in the default template so i am attempting to write an override:
- Code:
<!-- BEGIN switch_gender -->
<dl>
<dt><label>{L_GENDER} : {MUST_GENDER}</label></dt>
<dd>
<label><input type="radio" name="profile_field_16_-7" value="1" {GENDER_MALE_CHECKED} /><span class="cont">{L_GENDER_MALE}</span></label>
<label><input type="radio" name="profile_field_16_-7" value="2" {GENDER_FEMALE_CHECKED} /><span class="cont">{L_GENDER_FEMALE}</span></label>
</dd>
</dl>
<!-- END switch_gender -->
What i cannot seem to figure out is how to get the display text to change. i've attempted to insert the desired display text in various areas of the code but i'm not quite sure where i am going wrong. (examples below)
- Code:
<!-- BEGIN switch_gender -->
<dl>
<dt><label>{L_GENDER} : {MUST_GENDER}</label></dt>
<dd>
<label><input type="radio" name="profile_field_16_-7" value="1" text="Predacon" {GENDER_MALE_CHECKED} /><span class="cont">{L_GENDER_MALE}</span></label>
<label><input type="radio" name="profile_field_16_-7" value="2" text="Starseeker" {GENDER_FEMALE_CHECKED} /><span class="cont">{L_GENDER_FEMALE}</span></label>
</dd>
</dl>
<!-- END switch_gender -->
or
- Code:
<!-- BEGIN switch_gender -->
<dl>
<dt><label>{L_GENDER} : {MUST_GENDER}</label></dt>
<dd>
<label><input type="radio" name="profile_field_16_-7" value="1" {GENDER_MALE_CHECKED} /><span class="cont">{Predacon}</span></label>
<label><input type="radio" name="profile_field_16_-7" value="2" {GENDER_FEMALE_CHECKED} /><span class="cont">{Starseeker}</span></label>
</dd>
</dl>
<!-- END switch_gender -->
just looking for a little advice/assistance. thanks
~ nem
Re: Altering 'Gender' text in profile
hello
why not create a new profile field with options and just hide the default male female field
why not create a new profile field with options and just hide the default male female field
Nemesis Prime likes this post
Re: Altering 'Gender' text in profile
skouliki wrote:hello
why not create a new profile field with options and just hide the default male female field
i was trying not to have to introduce a new field, was rather hoping to modify an existing so that old/historical members did not need to redo their entries/profiles. guess i can do that. still bugs me as an admin/founder i cannot edit the text field through the admin panel or the templates.
thanks.
Re: Altering 'Gender' text in profile
Hello there,
I haven't check the code you paste here and I can't see the user profile page without logging in to your forum to see it myself.
I agree that the solution @skouliki suggested is far cleaner and easier in a long run.
But, if only thing you need to do is to change a text display into something else, I can suggest a JS code something like that;
You can place this code in either JavaScript pages or directly into your main code between <script> tags.
In this code, you will need to customize the uppercase parts. For the CONTAINERID, you need to give an ID to something that contains whatever you are about to change so that code can find it there. For instance, in the beginning of your code you have a <dl> that contains everything we want to change, so; <dl id="customgender"> should suffice. Then you can replace #CONTAINERID with #customgender. Or whatever you write as an ID. (if giving id to dl doesn't work, you can always create a new div container to include everything in that specific section)
Then, for the TEXT parts, if you see Male in the profile, you should replace TEXT1 with Male, and TEXT2 with Predacon for instance. Same thing goes with TEXT3 & 4. But you have to be precise, capital letters etc., whatever you are seeing.
I'm using something like this in my forum currently so it should work.
Hope it helps.
I haven't check the code you paste here and I can't see the user profile page without logging in to your forum to see it myself.
I agree that the solution @skouliki suggested is far cleaner and easier in a long run.
But, if only thing you need to do is to change a text display into something else, I can suggest a JS code something like that;
- Code:
jQuery(document).ready(function(){
var gender = $('#CONTAINERID');
gender.html(gender.html().replace('TEXT1', 'TEXT2'));
gender.html(gender.html().replace('TEXT3', 'TEXT4'));
});
You can place this code in either JavaScript pages or directly into your main code between <script> tags.
In this code, you will need to customize the uppercase parts. For the CONTAINERID, you need to give an ID to something that contains whatever you are about to change so that code can find it there. For instance, in the beginning of your code you have a <dl> that contains everything we want to change, so; <dl id="customgender"> should suffice. Then you can replace #CONTAINERID with #customgender. Or whatever you write as an ID. (if giving id to dl doesn't work, you can always create a new div container to include everything in that specific section)
Then, for the TEXT parts, if you see Male in the profile, you should replace TEXT1 with Male, and TEXT2 with Predacon for instance. Same thing goes with TEXT3 & 4. But you have to be precise, capital letters etc., whatever you are seeing.
I'm using something like this in my forum currently so it should work.
Hope it helps.
Nemesis Prime likes this post
Re: Altering 'Gender' text in profile
i've created a new field as @skouliki suggested. while it looks like exactly what i was looking for when viewing a user's profile and post, I was hoping to just override an existing profile field rather than create an additional (override/replace the gender option all together instead of having it there unused & suppressed).
@SirLaplace appreciate the advice and code snippet.
i'll noodle on what i think works best overall lmao, its not like my members are saying anything lollol. Thanks! both of y'all ^^
this can be considered resolved
@SirLaplace appreciate the advice and code snippet.
i'll noodle on what i think works best overall lmao, its not like my members are saying anything lollol. Thanks! both of y'all ^^
this can be considered resolved
Re: Altering 'Gender' text in profile
hi
add this code to your css
add this code to your css
- Code:
#profile_field_16_-7 > li:nth-child(2) > label:after {
content: "Predacon";
font-size: 15px;
}
#profile_field_16_-7 > li:nth-child(2) > label {
font-size: 0;
}
#profile_field_16_-7 > li:nth-child(1) > label:after {
content: "Starseeker";
font-size: 15px;
}
#profile_field_16_-7 > li:nth-child(1) > label {
font-size: 0;
}
SirLaplace and Nemesis Prime like this post
Re: Altering 'Gender' text in profile
كونان2000 wrote:hi
add this code to your css
so i tried to do just a direct CSS replace of the code and a modification using what @skouliki suggested. i cannot get the 1st option to display the Text:
- Code:
#profile_field_8_1 > li:nth-child(3) > label:after {
content: " Starseeker";
font-size: 10px;
}
#profile_field_8_1 > li:nth-child(3) > label {
font-size: 0;
}
#profile_field_8_1 > li:nth-child(2) > label:after {
content: " N.A.I.L. (Non-Aligned Indigenous Life-forms)";
font-size: 10px;
}
#profile_field_8_1 > li:nth-child(2) > label {
font-size: 0;
}
#profile_field_8_1 > li:nth-child(1) > label:after {
content: " Predacon";
font-size: 10px;
}
#profile_field_8_1 > li:nth-child(1) > label {
font-size: 0;
}
Re: Altering 'Gender' text in profile
ok, so it was my poor typing/copy & paste. we're all set. this can be closed/resolved
Re: Altering 'Gender' text in profile
Thanks all for helping
Problem solved & topic archived.
|
Similar topics
» Gender Fluid and Gender Neutral Icon / Non-Binary Icon
» Profile Status Text
» CSS Color of post profile text
» Profile Song/Default Text Size/Edit Note Code help!
» Help Profile Information Text Color
» Profile Status Text
» CSS Color of post profile text
» Profile Song/Default Text Size/Edit Note Code help!
» Help Profile Information Text Color
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum