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)

alghzil 05-15-2012 11:08 AM

taged for later thanks

Paolitus 05-25-2012 07:31 AM

Quote:

Originally Posted by booble (Post 2321968)
It show

"Gender: Male"

... but icon is missing

Quote:

Originally Posted by HHelp1 (Post 2324033)
Same here... I think it no longer work :/

icon is missing on vb 4.2.0
help...!!!!

staciesim 05-28-2012 06:59 AM

having problems when members are trying to registher with mobiles, gender not showing in mobile styles...it gives them the option to pick gender but when thay click on it all feilds are blank, so thay cant pick gender and cant move on to register any help would most gratefull

Paolitus 05-30-2012 06:07 AM

Quote:

Originally Posted by Paolitus (Post 2332624)
icon is missing on vb 4.2.0
help...!!!!

Solved
It's work on vb 4.2.0

thanks

RecklessTim 06-03-2012 02:22 PM

Quote:

Originally Posted by Paolitus (Post 2334550)
Solved
It's work on vb 4.2.0

thanks

What was the solution? I want to install this on my 4.2.0

insidegames 06-24-2012 10:47 AM

is it possible to get the gender-icon after the username?

thenamesgould 06-25-2012 07:08 AM

Quote:

Originally Posted by insidegames (Post 2342477)
is it possible to get the gender-icon after the username?

Absolutely, that's how I have it at my forum - marathonstadium.com

datoneer 06-27-2012 11:38 AM

Works perfect vb 4.1.10 thanks man

insidegames 07-04-2012 08:21 AM

Quote:

Originally Posted by thenamesgould (Post 2342713)
Absolutely, that's how I have it at my forum - marathonstadium.com

can you tell mer your code please? :-) Looks very coool

tareqbd 07-05-2012 04:52 PM

any rule in registration form can be added? e.g. if gender male .. do=addmember to male usergroup or if gender female... do=addmember to female usergroup?

thenamesgould 07-07-2012 05:00 AM

Quote:

Originally Posted by insidegames (Post 2344956)
can you tell mer your code please? :-) Looks very coool

Sorry for the slow reply. I put mine in the postbit_legacy template ... and it goes right after this bit:

{vb:raw memberaction_dropdown}

and before:

{vb:raw post.onlinestatus}

It should look like this once done:

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

Of course, you might not be using field 5, so you might have to change that bit. Let me know if you have any problems. :)

imported_dfmafia 07-24-2012 06:39 PM

had an issue, i required it for registration. it wasn't showing up.

I added the following to my registration template:

FIND:

Code:

                        <div class="blockrow">
                                <ul class="group">
                                        <li>
                                                <label for="email">{vb:rawphrase email_address}:</label>
                                                <input type="text" class="textbox" name="email" id="email" maxlength="50" value="{vb:raw email}" dir="ltr" tabindex="1" />
                                        </li>
                                        <li>
                                                <label for="emailconfirm">{vb:rawphrase confirm_email_address}:</label>
                                                <input type="text" class="textbox" name="emailconfirm" id="emailconfirm" maxlength="50" value="{vb:raw emailconfirm}" dir="ltr" tabindex="1" />
                                        </li>
                                </ul>
                                <p class="description">{vb:rawphrase enter_valid_email_address}</p>
                        </div>


ADD BELOW:

Code:

<div class="blockrow">
                                <ul class="group">
                                        <li>
<label for="gender">{vb:rawphrase gender}:</label>
<select class="primary" name="userfield[fieldXX]" id="cfield_XX" tabindex="1">
<option value="0" selected="selected"></option>
<option value="1">Male</option>
<option value="2">Female</option>
</select>
<input type="hidden" name="userfield[fieldXX_set]" value="1" />
                                        </li>
                                </ul>
                        </div>

change XX for whatever your profile field for gender is.

and seems to be working...

vB 4.2.0 PL 2

Ary Braga 12-17-2012 08:24 PM

1 Attachment(s)
Quote:

Originally Posted by insidegames (Post 2342477)
is it possible to get the gender-icon after the username?

working Perfectly on VB 4.2.0pl3

yes.

Firstly understand. The image name is case sensitive. Find first you Fieldx. No number, but the two names.
e.g: Male and Female =>Female is different of female
just rename the img as you filled in FieldX

Put the two img in /yourforum/images/misc

if you use VB4.2x

Find in postbit_legacy or postbit, this line: ( in my case I used postbit_legacy).

To put After USERNAME, use my attachments.



PHP Code:


     
<vb:if condition="$post['userid']">      
        {
vb:raw memberaction_dropdown

Change to:

PHP Code:

<vb:if condition="$post['userid']">     
{
vb:raw memberaction_dropdown}    
 <
vb:if condition="$post['fieldX']">&nbsp;&nbsp;&nbsp;&nbsp;<img src="{vb:stylevar imgdir_misc}/{vb:raw post.fieldX}.png" alt="{vb:raw post.fieldX}" />
            <
vb:else />
                <
span class="username guest">{vb:raw post.musername}</span>
</
vb:if></vb:if> 

I alter to PNG File. (case sensitive to) if you need change to .gif or .GIF? it's OK.

I used spacing ( &nbsp; ) to separate the image of Username.

Maybe you need to take out or put more ( &nbsp; ).

Depending on the template of your postbit.

Be happy

https://vborg.vbsupport.ru/external/2012/12/17.jpg

----------------

https://vborg.vbsupport.ru/external/2012/12/13.png 18x18-PNG

https://vborg.vbsupport.ru/external/2012/12/14.png 18x18-PNG
----------------
https://vborg.vbsupport.ru/external/2012/12/2.gif 12x12-GIF

https://vborg.vbsupport.ru/external/2012/12/3.gif 12x12-GIF

unfor 07-29-2013 10:36 AM

hey!

do you have any solution for the missing icons in 4.2.1?

thanks in advance :).

Macgiber 08-01-2013 02:46 AM

Installed

4.2.1

Macgiber 08-01-2013 02:53 AM

Quote:

Originally Posted by unfor (Post 2435903)
hey!

do you have any solution for the missing icons in 4.2.1?

thanks in advance :).

Friend, you have to verify either the image path, I install in current version and struggle to 100%

TravisWPaquin 08-09-2013 10:23 PM

It does not list the gender on my postbit. I edited the template, added the images and profile field, but nothing. Any ideas on how to get it to show? The code I was to add below the other one did not have the break tag which gives me the impression I may of had the wrong code, but for the most part, I'm sure they did match. Any help would be appreciated. Thanks!

Amaury 08-09-2013 10:39 PM

Can we have the texts Male or Female instead of the gender symbols?

TravisWPaquin 08-10-2013 05:34 AM

Quote:

Originally Posted by Amaury25 (Post 2438080)
Can we have the texts Male or Female instead of the gender symbols?

Preferably, why not both. That would be nice to have.

CoZmicShReddeR 08-17-2013 08:07 PM

Quote:

Originally Posted by Amaury25 (Post 2438080)
Can we have the texts Male or Female instead of the gender symbols?

This doesn't really require rocket science to modify this... Just sayin... ;)

smirkley 08-18-2013 03:44 AM

Quote:

Originally Posted by Amaury25 (Post 2438080)
Can we have the texts Male or Female instead of the gender symbols?

I just use the plain text option in the ACP myself.

Bubble #5 08-26-2013 04:02 AM

Classic mod. Well done and well written :up:

4.2.1

How do we get the image to appear NEXT to the word 'gender' instead of below it?

friendlymela 09-10-2013 06:16 AM

How do i add gender in posbit without image?

CoZmicShReddeR 09-19-2013 12:07 AM

Quote:

Originally Posted by friendlymela (Post 2444573)
How do i add gender in posbit without image?

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


I think just like this??
Code:

<!-- Wy Gender in postbit Start -->
<vb:if condition="$post['fieldX']"> <dt>Gender: {vb:raw post.fieldX}</dt></vb:if>
<!-- Wy Gender in postbit End -->


CoZmicShReddeR 09-19-2013 12:12 AM

Quote:

Originally Posted by Bubble #5 (Post 2441162)
Classic mod. Well done and well written :up:

4.2.1

How do we get the image to appear NEXT to the word 'gender' instead of below it?

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


Maybe try??
Code:

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


ckgb 01-08-2014 01:48 PM

VB 4.2.2

I was wondering if anybody knows how to unite online/offline status with gender icon.

Explanation.

Right now we have three images indicating online/offline status https://vborg.vbsupport.ru/images/cs...er_offline.gif https://vborg.vbsupport.ru/images/cs...ser_online.gif and a hidden one.

And let us say we have a female online icon for gender https://vborg.vbsupport.ru/external/2014/01/47.png. So when she is offline it changes to something like this https://vborg.vbsupport.ru/external/2014/01/48.png.

When a user is hidden it displays a third icon. I.e. https://vborg.vbsupport.ru/external/2014/01/49.png

Basically that is the question. How to make gender mod work like online/offline/hidden?

ndut 01-11-2014 07:12 PM

is this mod can be use in vbull 5.05?

ozzy47 01-11-2014 07:21 PM

No, you can not use vB4 mods in vB5 as I stated earlier.

ndut 01-11-2014 07:26 PM

i c,...
may be, you can tell me how to do mod like this in vb 5.05, ozzy?
thank you in advance

ozzy47 01-11-2014 07:38 PM

I have not dove into vB5 yet, I don't like it as it is now, not enough hooks like vB4 had.

ndut 01-11-2014 08:13 PM

yes, not enough hooks like vb4 had.

SᴩiDᴇЯ 03-16-2015 09:44 AM

Thank you it works perfectly with my vB4.2.2 you can see it here

akz645 08-10-2015 11:19 PM

These were my settings:
http://i.imgur.com/jI48mDH.png
I tried on vBulletin 4.2.3 and it almost worked- the gender options doesn't show when users are editing their profile.
Like me, if you put: No, but display at registration in the User Profile Field, then you'll need to do what I write below:

So in order to fix that:
AdminCP -> Styles & Templates -> Search Templates -> tb_homepage [Pick your style too] -> modifyprofile (edit)
Find:
PHP Code:

                    <input type="hidden" name="coppauser" value="1" />
                    <
class="description">
                        {
vb:rawphrase if_under_13_provide_parent}
                    </
p>
                </
div

Quote:

Originally Posted by imported_df+++++ (Post 2351115)
ADD BELOW:

Code:

<div class="blockrow">
                                <ul class="group">
                                        <li>
<label for="gender">{vb:rawphrase gender}:</label>
<select class="primary" name="userfield[fieldXX]" id="cfield_XX" tabindex="1">
<option value="0" selected="selected"></option>
<option value="1">Male</option>
<option value="2">Female</option>
</select>
<input type="hidden" name="userfield[fieldXX_set]" value="1" />
                                        </li>
                                </ul>
                        </div>

change XX for whatever your profile field for gender is.

That seems to do the trick.
If you have problems with it appearing on the registration, then do what the guy above me said to do in the registration template.

It will be located here:
http://i.imgur.com/7RpGMzK.png

The blank option is useful, so users can hide gender from appearing in the postbit altogether.

Edit:
I'd suggest ignoring this post. Do what I did in the post below (much better/easier).

akz645 08-29-2015 11:35 AM

1 Attachment(s)
I noticed many of my users never bothered to check their userCP and therefore the default option was blank (if you follow this Mods settings). Hence the gender never appeared in their postbit, as most users didn't fill it out during registration.

So I decided to figure out a way for users to have 'Male' as the default, if they couldn't be bothered to change when registering. This way, if they're female or don't want to display their Gender, they'll be forced to change from their userCP, if they didn't already during registration.

Tested & Working on vBulletin 4.2.3

How did I do this?
Step 1:
Download the attachment & extract the attachment file and upload the 'images' folder into the root of your public_html folder.

Step 2:
Admin CP -> User Profile Fields -> Add New User Profile Field -> Profile Field Type: Single-Selection Menu
This is what I kept as my User Profile Field: Yes, at registration and profile updating & Yes, but No First Blank Option
Notice that I have set a 'Hide' option too (you can name it to whatever you want). That option will not display Gender in the postbit.
Also you won't see the Field ID Number until you press save and then go back to the User Profile Manger.

Step 3:
AdminCP -> Languages & Phrases -> Phrase Manager -> Add New Phrase:
  • Phrase Type: GLOBAL
  • Product: vBulletin
  • Varname: gender
  • Text: Gender

Step 4:
AdminCP -> Styles & Templates -> Search Templates -> postbit_legacy [Pick your style too] -> postbit_legacy (edit)
Note: If postbit_legacy doesn't work, search "postbit" which is located below Postbit Templates.

Find: (well you can pretty much place it anywhere in your postbit that you'd like)
Code:

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

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

Make sure to edit Male & Female to whatever you called it in your options.
Also, make sure to edit the four Field ID Numbers (as seen in the code, mine is 5).
If you want to add in more options, then you can do that too (same place you put Male & Female images). Make sure to call it the same as your Options (caps sensitive). Likewise, make sure to add in the extra condition into your postbit_legacy (or postbit) template.

That's it :)

P.S=
Your display order is not your Field ID Number. Display order is completely irrelevant. It's just to help you organise profile fields.
------------------
Edit:
Thanks to Welshy2008 for this Mod, I figured out how to make my own Mod doing this, but for something separate.

darksidemon2 10-16-2015 01:09 PM

Quote:

Originally Posted by akz645 (Post 2553850)
I noticed many of my users never bothered to check their userCP and therefore the default option was blank (if you follow this Mods settings). Hence the gender never appeared in their postbit, as most users didn't fill it out during registration.

So I decided to figure out a way for users to have 'Male' as the default, if they couldn't be bothered to change when registering. This way, if they're female or don't want to display their Gender, they'll be forced to change from their userCP, if they didn't already during registration.

Tested & Working on vBulletin 4.2.3

How did I do this?
Step 1:
Download the attachment & extract the attachment file and upload the 'images' folder into the root of your public_html folder.

Step 2:
Admin CP -> User Profile Fields -> Add New User Profile Field -> Profile Field Type: Single-Selection Menu
This is what I kept as my User Profile Field: Yes, at registration and profile updating & Yes, but No First Blank Option
Notice that I have set a 'Hide' option too (you can name it to whatever you want). That option will not display Gender in the postbit.
Also you won't see the Field ID Number until you press save and then go back to the User Profile Manger.

Step 3:
AdminCP -> Languages & Phrases -> Phrase Manager -> Add New Phrase:
  • Phrase Type: GLOBAL
  • Product: vBulletin
  • Varname: gender
  • Text: Gender

Step 4:
AdminCP -> Styles & Templates -> Search Templates -> postbit_legacy [Pick your style too] -> postbit_legacy (edit)
Note: If postbit_legacy doesn't work, search "postbit" which is located below Postbit Templates.

Find: (well you can pretty much place it anywhere in your postbit that you'd like)
Code:

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

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

Make sure to edit Male & Female to whatever you called it in your options.
Also, make sure to edit the four Field ID Numbers (as seen in the code, mine is 5).
If you want to add in more options, then you can do that too (same place you put Male & Female images). Make sure to call it the same as your Options (caps sensitive). Likewise, make sure to add in the extra condition into your postbit_legacy (or postbit) template.

That's it :)

P.S=
Your display order is not your Field ID Number. Display order is completely irrelevant. It's just to help you organise profile fields.
------------------
Edit:
Thanks to Welshy2008 for this Mod, I figured out how to make my own Mod doing this, but for something separate.

Thanks

works this way with Version 4.2.3

Gn_Snake 02-18-2016 02:39 PM

Thanks,
works perfect to 4.2.3


All times are GMT. The time now is 01:46 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.01873 seconds
  • Memory Usage 1,893KB
  • 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
  • (11)bbcode_code_printable
  • (3)bbcode_php_printable
  • (16)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
  • (36)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