vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=246)
-   -   Mini Mods - Gender in Postbit or Postbit Legacy - vB 4.0.x Inc GOLD (https://vborg.vbsupport.ru/showthread.php?t=231260)

serega_m 01-15-2010 10:58 PM

Hi,

Your code is working fine but I have a little problem, as my genders are in Russian, so before I was using this code in postibt_legacy:

<br /> Он/Она/Оно? - <if condition="$post[field6] == 'Он'"><img src="images/misc/male.gif" align="absmiddle" alt="Он">
<else /><if condition="$post[field6] == 'Она'"><img src="images/misc/female.gif" align="absmiddle" alt="Она"><else /><if
condition="$post[field6] == 'Оно'"><img src="images/misc/it.gif" align="absmiddle" alt="Оно"></if></if>

But now it doesn't work, obviously. I have tried to modify it to work with vB 4.0.1 style but with no results. Can anybody please modify the code so it will work with vB 4.0.1 the way it was working for me before - with if-else operators, so if a person's gender is "Она" (Female) then the appropriate pic will be showing. I could use just english words for my Russian forums, of course, but then I need to save the new English gender in every profile which already had the old Russian gender, and it will be a major pain in the ass and I dunno how or if I can do it automatically from AP.

Welshy2008 01-16-2010 10:22 AM

Quote:

Originally Posted by serega_m (Post 1956949)
Hi,

Your code is working fine but I have a little problem, as my genders are in Russian, so before I was using this code in postibt_legacy:

<br /> Он/Она/Оно? - <if condition="$post[field6] == 'Он'"><img src="images/misc/male.gif" align="absmiddle" alt="Он">
<else /><if condition="$post[field6] == 'Она'"><img src="images/misc/female.gif" align="absmiddle" alt="Она"><else /><if
condition="$post[field6] == 'Оно'"><img src="images/misc/it.gif" align="absmiddle" alt="Оно"></if></if>

But now it doesn't work, obviously. I have tried to modify it to work with vB 4.0.1 style but with no results. Can anybody please modify the code so it will work with vB 4.0.1 the way it was working for me before - with if-else operators, so if a person's gender is "Она" (Female) then the appropriate pic will be showing. I could use just english words for my Russian forums, of course, but then I need to save the new English gender in every profile which already had the old Russian gender, and it will be a major pain in the ass and I dunno how or if I can do it automatically from AP.



What are the following, in Russian?


Please Translate the following for me...


1. Gender
2. Please Select your Gender
3. Male , Female
4. gender (No capitals)
5. This is Gender


I do not speak or understand Russian. I do not normally do translations - But on this occasion I will have a TRY! I will do my best - with no guarantee that it will work.

serega_m 01-16-2010 10:56 AM

No,

You don't need to do translation really :) Just in my old code system were getting the right picture for the choice people made in their profile. See, if a person choose "Он" (Male) then there was the code for this choice: <if condition="$post[field6] == 'Он'"><img src="images/misc/male.gif" align="absmiddle" alt="Он">

It was using if-else operators, and in your code it is just one operator<vb:if> - the way it works now is that you have two options - Male or Female and two corresponding files with names Male.gif and Female.gif - but this won't work for me cause if I'll rename my files to Russian - Unix won't be able to recognize them :) That's the problem :) So I need the workaround, essentially - a new version of the old code which will work in vB 4.0.1 :)

Welshy2008 01-16-2010 11:28 AM

I see. I am sure someone will be along that can help you. :)

Welshy2008 01-16-2010 11:30 AM

Just one more thing - Can you click installed please? :)

serega_m 01-16-2010 11:37 AM

Did click, but anybody? :)

sdavis2702 01-18-2010 08:00 PM

Awesome awesome awesome... thank you.

RedHacker 01-20-2010 10:15 AM

Why have three options...?

Male
Female
Blank <------ ?????

Welshy2008 01-20-2010 02:28 PM

Quote:

Originally Posted by RedHacker (Post 1961030)
Why have three options...?

Male
Female
Blank <------ ?????



With the blank option, the mod doesn't show if the user doesn't select an option.

RedHacker 01-20-2010 03:31 PM

Quote:

Originally Posted by Welshy2008 (Post 1961244)
With the blank option, the mod doesn't show if the user doesn't select an option.

Can i show together male and female icon if the user select blank option...?


All times are GMT. The time now is 12:41 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.01149 seconds
  • Memory Usage 1,740KB
  • 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_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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