PDA

View Full Version : reading the vbulletin dateline ?


Vaupell
02-07-2009, 08:19 PM
When importing the dataline from post
i have no clue how to read it..

made a test post on my dev board and the dev line came up like this

1234043899

hehe dosent make sense to me, can someone help me out "converting"
this to a human date/time

im guessing its the timestamp of some sort, or is it a ID reference to another
timestamp in the db somewhere ? ;)

Lynne
02-07-2009, 08:26 PM
See this - https://vborg.vbsupport.ru/showthread.php?t=204053&highlight=joindate

Vaupell
02-07-2009, 09:00 PM
hmmm help me out a little im a little retard when it comes to this :P

anyway tryed this

$content = $db->........ get content from "post" where user search matches..

while ($data = $vbulletin->db->fetch_array($content))
{
$postinfo['date'] = vbdate($this->registry->options['dateformat'],$data['dateline']);
$postinfo['time'] = vbdate($this->registry->options['timeformat'],$data['dateline']);
$postdateline = $postinfo['date'] .' '. $postinfo['time'];
print_cells_row(array("$data[username]", "$userdataline", ......etc.......)
}


but im just getting a error =
Fatal error: Using $this when not in object context in (linkto error file...)

hmm need it to run each time i print a new row.
and update content from each dateline.


EDIT gonna try replaceing $this with $db

--------------- Added 1234047786 at 1234047786 ---------------

HAHA IT WORKED..

TX again lynne.. your my #1 favorite in here.

Dismounted
02-09-2009, 05:16 AM
As you have discovered, the $this keyword only exists when you are inside an object. You should be replacing $this->registry with $vbulletin.