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)
-   -   Gender Image In Postbit (https://vborg.vbsupport.ru/showthread.php?t=97663)

tnguy3n 10-04-2005 10:00 PM

Gender Image In Postbit
 
Gender Image In Postbit
Author: tnguy3n
Demo Site: http://www.vbviet.org

What this mod does is to show user's gender in postbit. Users can choose to show it or not. All is done by template modding.

File mod: 0
Template mod: 1
Plugin: 1
File Uploads: 3 gender images

### UPLOAD gender dir to your /forum/image/gender dir ###

1. Go to AdminCP => User Profile Field Manager => Add New User Profile Field

Profile Field Type: Single Selection Menu

Title: Gender
Description: Tell the world your gender.
Options:
Undisclosed
Male
Female
Set Default: No
Field Editable To User: Yes
Display Page: Edit Profile

Once you got it done, write down your field# . i.e field5

2. Open postbit(_legacy) template,

FIND:
HTML Code:

                                <div>
                                        $vbphrase[posts]: $post[posts]
                                </div>

BELOW, ADD:
HTML Code:

                                <if condition="$post[fieldX] != ''"><div>
                                        Gender: <img src="images/gender/$post[fieldX].gif" title="$post[fieldX]" align="center">
                                </div></if>

<!----- That's it! Enjoy! ----->

FleaBag 10-05-2005 10:44 PM

Hey, I thought this could be done with templates alone?

tnguy3n 10-05-2005 10:52 PM

yup, it's done by template mod.

SnowBot 10-06-2005 07:43 AM

Installed, love the images :) Thanks

cedced 10-12-2005 04:35 PM

lol vietnamese me too :D
http://www.vbviet.org/
Server not found

tnguy3n 10-12-2005 10:30 PM

Quote:

Originally Posted by mini2
I made my own male/female signs (bit like those on toilet doors etc.)

I simply leave it blank if the user is "Undeclared" (which I first put as "Undecided" - Whoops!)

If anyone wants to use them feel free:

nice images, thanks for sharing. :)

tnguy3n 10-12-2005 10:31 PM

Quote:

Originally Posted by cedced
lol vietnamese me too :D
http://www.vbviet.org/
Server not found

try the IP instead. ;)

Boofo 10-12-2005 10:32 PM

Quote:

Originally Posted by mini2
I made my own male/female signs (bit like those on toilet doors etc.)

I simply leave it blank if the user is "Undeclared" (which I first put as "Undecided" - Whoops!)

If anyone wants to use them feel free:

I plan on making mine say "Unsure" as that will prompt them to pick one or the other. ;)

Boofo 10-12-2005 10:33 PM

Quote:

Originally Posted by tnguy3n
try the IP instead. ;)

Shouldn't that be iowa.org? ;)

tnguy3n 10-12-2005 10:39 PM

Quote:

Originally Posted by Boofo
Shouldn't that be iowa.org? ;)

how about vbiowan.org? :D

btw, are you a hawk or cyclone? :ninja:

Boofo 10-12-2005 10:41 PM

Quote:

Originally Posted by tnguy3n
how about vbiowan.org? :D

btw, are you a hawk or cyclone? :ninja:

LOL Yeah, that would work better I think. ;)

It depends really. I've never been partial to either one. I like them both. It keeps me out of trouble that way. How about you, or should I even ask, considering where you are? ;)

FleaBag 10-12-2005 11:19 PM

Sorry! The description says there is 1 file mod?

Works great though! Thanks for the images mini2!

tnguy3n 10-12-2005 11:49 PM

That's a mistake. It should be template. ;)

tnguy3n 10-12-2005 11:56 PM

Quote:

Originally Posted by Boofo
LOL Yeah, that would work better I think. ;)

It depends really. I've never been partial to either one. I like them both. It keeps me out of trouble that way. How about you, or should I even ask, considering where you are? ;)

Well, I'm not into Football much, but I do follow up my score and matches, espcially the one with the Cyclone. The two have been rivals for many years, and the game between them is like one big annual festival. :D

Boofo 10-13-2005 01:31 PM

Quote:

Originally Posted by mini2
Harsh.

;)

But it works. ;)

tnguy3n 10-19-2005 11:54 AM

Did you change XX value in $post[fieldX] to your fieldid?

funinthesun 10-19-2005 02:07 PM

Yep :confused: I'm going to put the code into the postbit template instead of the postbit_legacy template because I think that may be the problem. I had the same situation with the mood hack so I'll give it a try and let you know :)

funinthesun 10-19-2005 03:46 PM

OK, I put the code into the postbit template instead of the postbit_legacy template and it's working fine now. I've also changed the male and female icons and uploaded them here to share with all of you :)

tnguy3n 10-20-2005 12:25 AM

glad it works for you.
instruction says postbit(_legacy), but it's recommended to mod in both template in case you switch from one to another style.

cbr929rrerion 11-05-2005 02:54 AM

I tried this, could not get it to display anything.. I dunno.. I put them in the right catagory, I put the firld..5, and nothing...

cbr929rrerion 11-05-2005 03:08 AM

Fixed it.. it did not work in postbit_legacy but it did in postbit..

Thanks

funinthesun 11-05-2005 07:35 AM

That was the same problem I had :)

Flow Fusion 11-05-2005 09:01 PM

Great hack thanks. Also thanks for the images.

DaXecutioner 11-06-2005 07:28 PM

hi, this feature looks awesome. although i probably wont be installing it (no use for it right now...) i do have some questions. i was hoping you might be able to help with the questions i have here:
https://vborg.vbsupport.ru/showthrea...173#post814173

after reading your post a little more (skimmed it before for some reason) im going to try what you did. thanks!

Rickie3 11-12-2005 06:13 AM

*installed* nice hack thanx

davidw 11-14-2005 12:38 AM

<font color="SeaGreen">* christianb clicks install</font>

I'd like to integrate this somehow with the default avatar hack.

Hornstar 03-25-2006 07:20 AM

I'm gonna try this with 3.5.4 now, see if it still works

however could this be made any better, or is it already really good.

kungfujesus 04-09-2006 03:12 AM

Works great in 3.5.4 but I had to troubleshoot a couple things:
You don't specify wether to change [fieldX] to [field#] or just [#]... I figured out it's [field#].
Secondly, in the directions you state to upload the gender directory to images/gender but at the bottom you state:
1. DON'T FORGET TO UPLOAD gender dir TO YOUR forum/gender OR IT WON'T WORK.

I would change 1. to images/gender instead of forum/gender. I must have missed the original listing where to place the gender directory and put it in forums/gender instead.

Other than that it works fine. Yes I clicked install.
:banana:

defcon_420 04-11-2006 10:38 AM

Nice lil hack "clicks install"

Code:

Find in postbit
<div>
                        $vbphrase[posts]: $post[posts]
</div>

HAHAHA sorry i find it funny, cause just about anyone who has installed any mods in their vb that would be about the first line to go.
By looking at the screen shot it made it easy for me to see where in the code to put it.

Great job!

davidw 04-11-2006 11:56 AM

Quote:

Originally Posted by defcon_420
HAHAHA sorry i find it funny, cause just about anyone who has installed any mods in their vb that would be about the first line to go.

I actually like the post count and thus I kept mine.

nomiqw 05-01-2006 12:39 PM

thnx

cyberbeggar 06-09-2006 03:15 PM

Thx!

Stop 06-09-2006 11:44 PM

Very handy. Installed and worked fine.
Tnx mini2. I used ur images.

Polo 07-06-2006 03:57 PM

will definetly install this hack... thanks

and thank you funinthesun, i like the images you uploaded. Thanks...

hubix 08-08-2006 01:31 PM

Hello!

Quote:

File mod: 0
Template mod: 1
Plugin: 1
File Uploads: 3 gender images
hm, i can?t find a plugin-file in the zip-file i downloaded!?!? is it my mistake or yours??

Rickeo 01-29-2007 09:12 AM

Erm hi on the instructions sheet it says

STEP 3

ADD PHRASE

type: global
varname: gender
Text: Gender

I dont get this bit I have done everything else but I dont get this bit how do u add a phrase??

~Rick~

Hornstar 11-07-2008 08:23 PM

This should be moved to the graveyard as it appears all files/images have been removed.

alpayton 02-03-2009 12:44 PM

Quote:

Originally Posted by hornstar1337 (Post 1661470)
This should be moved to the graveyard as it appears all files/images have been removed.

There's not supposed to be any files to be dl'd...it's a code modification only.


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.01243 seconds
  • Memory Usage 1,794KB
  • 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
  • (1)bbcode_code_printable
  • (2)bbcode_html_printable
  • (11)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (38)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete