View Full Version : Prompt
kojay
12-10-2018, 06:04 PM
how do I make a gender icon on the right side of nick when the radio button is assigned in the additional profile fields?
Do you already have a gender field? If yes, then it is possible to use if-conditions in the postbit template and display an icon based on gender selection.
For example,
<if condition="$post['field10'] == 'Male'"><img src"images/male_icon.png">
<else /><img src"images/female_icon.png">
</if>
kojay
12-11-2018, 05:53 AM
<if condition="$post['field10'] == 'Male'"><img src"images/male_icon.png">
<else /><img src"images/female_icon.png">
</if>What I did as you wrote, did not help.
It is just an example code.
What is the field number for the gender userfield? Are you sure you have the same folder location as I wrote in example?
kojay
12-11-2018, 06:11 AM
It is just an example code.
What is the field number for the gender userfield? Are you sure you have the same folder location as I wrote in example?Field5, folder public_html/images/creativecreature/misc.
<if condition="$post['field5'] == 'Male'"><img src"images/creativecreature/misc/male_icon.png">
<else /><img src"images/creativecreature/misc/female_icon.png">
</if>
Maybe you are using vertical postbit. Add the code in both the templates, postbit as well as postbit_legacy. Add it after the username.
Make sure to change the red parts in above code with actual values for your forum. They are case-sensitive.
kojay
12-11-2018, 07:07 AM
Add it after the username.After a user name?
Add it before this line:
<if condition="$post['usertitle']"><div class="smallfont">$post[usertitle]</div></if>
kojay
12-11-2018, 09:28 AM
Add it before this line:
<if condition="$post['usertitle']"><div class="smallfont">$post[usertitle]</div></if>Did everything as you said, no change. ++++.
Can you post a link to your forum? and copy paste the parts from postbit_legacy template where you have added the code?
kojay
12-14-2018, 09:22 AM
Can you post a link to your forum? and copy paste the parts from postbit_legacy template where you have added the code?https://forum-mira.ru.
kojay
12-19-2018, 08:17 AM
iA1 you than the offended?
I checked your site but couldn't figure out why it does not display the icon. Is the code still there or have you removed it?
kojay
12-19-2018, 11:03 AM
I checked your site but couldn't figure out why it does not display the icon. Is the code still there or have you removed it?Remove.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.