It would be really handy if the main vbookie display showed times as well as dates under the
Added,
Open Until and
Payouts After.
Actually, even better, if it's today's date, it should only show the time, otherwise it should show the date.
Anybody know which template I'd need to play with to get this done? I'd be willing to give it a try myself and post my findings here.
UPDATE: Ok, I'm 99% sure I'd need to edit the vbookie.php file to accomplish this and this is where I believe it needs to be done:
Code:
$item['created'] = vbdate($vbulletin->options['dateformat'],$item['item_created']);
$item['openuntil'] = vbdate($vbulletin->options['dateformat'],$item['item_open_until']);
$item['payafter'] = vbdate($vbulletin->options['dateformat'],$item['item_pay_after']);
eval('$betitembits .= "' . fetch_template('vbookie_main_items_bit') . '";');
That starts at line 355 in the file. I think that my next step would be an IF statement to evalutate $today and compare it to $item['openuntil'], etc...
Any help here?
2ND Update: Ok, I was on a mission. This is what I came up with. I really was only interested in showing the
Open Until time on open items.
It may not be elegant, but I replaced line 356 which was this:
Code:
$item['openuntil'] = vbdate($vbulletin->options['dateformat'],$item['item_open_until']);
with this:
Code:
if ($item['item_open_until'] < TIMENOW)
{
$item['openuntil'] = vbdate($vbulletin->options['dateformat'],$item['item_open_until']);
}
else
{
$item['openuntil'] = vbdate($vbulletin->options['dateformat'],$item['item_open_until']) . " @ " . vbdate($vbulletin->options['timeformat'],$item['item_open_until']);
}
Well, it does the job that I wanted, but it kinda messes up the spacing a bit, which I can live with. Also, it doesn't bother to show the time unless the item is still open.
I hope someone else can find this to be a useful modification. Any and all suggestions are more than welcome.
giz