Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
  #1  
Old 06-01-2008, 03:32 AM
shlomot's Avatar
shlomot shlomot is offline
 
Join Date: Apr 2007
Location: Haifa, Israel
Posts: 246
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Default Member Picture for Men and Women

A default picture can improve community atmosphere.

A different picture for each gender can be a killer One for the boys and one for the girls!

I guess that in order to do that, the developer will have to provide an option set in AdminCP that tells stores the field number being used as the gender field and the values it contains for each gender.

Thank you in advance.
Reply With Quote
  #2  
Old 06-01-2008, 03:36 AM
GameWizard's Avatar
GameWizard GameWizard is offline
 
Join Date: Apr 2004
Location: Vancouver, BC
Posts: 319
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You should have a profile field that has Male and Female and you can place this where your avatar/profile picture code should appear:

Code:
<if condition="$userinfo[field12]==Male">
Male Picture
<else />
Female Picture
</if>
This assumes that everyone has selected either one or the other. If some members have no selected either field, you should use the the code below, otherwise you may have males that haven't selected a gender show up as a female:

Code:
<if condition="$userinfo[field12]==Male">
Male Picture
</if>
<if condition="$userinfo[field12]==Female">
 Female Picture
 </if>
Reply With Quote
  #3  
Old 06-01-2008, 03:55 AM
shlomot's Avatar
shlomot shlomot is offline
 
Join Date: Apr 2007
Location: Haifa, Israel
Posts: 246
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for such a quick reply.

The gender field is now mandatory (upon registration), but it was wise of you to point out that not all members have filled out their gender yet

Can you please put all three options together, I.E. Male/Female/Otherwise?

I also wish that you can expend on it and show how to assemble it with this MOD for the benefit of all of us PHP illiterates.

Many thanks.

Quote:
Originally Posted by GameWizard View Post
You should have a profile field that has Male and Female and you can place this where your avatar/profile picture code should appear:

Code:
<if condition="$userinfo[field12]==Male">
Male Picture
<else />
Female Picture
</if>
This assumes that everyone has selected either one or the other. If some members have no selected either field, you should use the the code below, otherwise you may have males that haven't selected a gender show up as a female:

Code:
<if condition="$userinfo[field12]==Male">
Male Picture
</if>
<if condition="$userinfo[field12]==Female">
 Female Picture
 </if>
Reply With Quote
  #4  
Old 06-02-2008, 02:02 AM
GameWizard's Avatar
GameWizard GameWizard is offline
 
Join Date: Apr 2004
Location: Vancouver, BC
Posts: 319
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No Php required here, just simple HTML coding and some mind power and logic.

HTML Code:
<if condition="$prepared['profilepicurl']">

                    <td id="profilepic_cell" class="tborder alt2">
<img src="$prepared[profilepicurl]" $prepared[profilepicsize] alt="<phrase 1="$prepared[username]">$vbphrase[xs_picture]</phrase>" />

<else />

<if condition="$userinfo[field12]==Male">
<img src="http://www.your-domain.com/images/Default-Male-Pic.gif">
<else />
<img src="http://www.your-domain.com/images/no-gender-pic.gif">
</if>

<if condition="$userinfo[field12]==Female">
 <img src="http://www.your-domain.com/images/Default-Female-Pic.gif">
 <else />
<img src="http://www.your-domain.com/images/no-gender-pic.gif">
</if>

</td>
</if>
Reply With Quote
  #5  
Old 06-02-2008, 02:31 AM
shlomot's Avatar
shlomot shlomot is offline
 
Join Date: Apr 2007
Location: Haifa, Israel
Posts: 246
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

And that's exactly why we are fortunate to have you here

Many thanks, GameWizard, from the bottom of my heart.

Quote:
Originally Posted by GameWizard View Post
No Php required here, just simple HTML coding and some mind power and logic.
Reply With Quote
  #6  
Old 06-02-2008, 08:11 AM
GameWizard's Avatar
GameWizard GameWizard is offline
 
Join Date: Apr 2004
Location: Vancouver, BC
Posts: 319
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I might be mistaken, but the code i posted above may actually be showing 2 avatars for those who have no profile picture, and have not selected a gender. Assuming you haven't already forced your previously registered members to do select a field. In case you do notice this problem, the code below should correct that problem.

HTML Code:
<if condition="$prepared['profilepicurl']">

<td id="profilepic_cell" class="tborder alt2">
<img src="$prepared[profilepicurl]" $prepared[profilepicsize] alt="<phrase 1="$prepared[username]">$vbphrase[xs_picture]</phrase>" />
<else />
<if condition="$userinfo[field12]==Male">
<img src="http://www.your-domain.com/images/Default-Male-Pic.gif">
<else />
<if condition="$userinfo[field12]==Female">
<img src="http://www.your-domain.com/images/Default-Female-Pic.gif">
<else />
<img src="http://www.your-domain.com/images/no-gender-pic.gif">
</if>
</if>

</td>
</if>
Reply With Quote
  #7  
Old 06-02-2008, 08:56 AM
shlomot's Avatar
shlomot shlomot is offline
 
Join Date: Apr 2007
Location: Haifa, Israel
Posts: 246
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You are something else Thanks for your second-to-none support.
Reply With Quote
  #8  
Old 11-22-2008, 12:41 PM
ReCom ReCom is offline
 
Join Date: Mar 2008
Posts: 97
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

May I humbly suggest my mod Gender Bit to show the default profile pictures for male/female?

The mod is mainly for showing a small symbol in postbit indicating the poster's gender but the new version (1.0.2) also takes care of default avatar.

Enjoy!
Reply With Quote
  #9  
Old 11-22-2008, 03:07 PM
shlomot's Avatar
shlomot shlomot is offline
 
Join Date: Apr 2007
Location: Haifa, Israel
Posts: 246
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks a lot for a great mod. Implemented successfully on vb3.8 beta 3 as well.

My comments, requests, voting, and nominations are placed here.

Quote:
Originally Posted by ReCom View Post
May I humbly suggest my mod Gender Bit to show the default profile pictures for male/female?

The mod is mainly for showing a small symbol in postbit indicating the poster's gender but the new version (1.0.2) also takes care of default avatar.

Enjoy!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:26 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04467 seconds
  • Memory Usage 2,254KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (4)bbcode_code
  • (2)bbcode_html
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (9)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete