vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=192)
-   -   Gender In Postbit (https://vborg.vbsupport.ru/showthread.php?t=117973)

Tanapangarap 09-05-2008 03:33 AM

Now that I updated from 3.6.8 to 3.7.3 only the text "Male" or "Female" will show up instead of the image.

Tanapangarap 09-05-2008 03:38 AM

Figured it out: I right-clicked on the text, chose to "View Image", noticed that the location assigned the icons to the root directory, and so uploaded the icons to the root directory, and now it's working.

Odd that it would do that despite the code specifically instructing the images to be fetched from the images misc. directory, but it's fixed so whatever.

Welshy2008 09-08-2008 11:18 AM

Hi Kerry-Anne,

I cannot get this to work on my forum. 3.6.8 Patch level 2.

If I look at the registration form as if I were to register, There is no Gender option. However, when I look at add a new user in my ACP - the drop down box with the options are there.

I would appreciate your help on this, Please.

With your permission, I will PM you my details.

Many Thanks,

Welshy2008.

Cobro 09-11-2008 01:03 AM

I have made my own image for this and this is how you do it
Code:

POSTBIT TEMPLATE EDIT

-----------

POSTBIT OR POSTBIT_LEGACY
-------

FIND

                                <if condition="$post['age']"><div>$vbphrase[age]: $post[age]</div></if>

ADD BELOW

<if condition="$post[fieldx]">$vbphrase[gender]: <img src="$stylevar[imgdir_misc]/$post[fieldx].png" alt="$post[fieldx]" /></if>

in MEMBERS LIST TEMPLATE EDIT

Code:

In Template memberlist_resultsbit

FIND

<if condition="$show['usertitlecol']"><div class="smallfont">$userinfo[usertitle]</div></if>

AFTER ADD

<if condition="$userinfo[fieldx]"><div class="smallfont">$vbphrase[gender]<img src="$stylevar[imgdir_misc]/$userinfo[fieldx].png" alt="$userinfo[fieldx]" /></div></if>

And i added couple if there are couples on your board :)

and to get it work on vb 3.7.2 in mini stats then you have to find <dd>$prepared[posts]</dd>

and below add

Code:

<if condition="$userinfo[fieldx]"><div class="smallfont"><img src="$stylevar[imgdir_misc]/$userinfo[fieldx].png" alt="$userinfo[fieldx]" /></div></if>
remember to change X for your field number mine is 6

but i hope you like my version of this

Welshy2008 09-11-2008 11:36 AM

Quote:

Originally Posted by Welshy2008 (Post 1617320)
Hi Kerry-Anne,

I cannot get this to work on my forum. 3.6.8 Patch level 2.

If I look at the registration form as if I were to register, There is no Gender option. However, when I look at add a new user in my ACP - the drop down box with the options are there.

I would appreciate your help on this, Please.

With your permission, I will PM you my details.

Many Thanks,

Welshy2008.





Can anyone help me on this please?

Welshy2008 09-14-2008 02:34 PM

No-one?

Welshy2008 09-20-2008 07:26 PM

Such a shame that I couldn't get any help with this - I wanted it too.

Oh well, UNINSTALL it, it is then.

GrendelKhan{TSU 09-22-2008 08:27 AM

installed working

3.7.3

(and yes, why isn't this default to vbulletin?)

steve1966 09-24-2008 09:58 AM

work perfect on 3.73 thank you

jerx 09-30-2008 04:58 PM

This hack is mod is working fine on vb 3.7 pl1.

But I like to place gender in a seperate row. If I add another column according to these instructions, the colors of all columns are not correct any more. I mean the alternating table cells (first col dark color, second col light color, third col dark color, etc).

I have used this code in memberlist_resultsbit:
Code:

<if condition="$userinfo[field5] AND exec_switch_bg()"><td class="$bgclass"><div class="smallfont"><img src="$stylevar[imgdir_misc]/$userinfo[field5].gif" alt="$userinfo[field5]" /></div></td>
</if>
<if condition="$userinfo[field6] AND exec_switch_bg()"><td class="$bgclass"><div class="smallfont"><img src="$stylevar[imgdir_misc]/$userinfo[field6].png" alt="$userinfo[field6]" /></div></td>
</if>

Besides the fact that the gender column (field5) has the wrong color (but columns to the right are alternating), there are also problems with empty fields. If a user has not filled in field5 or field6, that row will have up to 2 columns less that the other rows.

You can avoid missing columns by not using the if condition, but the alternating color problem remains. Hard coding the color (<td class="alt1"> and <td class="alt2") does not help either, because you will have the alternating color problem on the other custom profile fields.

Do you have any solution for this problem?

Problem fixed!

I solved the problem. I also changed the order of other columns and that caused the problem. To avoid missing column cells when a user did not fill in that field, I just added <if condition="exec_switch_bg()"> to the code. For the gender field it looks like this:
Code:

<if condition="exec_switch_bg()"><td class="$bgclass"><div class="smallfont"><img src="$stylevar[imgdir_misc]/$userinfo[field5].png" alt="$userinfo[field5]" /></div></td>
</if>

Obviously you need to change the memberlist header, too. I added the following to memberlist template:
Code:

<td class="thead" nowrap="nowrap">$vbphrase[gender]</td>


All times are GMT. The time now is 01:11 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.01212 seconds
  • Memory Usage 1,746KB
  • 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
  • (6)bbcode_code_printable
  • (1)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