vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Prompt (https://vborg.vbsupport.ru/showthread.php?t=326953)

kojay 12-10-2018 06:04 PM

Prompt
 
how do I make a gender icon on the right side of nick when the radio button is assigned in the additional profile fields?

iA1 12-10-2018 08:03 PM

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,
Code:

<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

Quote:

Originally Posted by iA1 (Post 2597732)
Code:

<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.

iA1 12-11-2018 05:57 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?

kojay 12-11-2018 06:11 AM

Quote:

Originally Posted by iA1 (Post 2597740)
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.

iA1 12-11-2018 06:30 AM

Code:

<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

Quote:

Originally Posted by iA1 (Post 2597742)
Add it after the username.

After a user name?

iA1 12-11-2018 08:22 AM

Add it before this line:
<if condition="$post['usertitle']"><div class="smallfont">$post[usertitle]</div></if>

kojay 12-11-2018 09:28 AM

Quote:

Originally Posted by iA1 (Post 2597745)
Add it before this line:
<if condition="$post['usertitle']"><div class="smallfont">$post[usertitle]</div></if>

Did everything as you said, no change. ++++.

iA1 12-11-2018 01:51 PM

Can you post a link to your forum? and copy paste the parts from postbit_legacy template where you have added the code?


All times are GMT. The time now is 11:32 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01208 seconds
  • Memory Usage 1,736KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete