Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases

Reply
 
Thread Tools
Member's Age in Postbit & Getinfo Profile (automatically calculated from birthday) Details »»
Member's Age in Postbit & Getinfo Profile (automatically calculated from birthday)
Version: 1.00, by Erwin Erwin is offline
Developer Last Online: May 2013 Show Printable Version Email this Page

Version: 2.3.x Rating:
Released: 08-07-2002 Last Update: Never Installs: 64
 
No support by the author.

Member's Age in Postbit & Getinfo Profile - by Dr. Erwin Loh
--------------------------------------------------------------------------

I requested this a while back. Since no one has released a hack like this, I worked out how to do it.

NOTE: This hack automatically shows the age of the person calculated from the birthday entered (it's not a separate input). If there is no birthdate or birthyear, the age doesn't show up automatically.

1) Postbit hack
-------------------

This hack basically places the member's age underneath his join date (or wherever you want) in the postbit, like this:


Registered: July 2000
Age: 18
Location: USA
Posts: 102


If the member has not entered his birth-year, then the age will NOT show up at all, like this:


Registered: July 2000
Location: USA
Posts: 102


This hack requires 1 file edit (functions.php), and 1 template edit (postbit).

2) Getinfo Profile hack
----------------------------

This adds the member's age in their profile.

I've added this to the installation text file. It's a matter of editing members.php and the getinfo template.

Installation text file here:

Show Your Support

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

Comments
  #32  
Old 08-25-2002, 07:50 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Tha Rock
ok Very strange I just checked his full profile in adminCP:

1918-06-12

That's what's set for his birthdate which means the 84 is RIGHT but in his PROFILE it says 1969, why does it say that
That's weird, and has nothing to do with my hack. Looks like somewhere along the line something went wrong. My hack just displays the member's age - it doesn't touch the database or make a query.
Reply With Quote
  #33  
Old 08-25-2002, 08:41 AM
PsYc PsYc is offline
 
Join Date: Mar 2002
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks erwin, for the fix works now
Reply With Quote
  #34  
Old 08-25-2002, 09:19 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You're welcome.
Reply With Quote
  #35  
Old 08-27-2002, 01:40 PM
Intex Intex is offline
 
Join Date: Apr 2002
Posts: 576
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great hack, was looking for something like that. Do you know how I can show this on a members page that's outside of vB?
Reply With Quote
  #36  
Old 08-27-2002, 07:35 PM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Intex
Great hack, was looking for something like that. Do you know how I can show this on a members page that's outside of vB?
Outside of vB? That's going to take a major rework of the code (remember, this code uses no queries). I don't know... anyone has any idea?
Reply With Quote
  #37  
Old 09-07-2002, 11:11 AM
PHiXTiT PHiXTiT is offline
 
Join Date: Sep 2002
Posts: 41
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great work! (INSTALLED)

Thanks
Reply With Quote
  #38  
Old 09-07-2002, 03:38 PM
PHiXTiT PHiXTiT is offline
 
Join Date: Sep 2002
Posts: 41
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just noticed that after installing this I had to move the admin/functions.php to a different area within as i lost the profile option in my postbit. No bigee, works great! Thanks
Reply With Quote
  #39  
Old 09-07-2002, 09:16 PM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by PHiXTiT
Just noticed that after installing this I had to move the admin/functions.php to a different area within as i lost the profile option in my postbit. No bigee, works great! Thanks
I have no idea what you just said there, but whatever it is, it's not because of this hack - this hack is placed in the place in functions.php that decides what to put in the postbit - the code of the hack itself is just a simple mathematical calculation that uses up no database query and does not interfere with any other lines of code in functions.php - unless you have another hack in functions.php that uses the same variables.

Bottom line - this hack works fine with no problems - the problem you had (whatever it is) is not because of this hack.
Reply With Quote
  #40  
Old 09-08-2002, 01:19 AM
PHiXTiT PHiXTiT is offline
 
Join Date: Sep 2002
Posts: 41
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well this was the first hack I installed on a clean 2.2.7 board and when modifying the admin/functions.php I lost the profile button on my postbit. I retried it a couple times and same thing.
So I bumped the area to be pasted a couple lines up and all is working great now.
Just so you know my postbit template is highly modified just for looks.
I was just pointing this out so that if others are having any problems in 2.2.7 to try what i did.
Great hack though, comes in handy.
Reply With Quote
  #41  
Old 09-12-2002, 03:20 PM
Buddha Buddha is offline
 
Join Date: Jan 2002
Posts: 314
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

um... i know this is a simple hack, but i'm getting this error...

Quote:
Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/fulldvdr/public_html/admin/functions.php on line 929

Fatal error: Call to undefined function: vbdate() in /home/fulldvdr/public_html/admin/sessions.php on line 403
line 929 is

Quote:
$buffer = str_replace(""", "\"", $buffer);
and line 203 in sessions is the last line in this quote

Quote:
// get formatted date/time
if ($bbuserinfo['lastvisit']) {
$bbuserinfo['lastvisitdate'] = vbdate($dateformat." ".$timeformat,$bbuserinfo['lastvisit']);
???
Reply With Quote
Reply

Thread Tools

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 04:50 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.07944 seconds
  • Memory Usage 2,303KB
  • Queries Executed 25 (?)
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
  • (6)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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