Current date/time is May 16th 2024, 4:51 am

Search found 1 match for customgender

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;

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.
by SirLaplace
on January 2nd 2023, 9:29 pm
 
Search in: Scripts Problems Archives
Topic: Altering 'Gender' text in profile
Replies: 8
Views: 387

Back to top

Jump to: