How To Add Gender Icon To Profile

Started by CHRIS-7, March 31, 2015, 09:01:37 PM

Previous topic - Next topic

CHRIS-7

Hi , Friends

I Wanna To Add Gender Icon To Profile

I Think This Is a Good Idea For a Little Beautiful Profile

?But I Don't Know To How Do It

Please Look At This Image

.Thanks

Deaks

~~~~
Former SMF Project Manager
Former SMF Customizer

"For as lang as hunner o us is in life, in nae wey
will we thole the Soothron tae owergang us. In truth it isna for glory, or wealth, or
honours that we fecht, but for freedom alane, that nae honest cheil gies up but wi life
itsel."

CHRIS-7

Quote from: Ρουνικ on March 31, 2015, 09:06:44 PM
version of smf?

Hi , Ρουνικ

Oh , Sorry I Forgot

My SMF Version Is  2.0.9

And Another Forum Is 2.1.
:)

More For 2.0.9

Pipke

in ../Themes/{your_theme}/Profile.template.php

find:

<dd>', $context['member']['gender']['name'], '</dd>';


replace with:

<dd><img src="', $settings['images_url'],'/', $context['member']['gender']['name'], '.gif" alt="" /> ', $context['member']['gender']['name'], '</dd>';
"If something is wrong, fix it if you can. But train yourself not to worry: Worry never fixes anything."

Click here to view my mods for SMF

Hey 👋 Did i helped... you like what i do. You can now buy me a coffee! ☕

Steve

[Off Topic] That last graphic in your sig is a bit much don't ya think? jmo [/Off Topic]
DO NOT pm me for support!

CHRIS-7

Quote from: Pipke on April 02, 2015, 10:03:37 AM
in ../Themes/{your_theme}/Profile.template.php

find:

<dd>', $context['member']['gender']['name'], '</dd>';


replace with:

<dd><img src="', $settings['images_url'],'/', $context['member']['gender']['name'], '.gif" alt="" /> ', $context['member']['gender']['name'], '</dd>';


Hello Pipke I Do it And Work In English Language  :)

Thank You Very Much For Your Help

But My Forum Language is Persian And My Users Don't Use English Language But Icon Doesn't Show  :-[

? Now What

I Attach Image

Pipke

Dont know how persian text works. images

Try this:
look in folder ..Themes/{your_theme}/images
for Male.gif and Female.gif


Rename them to {persian_text_for_Male}.gif and {persian_text_for_Female}.gif , be sure that the first character of the text must be in caps.

... infact you must translate english to persian text characters for male and female, like the text that is shown on your forum for Male and Female!!
"If something is wrong, fix it if you can. But train yourself not to worry: Worry never fixes anything."

Click here to view my mods for SMF

Hey 👋 Did i helped... you like what i do. You can now buy me a coffee! ☕

CHRIS-7

Quote from: Pipke on April 03, 2015, 06:33:40 AM
Dont know how persian text works. images

Try this:
look in folder ..Themes/{your_theme}/images
for Male.gif and Female.gif


Rename them to {persian_text_for_Male}.gif and {persian_text_for_Female}.gif , be sure that the first character of the text must be in caps.

... infact you must translate english to persian text characters for male and female, like the text that is shown on your forum for Male and Female!!

Hi , Pipke

Thank You - It's Work I Copy And Rename The Images

Girl : دختر

Boy : پسر

.Much appreciate Forever
:) :)

Solved

CHRIS-7

#8
Hi Pipke

I'm Using This Code And Work in Any Language
Like This

Find

<dt>', $txt['gender'], ': </dt>
<dd>', $context['member']['gender']['name'], '</dd>';


Replace

<dt>', $txt['gender'], ': </dt>
<dd>', $context['member']['gender']['image'],' ', $context['member']['gender']['name'], '</dd>';


  :D .Thanks

Advertisement: