vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Member's Age in Postbit & Getinfo Profile (automatically calculated from birthday) (https://vborg.vbsupport.ru/showthread.php?t=42050)

Erwin 09-12-2002 07:33 PM

Well, I can guarantee that this error is not from my hack, but from your mistake, either in applying this hack, or in upgrading to 2.2.7 or some other thing you did. :) Like you said, this hack is as simple as it gets. You can basically uninstall this hack, and do it again, or try this.

Find this bit of code (basically what you posted in your post at the end):

PHP Code:

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

Add this right underneath:

PHP Code:



See if that works. You may have forgotten to close a function somewhere.

Buddha 09-12-2002 09:39 PM

thanks erwin... naw, it's closed up... i just posted those three lines to show which line had the error.

i know it's not your hack (it's unbelievably easy), but thought that maybe you (or someone else) might know.

thanks anyway.

edit... did the file modifications at home and it worked. must have had something to do with the browser based cp that i was using to do the hack at work, cause i did it three times (being very careful) and each time got the same result... ah well, works now... that's all that mattters. thanks.

*clicks installed*

PHiXTiT 09-12-2002 11:28 PM

It worked just fine for me (the users age and all) Except I lost the profile button in my postbit.
For those of you that may run into the same problem here is what I did instead of what was stated to do with the admin/functions.php to solve this issue, I did the following and all is working great on my 2.2.7 Board!

### Open admin/functions.php ###

### Find ###
PHP Code:

if ($post[yahoo]!="") {
            eval(
"\$post[yahooicon] = \"".gettemplate("yahoo")."\";");
        } else {
            
$post[yahoo]="";
        } 

### After add ###
PHP Code:

// Age in postbit - Erwin
        
$bday explode("-",$post[birthday]);
        if (
date("Y")>$bday[0] and $bday[0]>1901 && $bday[0]!='0000') {
            
$useragedate("Y") - ($bday[0]+1); 
            if (
date("m")>$bday[1] OR (date("m")==$bday[1] AND $bday[2]<=date("d"))) {
                
$userage=$userage+1
                } 
           
$age "$userage<br>";
        }
// Age in postbit 

### Save and Close admin/functions.php ###

NuclioN 09-15-2002 04:35 PM

I've found a simple script to echo Roman numbers, i'll attach it.

maybe you can let this work with this mod, would be great. :)

Erwin 09-15-2002 10:23 PM

Mmm... I'll have a look... but wouldn't it be a hassle for members to have to work out what the Roman numerals stand for? My age is VIIVMXCII... ??? :D

NuclioN 09-16-2002 12:07 AM

Fun Erwin ;)

\ \ - Speedy - / / 10-15-2002 02:07 AM

I noticed something, with the Age in the profile thingy, it says

Age: Age:16

How can I make it say

Age: 16

?

Thankx

Erwin 10-15-2002 02:10 AM

Oops.

In members.php, find:

PHP Code:

           $age "Age: $userage<br>"

Replace with:

PHP Code:

           $age "$userage"

This fix only affects this hack if you put it in your Member Profile as in this post (which I've fixed):

https://vborg.vbsupport.ru/showthrea...103#post290103

The hack for the postbit remains unchanged, and works. :)

sunrunner_pei 01-21-2003 06:07 PM

Installed and working on 2.2.9! Excellent!

Tungsten 06-05-2003 02:43 PM

How would I go about adding this to the Admin CP so that when I edit a user's profile I can see their age calculated next to where it shows their birthdate? :D


All times are GMT. The time now is 09:42 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.01241 seconds
  • Memory Usage 1,751KB
  • 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_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (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