Hey,
I have another problem. I use this string for the date:
PHP Code:
'date' => date("F j, Y, g:i a",$News['dateline']),
I wrote it in this code part:
PHP Code:
// ---------------------------------------------------
// FUNCTION: output_NewestThreads
// DETAIL: Outputs X newest threads ordered by
// start date descending. $a
// specifies amount to show (Default 5)
// and $f can specify certain forums
// to grab from (1,3,4), by default it pulls
// from all forums.
// ---------------------------------------------------
function output_NewestThreads($a = 5,$f = ""){
global $db, $Data, $vbulletin;
// Define amount to show
$Amount = ($a)? intval($a) : 5;
// Define Forum(s) To Pull From
$Forums = ($f)? $f: '';
$SQL = '';
if($Forums){
$SQL = " where forumid in({$Forums})";
}
// Load Template
$Template = LoadTemplate("newest_threads.html");
// Collect Data
$NewestThreads = $db->query("select * from ".TABLE_PREFIX."thread{$SQL} order by dateline desc limit 0,$Amount");
while($Thread = $db->fetch_array($NewestThreads)){
$Data .= ParseTemplate($Template,
array(
'threadid' => $Thread['threadid'],
'threadname' => $Thread['title'],
'postuserid' => $Thread['postuserid'],
'postusername' => $Thread['postusername'],
'replies' => vb_number_format($Thread['replycount']),
'views' => vb_number_format($Thread['views']),
'lastposter' => $Thread['lastposter'],
'date' => date("j. F Y, H:i",$News['dateline']),
)
);
}
doOutput();
}
But the result only shows:
1. January 1970, 01:00 Not the actual date!?
Why?
Thanks for help!