PDA

View Full Version : Join Date on Custom Template


evenmonkeys
04-03-2006, 07:02 AM
I've read through a countless number of threads concerning this, but I am just not understanding how to do it. How would I get the correct join date to show up? It says 1139173588, and I can't get it to convert over.

Plugins / products only if possible. Please help. >_<;

evenmonkeys
04-04-2006, 04:32 PM
Help meeeee.

majorxp
04-04-2006, 06:23 PM
I'm not an expert...but That is a unix timestamp.

Google "UNIX timestamp to System.DateTime" and you should find what you are looking for.

evenmonkeys
04-05-2006, 06:13 AM
That's not going to help with with vBulletin though. Everything's done different within vBulletin. There's got to be an easy way to do this.

Brad
04-05-2006, 06:30 AM
Use this:

$joindate = vbdate($vbulletin->options['dateformat'], $unixtimestamp);

evenmonkeys
04-05-2006, 06:46 AM
Hmmm... I still can't get it to work...

I'm using this to call for it: $bbuserinfo[joindate]
This is what I have in my plugin...// JOIN DATE & POSTS PER DAY
$vbulletin->userinfo['datejoined'] = vbdate($vbulletin->options['registereddateformat'], $unixtimestamp);
$jointime = (TIMENOW - $vbulletin->userinfo['joindate']) / 86400;How can I make it work? >_<

Andrew K
04-06-2006, 02:42 AM
I'm in desperate need of the previously requested information as well!

Brad
04-06-2006, 04:53 AM
Hmmm... I still can't get it to work...

I'm using this to call for it: $bbuserinfo[joindate]
This is what I have in my plugin...// JOIN DATE & POSTS PER DAY
$vbulletin->userinfo['datejoined'] = vbdate($vbulletin->options['registereddateformat'], $unixtimestamp);
$jointime = (TIMENOW - $vbulletin->userinfo['joindate']) / 86400;How can I make it work? >_<
You have to change things to suit your needs...

The code below will work on any vbulletin .php file or hook location:

$joindate = vbdate($vbulletin->options['dateformat'], $vbulletin->userinfo['joindate']);
$jointime = (TIMENOW - $vbulletin->userinfo['joindate']) / 86400;

evenmonkeys
04-06-2006, 05:32 AM
I have no idea what I did... but I'm not going to touch it ever again. I got it working, but it was slightly different than what you gave me. In any case, I appreciate you pushing me in the right direction, Brad.