vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=155)
-   -   Show Gender In Postbit (https://vborg.vbsupport.ru/showthread.php?t=97386)

peterska2 10-01-2005 10:00 PM

Show Gender In Postbit
 
This is nice and easy to install and simply shows a small icon next to the online status indicator to show the gender of the user.

The ZIP contains everything you need. There are two sets of images so you can choose your favorite.

I have circled the icons in the screenshot to enable you to see exactly where they are placed.


PLEASE NOTE: As mentioned in the instructions, the names of the images are case sensitive and so MUST be named exactly as you have defined them in the profile field.


Please click install if you have installed this.



Update 1.03: Added Memberlist images. Added instructions for non-standard languages. To upgrade download the upgrade 1.03 zip and follow instructions.

Update 1.02: Fixed an error in the code.

Update 1.01: Added image for undisclosed and changed instructions slighty to reflect this. To update download the 1.01 upgrade zip.

Update: I have added optional instructions to add Gender: before the image

[Note to mods] I have released for 3.0.x and 3.5.x even though it is identical as most people only look at the mods for their version.[/Note to mods]


Important information regarding support - 20/04/06
Due to time constraints and the amount of things that are being planned for future modifications, priority support will now be provided here. Support provided in this thread will be on an as and when basis.

LittleBoy1 10-02-2005 04:53 PM

Thank You very much!! :D

Snake 10-02-2005 05:24 PM

Thanks man. I love it!

Lea Verou 10-02-2005 05:40 PM

It would be nicer I think to have it displayed like the age...
Gender: [icon]

Lea Verou 10-02-2005 05:42 PM

Quote:

Originally Posted by Snake
Thanks man. I love it!

She is not a man!!! :p

(Why dou you think that all the coders are men??? :devious::devious::devious: You, sexists!! :p)

Snake 10-02-2005 05:48 PM

Oh sorry my bad. I don't know why but she sound like a male. :P

peterska2 10-02-2005 05:50 PM

Don't worry about it.

Loukrhtia: Just add Gender:  before the IMG code. It occurs twice in each postbit.

Lea Verou 10-02-2005 05:51 PM

Quote:

Originally Posted by Snake
Oh sorry my bad. I don't know why but she sound like a male. :P

I don't think she'll be pleased to read this :p :p

However I think that you think she sounds like a male because you are used to male coders!

petreska keep up!

Freedom to female admins and female coders! :p :p :p

(j/k)

Lea Verou 10-02-2005 05:53 PM

Quote:

Originally Posted by peterska2
Don't worry about it.

Loukrhtia: Just add Gender:  before the IMG code. It occurs twice in each postbit.

It was a suggestion not a personal request. I prefer to do it on my own so that I learn something more :) I did it on my own in vb 3.0.7 so I don't think it will be more difficult :)

peterska2 10-02-2005 05:59 PM

I've added some further instructions to do this.

Zip updated

Snake 10-02-2005 06:43 PM

Thanks for the update.

Lea Verou 10-02-2005 06:48 PM

petreska I cannot follow your way cause its a greek forum and I can't have greek filenames in the ftp!
So I tried adding this in the proper place:
HTML Code:

<if condition="$post['field5'] & 1">
<div> Φύλο: [img]%22$stylevar%5Bimgdir_misc%5D/male.gif%22[/img]
</if>
<if condition="$post['field5'] & 2">
<div> Φύλο: [img]%22$stylevar%5Bimgdir_misc%5D/female.gif%22[/img]
</if>

but nothing happens... I followed these instructions... I know they are for 3.0.x but as I have seen the postbit hasn't changed that much so they should work...

What am I doing wrong??

peterska2 10-02-2005 06:52 PM

Use this instead
Code:


<if condition="$post['field5'] & 1">
<div> Φύλο: <img src="$stylevar[imgdir_misc]/male.gif" />
</if>
<if condition="$post['field5'] & 2">
<div> Φύλο: <img src="$stylevar[imgdir_misc]/female.gif" />
</if>

That should work

Lea Verou 10-02-2005 06:57 PM

no it didn't.
Also the forum makes the <img> tag [img] for some reason and generally screwed up the code I posted above! It's not like that!
It's like yours but with 2 more </div>

thedvs 10-02-2005 07:19 PM

If a member has no gender set yet, it asks for /images/misc/.gif and leaves a broken image. any way to fix this so no image is shown?

Lea Verou 10-02-2005 07:27 PM

Quote:

Originally Posted by thedvs
If a member has no gender set yet, it asks for /images/misc/.gif and leaves a broken image. any way to fix this so no image is shown?

If the member has no gender set then the condition will be false and nothing should show...
Are you supposing this or you actually have this problem?

thedvs 10-02-2005 07:42 PM

well in IE its showing a broken image and calling .gif

peterska2 10-02-2005 08:05 PM

ok, add another option undisclosed and set that to be the default one.

Then upload this image to the /images/misc folder.

I'll update the instructions and zip file too

Boofo 10-02-2005 08:36 PM

Nice one Kerry-Anne. Clicking install. ;)

Zachery 10-02-2005 08:38 PM

I wasn't going to say anything untill I, just a moment ago looked at your installer for both.. you even use the same wording as me... how awsome of you.

peterska2 10-02-2005 08:38 PM

Thanks :)

Oooooh! I just noticed the bit that tells me who's installed!

peterska2 10-02-2005 08:39 PM

Quote:

Originally Posted by Zachery
I wasn't going to say anything untill I, just a moment ago looked at your installer for both.. you even use the same wording as me... how awsome of you.


Co-incidence? I've never used anyone elses and just rumbled it up myself earlier.

thedvs 10-02-2005 08:40 PM

Thank you that's fixed it.

Zachery 10-02-2005 08:41 PM

Quote:

Originally Posted by peterska2
Co-incidence? I've never used anyone elses and just rumbled it up myself earlier.

So very sure of that.

Boofo 10-02-2005 09:00 PM

Kerry-Anne, shouldn't this:

Quote:

<if condition="$bbuserinfo[fieldx]">
actually be this?

Quote:

<if condition="$post[fieldx]">

peterska2 10-02-2005 09:07 PM

/me hits self on head

Yeah, your right.

Oh well, v1.02 coming up shortly.

Ramsesx 10-08-2005 02:23 AM

I have a german vb setup and used this to try it but it is not working:

PHP Code:

 <div id="postmenu_$post[postid]">
                    <if 
condition="$show['profile']">
                    <
class="bigusername" href="member.php?$session[sessionurl]u=$post[userid]">$post[musername]</a>
                    
$post[onlinestatus]<if condition="$post[field5]"><img src="$stylevar[imgdir_misc]/$post[field5].gif" alt="$post[field5]/></if>
                    <
script type="text/javascript"vbmenu_register("postmenu_$post[postid]"true); </script>
                    <else />
                    
$post[musername]<if condition="$post[field5]"><img src="$stylevar[imgdir_misc]/$post[field5].gif" alt="$post[field5]/></if>
                    </if>
                </
div>
                        <if 
condition="$post['field5'] & 1">
<
divGeschlecht: <img src="$stylevar[imgdir_misc]/keines.gif" />
</if>    
            <if 
condition="$post['field5'] & 2">
<
divGeschlecht: <img src="$stylevar[imgdir_misc]/maennlich.gif" />
</if>
<if 
condition="$post['field5'] & 3">
<
divGeschlecht: <img src="$stylevar[imgdir_misc]/weiblich.gif" />
</if> 


Lea Verou 10-08-2005 04:03 AM

Yep, I tried the same method but it didn't work either :(

Ramsesx 10-08-2005 07:31 AM

Now it is working, I don't no why but it does :) thanks for the nice mod

peterska2 10-08-2005 01:01 PM

Loukrhtia, I've been looking into your problem for the last couple of days and have tried a number of different ways of doing it. However, I am unable to get it to work at all. I am continuing to investigate this and as soon as I have an answer I will let you know.

Lea Verou 10-08-2005 01:32 PM

Quote:

Originally Posted by peterska2
Loukrhtia, I've been looking into your problem for the last couple of days and have tried a number of different ways of doing it. However, I am unable to get it to work at all. I am continuing to investigate this and as soon as I have an answer I will let you know.

Thanks a lot!!! :D

piXelatedEmpire 10-09-2005 04:12 AM

Is there a way to get the gender image to appear before the username?

peterska2 10-09-2005 09:20 PM

