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)

Welshy2008 12-25-2009 10:00 PM

Gender in Postbit or Postbit Legacy - vB 4.0.x Inc GOLD
 
1 Attachment(s)
What is this?

This is a little Mod & Template edit that adds a 'Gender' for you Members to choose and displays their 'Gender and a nice little icon' in their Postbit.

Instructions in the "READ ME" file (pdf) , pictures and SCREENSHOTS are all included in the Attached file ' Gender in Postbit'.

Complete this in 4 Steps:-


STEP ONE; Create a New Profile Field:

AdminCP -> User Profile Fields -> Add New User Profile Field ->
And do the following:
  • Profile Field Type: Single-Selection Menu
Click Continue


Add New User Profile field: Single-Selection Menu

  • Title: Gender:
  • Description: Please Select your Gender
  • Profile Field Category: Uncatagorized
  • Options: Male , Female
  • Set Default: None
  • Display Order: (Chosen By You)
  • Field Required: Yes, at registration & profile updating (You don?t have to make it compulsory)
  • Field Editable By User: Yes
  • Private Field: No
  • Field Searchable On Members List: Yes
  • Show On Members List: Yes
Optional Output:
  • Allow User to input their own value for this option: No
  • Max length of allowed user input: 100
  • Field Length: 25
  • Regular Expression: Leave this EMPTY
Display Page:
  • Which page displays this option? Edit Profile
SAVE & Note the ?field? number as you need to replace the ?X? with it in the two positions (2) containing ?fieldX?



STEP 2; Add a Phrase:

AdminCP -> Languages & Phrases -> Phrase Manager -> Add New Phrase (Center button on the bottom):
  • Phrase Type: GLOBAL
  • Product: vBulletin
  • Varname: gender
  • Text: Gender
SAVE


STEP 3; Postbit or Postbit_Legacy Template (whichever one you use):


AdminCP -> Styles and Templates -> Style Manager -> (style that you use ? Mine is ?Default Style?) -> << >> -> Postbit
Templates -> Postbit (or Postbit _legacy, depending on which one YOU use)

FIND:

Code:

<vb:if condition="$post['joindate']"><dt>{vb:rawphrase join_date}</dt>: <dd>{vb:raw post.joindate}</dd></vb:if><br />
ADD BELOW:

Code:

<!-- Wy Gender in postbit Start -->
<vb:if condition="$post['fieldX']"> <dt>Gender:</dt> <dd><img src="http://WWW.YOUR FORUM
ADDRESS.COM/images/misc/{vb:raw post.fieldX}.gif" alt="" /></dd></vb:if>
<!-- Wy Gender in postbit End -->


vBulletin 4.1.0 (tested by beiamerica. Please note that I have not tested this myself.

Code:

<!-- Wy Gender in postbit Start -->
<vb:if condition="$post['fieldX']"><dt>{vb:rawphrase gender}</dt> <dd><img src="{vb:stylevar imgdir_misc}/{vb:raw post.fieldX}.gif" alt="{vb:raw post.fieldX}" /></dd></vb:if>
<!-- Wy Gender in postbit End -->


  • Replace the TWO Green ?X?s with the field number in Step One (1).
  • Replace the Red Text with YOUR forum address.
STEP 4; Upload the Images:
  • Upload the ?Male.gif? and the ?Female.gif? to the ?images/misc? directory of your forum?s route.
THAT?S IT !

To view it in your profile: Edit your Profile and choose your ?Gender?.

Please Click the Install and Rate the Mod ? Many Thanks.

Edited on Wednesday 7th July 2010. Reason: Two more Screenshots added and made the "Single-Selection Menu" Bold.

Welshy2008 12-26-2009 09:01 PM

* Reserved *

iguano 12-26-2009 10:24 PM

I no understand, into Gender In Postbit.zip i found a file .lnk :confused:

Welshy2008 12-26-2009 10:51 PM

Quote:

Originally Posted by iguano (Post 1938982)
I no understand, into Gender In Postbit.zip i found a file .lnk :confused:



Sorry, Iguano. Don't know what happened there. But I have now redone and reuploaded another .zip folder.

iguano 12-26-2009 11:15 PM

Installed :)
perfect, thanks you

Welshy2008 12-26-2009 11:19 PM

You're Welcome. :D

stuky4ever 12-27-2009 01:17 AM

How can I update everyones Gender?

Charlie98902 12-27-2009 01:26 AM

Could set in in the setting to be mandatory. Then they have to.

Taurus1 12-27-2009 02:13 AM

1 Attachment(s)
Thanks for this. You might just want to mention in your instructions to also change the URL to your forums. Then also, why is the image below the text, as shown here??

Attachment 108273

Merjawy 12-27-2009 02:33 AM

Tagged

Thanks

Welshy2008 12-27-2009 08:48 AM

Quote:

Originally Posted by Taurus1 (Post 1939096)
Thanks for this. You might just want to mention in your instructions to also change the URL to your forums. Then also, why is the image below the text, as shown here??

Attachment 108273


Code:
Code:

<!-- Wy Gender in postbit Start -->
<vb:if condition="$post['fieldX']"> <dt>Gender:</dt> <dd><img src="http://WWW.YOUR FORUM
ADDRESS.COM
/images/misc/{vb:raw post.fieldX}.gif" alt="" /></dd></vb:if>
<!-- Wy Gender in postbit End -->

  • Replace the TWO Green ‘X’s with the field number in Step One (1).
  • Replace the Red Text with YOUR forum address.


How's that? :)


With regard to the position, Your layout looks different to the vB standard layout. It is a matter of moving the code around to suit.

Welshy2008 12-27-2009 08:54 AM

Quote:

Originally Posted by stuky4ever (Post 1939062)
How can I update everyones Gender?

Quote:

Originally Posted by Charlie98902 (Post 1939067)
Could set in in the setting to be mandatory. Then they have to.



That is coorrect. And when your members go and edit their profile, they will have to update their Gender Bit.

You could start a thread on your forum explaining about the new feature and that you would like everyone to update their profiles.

It's a pitty that there wasn't a mod that you could have that forces everyone to update their profiles. (would be great for times like this). And if they don't update their profiles when prompted, they will not be able to view the forums. Good Idea or 'overboard'? YOu decide

:D

Hasanudin 12-27-2009 11:51 AM

thx for u.. installed :)

milsirhc 12-27-2009 12:23 PM

Thanks! INstalled!

Dr.osamA 12-27-2009 12:40 PM

i have it 4 dyes ago

thanxxxx

installed
________
Vapir No2

SpankMe 01-04-2010 08:43 PM

I put the gender symbol in that empty space between userinfo and userstats.

Find in postbit:
HTML Code:

<vb:if condition="$post['userid']">
<div class="userinfo_extra">


and add the following above:
HTML Code:

<div style="float:left; font-size:24px;">
<vb:if condition="$post['fieldx'] == 'Male'">

<vb:elseif condition="$post['fieldx'] == 'Female'" />

</vb:if>
</div>


I test specifically for male/Female as I give my members a third option: "None of your business".

Welshy2008 01-05-2010 10:15 AM

Quote:

Originally Posted by SpankMe (Post 1947225)
I put the gender symbol in that empty space between userinfo and userstats.

Find in postbit:
HTML Code:

<vb:if condition="$post['userid']">
<div class="userinfo_extra">


and add the following above:
HTML Code:

<div style="float:left; font-size:24px;">
<vb:if condition="$post['fieldx'] == 'Male'">

<vb:elseif condition="$post['fieldx'] == 'Female'" />

</vb:if>
</div>


I test specifically for male/Female as I give my members a third option: "None of your business".


Can you click "Installed" please?

SpankMe 01-05-2010 05:51 PM

Quote:

Originally Posted by Welshy2008 (Post 1947719)
Can you click "Installed" please?

Sorry, but I've been doing this myself for years :)

Welshy2008 01-06-2010 07:51 AM

Quote:

Originally Posted by SpankMe (Post 1948066)
Sorry, but I've been doing this myself for years :)

Not on this version you haven't. ;) I redone the code and released it - exactly the same as the other guys before me on differing versions. :)

But - maybe you should have released it?

