solved the gender feature

alt=
@hamadqr
6 years ago
28 posts
Hi all , I am thinking to add this feature, the gender, so we can know if the user male or female, it's very important,
for example, we can add this in the posts, he's shared a post. Or , she's shared a post. And more features linked with the gender.
Hope you can understand what i meen :)
Kind regards, Hamad.


--
Kind regards, Hamad.

updated by @hamadqr: 12/31/18 08:44:54AM
paul
@paul
6 years ago
4,331 posts
Yes, this can be done. The first thing would be to add a gender field to the profile account. Do this with the Form Designer.
You can then modify templates to test for this field and show appropriate text -

{if $profile_gender == 'f'}
    she's shared a post
{else}
    he's shared a post
{/if}

A lot of the default templates use embedded module and skin language strings which are by default gender unspecific, so you might meed to edit those and add more for male/female text strings as appropriate.

Hope that makes sense.


--
Paul Asher - JR Developer and System Import Specialist

updated by @paul: 09/29/18 05:24:52AM
alt=
@hamadqr
6 years ago
28 posts
Thanks a lot, can we see this feature in the next versions, so jr users have this feature without editing anything? And it's more easy to the new users :)
I am going to test it soon, thanks again


--
Kind regards, Hamad.
paul
@paul
6 years ago
4,331 posts
In all our years of Jamroom, I think this is the first time that somebody has wanted gender specific language strings, so to include it as default has never been a consideration.
To be honest, Jamroom is a very general purpose CMS and for a lot of user sites, profiles are not 'individual people'. They might be companies, bands, cities, or whatever, so giving profiles a gender setting by default would detract from Jamroom's potential capabilities imo.
But as outlined above, its possible to do what you want. We would be interested to know how you get on.
Thanks


--
Paul Asher - JR Developer and System Import Specialist
alt=
@hamadqr
6 years ago
28 posts
Ah , i know now, but if you add this feature in the JR and the admins can enable it in the settings , and you can keep it not working , for this, anyone need the gender feature he can enable it from the settings, and with this all users get a notification to tell him please select your gender, i am not sure if you can add it and keep it in the settings or you can add it in the market place.
More better to anyone need this feature and he's don't need to edit the jr :)
thanks again


--
Kind regards, Hamad.
alt=
@hamadqr
6 years ago
28 posts
Hi again, we added the radio button to the gender, but when i visit my profile , i can't see the gender, this is my profile:
Hamad's profile


--
Kind regards, Hamad.

updated by @hamadqr: 09/29/18 11:01:00PM
paul
@paul
6 years ago
4,331 posts
Once you have created the gender option with the Form Designer, use the {debug} tool to see how that new variable is available to be shown in templates -

https://www.jamroom.net/the-jamroom-network/documentation/module-developer-guide/1477/debug

You can then show its value by adding the correct smarty code to the appropriate template. For instance -

Gender: {$profile_gender}

(Assuming 'profile_gender' is the name of the field you created, of course).
hth


--
Paul Asher - JR Developer and System Import Specialist
alt=
@hamadqr
6 years ago
28 posts
Hi @paul
finally i added it, thanks again about your help. If i have other questions, i must open other topic, right?


--
Kind regards, Hamad.
paul
@paul
6 years ago
4,331 posts
Glad you are sorted.

Yes, one question per topic. It helps us keep track of things, and helps other users if they are searching for solutions to their issues.
Thanks


--
Paul Asher - JR Developer and System Import Specialist

Tags