Yes. Use this code as the replacement instead of what is in the instructions.

Code:

                                <div id="postmenu_$post[postid]">
                                        <if condition="$show['profile']">
                                        <if condition="$post[fieldx]"><img src="$stylevar[imgdir_misc]/$post[fieldx].gif" alt="$post[fieldx]" /></if>&nbsp;<a class="bigusername" href="member.php?$session[sessionurl]u=$post[userid]">$post[musername]</a>
                                        $post[onlinestatus]
                                        <script type="text/javascript"> vbmenu_register("postmenu_$post[postid]", true); </script>
                                        <else />
                                        <if condition="$post[fieldx]"><img src="$stylevar[imgdir_misc]/$post[fieldx].gif" alt="$post[fieldx]" /></if>&nbsp;$post[musername]
                                        </if>
                                </div>


peterska2 10-12-2005 04:43 PM

Quote:

Originally Posted by peterska2
Loukrhtia, I've been looking into your problem for the last couple of days and have tried a number of different ways of doing it. However, I am unable to get it to work at all. I am continuing to investigate this and as soon as I have an answer I will let you know.

Sorted this out for you.

Use this instead of the code in the install instructions.

Code:

<if condition="$post[fieldx] == 'Greek for Male'"><img src="$stylevar[imgdir_misc]/male.gif" alt="$post[fieldx]"/></if><if condition="$post[fieldx] == 'Greek for Female'"><img src="$stylevar[imgdir_misc]/female.gif" alt="$post[fieldx]" /></if><if condition="$post[fieldx] =='Greek for undisclosed'"><img src="$stylevar[imgdir_misc]/undisclosed.gif" alt="post[fieldx]" /></if>
Place it in the postbit whereever you want it to show.




Update for everyone else, I'm still working on the bells and whistles version. As soon as it is finished I'll send out a memo letting you know.

Lea Verou 10-13-2005 08:28 AM

Thanks a lot!!!!! :D

FROGGYJ 10-16-2005 02:26 AM

hrm having an issue for some reason. Can someone point it out? I seem to get "Male" in there, but I want the image not the text.

Postbit
Code:

<div id="postmenu_$post[postid]">
                                        <if condition="$show['profile']">
                                        <a class="bigusername" href="member.php?$session[sessionurl]u=$post[userid]">$post[musername]</a>
                                        $post[onlinestatus]<if condition="$post[field9]"><img src="$stylevar[imgdir_misc]/$post[field9].gif" alt="$post[field9]" /></if>
                                        <script type="text/javascript"> vbmenu_register("postmenu_$post[postid]", true); </script>
                                        <else />
                                        $post[musername]<if condition="$post[field9]"><img src="$stylevar[imgdir_misc]/$post[field9].gif" alt="$post[field9]" /></if>
                                        </if>
                                </div>

Postbit_Legacy

Code:

<div id="postmenu_$post[postid]">
                                <if condition="$show['profile']">
                                <a class="bigusername" href="member.php?$session[sessionurl]u=$post[userid]">$post[musername]</a><if condition="$post[field9]"><img src="$stylevar[imgdir_misc]/$post[field9].gif" alt="$post[field9]" /></if>
                                <script type="text/javascript"> vbmenu_register("postmenu_$post[postid]", true); </script>
                                <else />
                                $post[musername]<if condition="$post[field9]"><img src="$stylevar[imgdir_misc]/$post[field9].gif" alt="$post[field9]" /></if>
                                </if>
                        </div>

See attachements as well. VB 3.5 Gold.

FROGGYJ 10-16-2005 02:37 AM

weeeee I got it....cause of my new style...had to upload the images to it's misc directory.

Mr Chad 10-16-2005 04:03 AM

LOL, firefox? thats the only thing i hate about firefox if it cant find the image it uses its Alt.

peterska2 10-19-2005 03:03 PM

Updated to version 1.03.

Now with non-standard languages support, memberlist images.

Snake 10-19-2005 06:55 PM

Thanks for the update peterska.


All times are GMT. The time now is 04:46 PM.

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.01396 seconds
  • Memory Usage 1,854KB
  • 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
  • (5)bbcode_code_printable
  • (1)bbcode_html_printable
  • (1)bbcode_php_printable
  • (10)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