Anyway, This time last year (And still am on a lot of mods etc) grateful for what people have done, when I am unable to do them myself. :D


And that is what it is all about.


I bid you a good day. :)

RedHacker 01-14-2010 09:45 PM

Can i have icon for Mature...?

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

VonDoom 01-20-2010 05:29 PM

1 Attachment(s)
I like this hack but wont be able to keep it on my forum unless we can solve the two column problem. Any help would be greatly appreciated. Thanks

badawidollah 01-22-2010 07:50 AM

edited

working now

Welshy2008 01-22-2010 12:40 PM

Quote:

Originally Posted by VonDoom (Post 1961401)
I like this hack but wont be able to keep it on my forum unless we can solve the two column problem. Any help would be greatly appreciated. Thanks


Can you post the code on here please? Please also include some code before and after it.

Could you also confirm which version you are using?


Many Thanks,

Welshy.

adembaba 01-26-2010 05:57 PM

Installed and it works, just one thing. Under the username it says "gender". I want to change this into dutch, but it doesn't seem to work. I translated all "gender" prases that i could find in "phrase manager" but it still remains "gender" What should i do?

Gender = "geslacht" in dutch.

Welshy2008 01-26-2010 07:07 PM

Quote:

Originally Posted by adembaba (Post 1967281)
Installed and it works, just one thing. Under the username it says "gender". I want to change this into dutch, but it doesn't seem to work. I translated all "gender" prases that i could find in "phrase manager" but it still remains "gender" What should i do?

Gender = "geslacht" in dutch.


Here you go:

Code:

<!-- Wy Gender in postbit Start -->
<vb:if condition="$post['fieldX']"> <dt>Geslacht:</dt> <dd><img src="http://WWW.YOUR FORUMADDRESS.COM/images/misc/{vb:raw post.fieldX}.gif" alt="" /></dd></vb:if>
<!-- Wy Gender in postbit End -->

Replace the TWO Green ‘X’s with the field number in Step One (1).
Replace the Red Text with YOUR forum address.

adembaba 01-26-2010 09:09 PM

Thank you, but it's a bilingual forum. So i need it in different languages. Am using Dutch and Turkish, sorry i wasn't too clear about this.. That's why i wanted to use phrase manager per se...

In step 2 i had to add a phrase, so i thought i could change it via the phrase manager..

Dutch: Geslacht
Turkish: Cinsiyet

marked as installed though

Welshy2008 01-27-2010 07:20 AM

What about getting rid of the "Gender:" and Just having a flag show on your Postbit or Postbit_Legacy?

Xtrigit 02-02-2010 09:36 PM

I installed this earlier on my vb4 forum but now I would like to install it on my vbulletin 3.8.4 forum, how can I make this work?

Can you or anyone change the following code to work with 3.8.4 and tell me where to paste?

thanks

Code:

<!-- Wy Gender in postbit Start -->
<vb:if condition="$post['fieldX']"> <dt>Gender:</dt> <dd><img src="http://WWW.YOUR FORUM
ADDRESS.COM/images/misc/{vb:raw post.fieldX}.gif" alt="" /></dd></vb:if>
<!-- Wy Gender in postbit End -->


ndut 02-07-2010 05:21 PM

Nice..

Welshy2008 02-07-2010 06:02 PM

Quote:

Originally Posted by Xtrigit (Post 1973418)
I installed this earlier on my vb4 forum but now I would like to install it on my vbulletin 3.8.4 forum, how can I make this work?

Can you or anyone change the following code to work with 3.8.4 and tell me where to paste?

thanks

Code:

<!-- Wy Gender in postbit Start -->
<vb:if condition="$post['fieldX']"> <dt>Gender:</dt> <dd><img src="http://WWW.YOUR FORUM
ADDRESS.COM/images/misc/{vb:raw post.fieldX}.gif" alt="" /></dd></vb:if>
<!-- Wy Gender in postbit End -->




Please click "Installed" if you would like support.


All times are GMT. The time now is 12:01 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.01628 seconds
  • Memory Usage 1,851KB
  • 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
  • (7)bbcode_code_printable
  • (4)bbcode_html_printable
  • (13)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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