I think this hack had great potential as many of us wanted to start building external pages. It's really a shame ZT has abandoned the hack as it was really close to being quite usable. Maybe some of us can get the features we want coded in ourselves...
Im trying to display news items as well as many of us and displaying the date is really essential to a news posting. I mean without a date its really pointless displaying news items.
I wasted about 3 hours trying to format the date properly. I managed to pull the data from the 'dateline' field but when trying to format it with vbdate() is just doesn't do anything. The output is whitespace. Here is the change I made to vbExternal.php:
Code:
while($News = $DB->fetch_array($NewestNews)){
$Data .= ParseTemplate($Template,
array(
'threadid' => $News['threadid'],
'threadname' => $News['title'],
'postuserid' => $News['postuserid'],
'postusername' => $News['postusername'],
'post' => parse_bbcode2($News['pagetext'], 0, 1, 1, 1),
'comments' => vb_number_format($News['replycount']),
'date' => vbdate($vboptions['dateformat'], $News['dateline']),
)
);
}
I added the line in color above. If you add the variable
{date} to your news.html template you should see the properly formatted date...But you don't. I wish I knew what I was missing here.
If you leave the line as just:
Code:
'date' => $News['dateline']),
you will see the data is in fact in the array but it looks like a unix timestamp (kinda): 1125843563
Secondly images posted in articles do not work which for my applications really make the hack unusable.
I think if these 2 issues were cleaned up this hack would be the best and only one of its kind...And extremely useful for many of us. Not sure why the author is releasing the same hack for vb3.5 with these rather minor yet glaring issues but I sure hope someone is willing to pick up the reigns.