Go Back   vb.org Archive > vBulletin Modifications > Archive > Modification Graveyard
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Image Gender In Postbit Details »»
Image Gender In Postbit
Version: 1.00, by tnguy3n tnguy3n is offline
Developer Last Online: Sep 2010 Show Printable Version Email this Page

Category: Show Thread Enhancements - Version: 3.0.0 Rating:
Released: 03-25-2004 Last Update: Never Installs: 39
 
No support by the author.

/*-----------------------------------------------------------------------*\
# Image Gender in postbit for vb3 gold
#
# This hack adds one's gender and it shows in postbit
/*-----------------------------------------------------------------------*\

Query to run: 1
File modification: 3
Template modication: 2
New Templates: 1
(estimate hack time: 4-5 mins)

Note: 2 gender images ain't created by me, found it at phpbb way back then.
/*-----------------------------------------------------------------------*\

To show gender in postbit, go to User CP => Edit Profile , scroll down to Gender option and select a gender or leave it blank if don't wanna show it.

Live Demo: http://all4actions.net , click on a thread to see it in action.

(adding gender in User Profile later, gotta run for class) :ermm:

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 03-26-2004, 09:39 PM
lasto lasto is offline
 
Join Date: Jan 2002
Posts: 1,514
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

how do i add more options to this

u have two male and female but working upon same concept i could use this for me clan site so they can choose what team they prefer to play on so i need 3 options really as we have 3 teams
Reply With Quote
  #3  
Old 03-26-2004, 09:52 PM
ryancooper ryancooper is offline
 
Join Date: Jul 2002
Posts: 433
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

can you make this a required field?
Reply With Quote
  #4  
Old 03-26-2004, 11:15 PM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

wow, somthing that can be done by profile fields and template conditional

this is an insanely wonderfull hack


The No hack version of this "hack"
http://www.vbulletintemplates.com/mo...ead.php?t=5957
Reply With Quote
  #5  
Old 03-27-2004, 03:58 AM
tnguy3n's Avatar
tnguy3n tnguy3n is offline
 
Join Date: May 2003
Location: U of I, Iowa
Posts: 846
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by lasto
how do i add more options to this

u have two male and female but working upon same concept i could use this for me clan site so they can choose what team they prefer to play on so i need 3 options really as we have 3 teams

This just give me an idea for vb3 clan (users clans, clan leader, teams, etc). I wonder if anyone works on this project yet or I gonna start it.

lasto, if you want to have 3 options rather than two, open
Code:
	// gender hack 
....
	// end gender hack
and modify it to:
[code]
if ($post[some-constant] == "0")
{
$var= "";
}
else
{
if ($post[some-constant] == "1")
{ $var = "Team1"; }
elseif ($post[some-constant] == "2")
{ $var = "Team2"; }
elseif ($post[gender] == "3")
{ $var = "Team3"; }
}
eval ( '$gender = "' . fetch_template ( 'postbit_genderbit' ) . '" ;' ) ;



Modify the genderbit in profile:
Code:
			<fieldset class="fieldset">
				<legend>Clan</legend>
				<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0" width="100%">
				<tr>
					<td colspan="2">Select your clan (or whatever description).</td>
				</tr>
				<tr>
					<td><select name="some-constant">
					<option value="0" <if condition="$bbuserinfo[some-constant] == Unknown">selected</if>>----</option>
					<option value="1" <if condition="$bbuserinfo[some-constant] == Team1">selected</if>>Team1</option>
					<option value="2" <if condition="$bbuserinfo[some-constant] == Team2">selected</if>>Team2</option>
					<option value="3" <if condition="$bbuserinfo[some-constant] == Team3">selected</if>>Team3</option>
</select></td>
				</tr>
				</table>
			</fieldset>


If you want to use image for clan name, change postbit_genderbit template to:
Code:
<if condition="$post[some-constant] == 1">
<br>
<div class="smallfont">Clan: <img src="./images/folder/$var.gif" alt=""></div>
</if>
<if condition="$post[some-constant] == 2">
<br>
<div class="smallfont">Clan: <img src="./images/folder/$var.gif" alt=""></div>
</if>
<if condition="$post[some-constant] == 3">
<br>
<div class="smallfont">Clan: <img src="./images/folder/$var.gif" alt=""></div>
</if>



Sorry it looks a bit messy, but that's the idea.
Reply With Quote
  #6  
Old 03-27-2004, 04:05 AM
tnguy3n's Avatar
tnguy3n tnguy3n is offline
 
Join Date: May 2003
Location: U of I, Iowa
Posts: 846
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ryancooper
can you make this a required field?
lol... i want my members to choose whether to show their gender or not, but I'll get back to you when i got it tested. (so tired now :tired: )
Reply With Quote
  #7  
Old 03-27-2004, 08:02 AM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Like i said, and showed at vBulletinTemplates. this can be done over and over again for any appication via template conditionals and a user profile filed.
Reply With Quote
  #8  
Old 03-27-2004, 08:53 AM
Gio Takahashi's Avatar
Gio Takahashi Gio Takahashi is offline
 
Join Date: Jul 2003
Location: Cape Coral
Posts: 250
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This hack can be easily done by using the "Custom profile manager".

Really, a waste of effort and unncessary edit.

Reply With Quote
  #9  
Old 03-27-2004, 09:19 AM
Floris Floris is offline
 
Join Date: Jan 2002
Posts: 1,898
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Gio Takahashi
This hack can be easily done by using the "Custom profile manager".

Really, a waste of effort and unncessary edit.

At least users have the choice to do a source code modification or a template tweak. I prefer the template one since it doesn't hack in on upgrades
Reply With Quote
  #10  
Old 03-27-2004, 10:16 AM
gmarik's Avatar
gmarik gmarik is offline
 
Join Date: May 2002
Location: Mocsow
Posts: 1,288
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Woman are always less than men active over the www...
Reply With Quote
Reply


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:34 PM.


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.05051 seconds
  • Memory Usage 2,299KB
  • Queries Executed 23 (?)
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
  • (3)bbcode_code
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)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_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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete