PDA

View Full Version : Simple Request


Knoman
05-17-2001, 04:40 AM
this should be simple for you guys.... but i'm not a php expert.

you see (right under the avatars) where it says Registered: (registration date). how would i change it from when a person registered to the number of days since he/she registered?

Overgrow
05-17-2001, 04:06 PM
Didn't test this, may not work the first time :D

find in showthread:

$userjoindate=date($registereddateformat,$userinfo[joindate]+(($timeoffset+$bbtimezoneoffset)*3600));


change to:

$userjoindate=(($timenow - ($userinfo[joindate]+(($timeoffset+$bbtimezoneoffset)*3600))) / 86400)." days";

Knoman
05-17-2001, 04:11 PM
cool.... thanks man. :)

Knoman
05-17-2001, 04:26 PM
actually.... i cant find that in showthread.... are you sure it's there?

Overgrow
05-17-2001, 04:47 PM
It may be slightly different depending on what version you are running. Just search for $userjoindate and that should be the only place you find it.

There was a mistake in that first code, instead replace it with:


$userjoindate=((time() -?($userinfo[joindate]+(($timeoffset+$bbtimezoneoffset)*3600)))?/?86400)."?days";


Still not tested though, just saw an error.

Knoman
05-17-2001, 06:07 PM
i'm using rc3 and i still cant find it.

tubedogg
05-17-2001, 06:37 PM
try $post[joindate] instead ;)

Overgrow
05-17-2001, 07:24 PM
Oops forgot my standard disclaimer:

I don't run 2.x, I doubt I will ever run 2.x, I just own the code for reference. Sorry, seems that variable changed in RC3 which I haven't downloaded yet.

thanks td

Knoman
05-17-2001, 11:56 PM
thanks for the help..... but how would i use $post[joindate]

Knoman
05-18-2001, 01:23 AM
never mind... i've found an alternative. i'v change in post bits

registered: $joindate.........

to

registered: $jointime

i then edited showthread from

$jointime = (time() - $post[joindate]) / 86400;

to

$jointime = round ((time() - $post[joindate]) / 86400, 0);

method84
05-30-2001, 01:17 PM
I am new to PHP...where would I edit this info? what file? Thanks.