The solution was simple. Thank you!
This "lite" version is what I applied, with slight modifications to reduce the text size, eliminate the images/missing image errors, and eliminate the misbehaving single date field.
I have only had my VB forum license for a week, but have learned so much from these forums that has helped me customize and configure it.
Thanks to all
PHP Code:
ob_start();
// %d
$show_count = 4;
$query = sprintf("SELECT * FROM ".TABLE_PREFIX."event WHERE visible = 1 AND (dateline_from > '%d' || ( dateline_from < '%d' AND dateline_to > '%d' )) ORDER BY dateline_from ASC LIMIT %d",TIMENOW,TIMENOW,TIMENOW,$show_count);
$event_get = vB::$db->query_read($query);
$output_bits = '';
while($event = vB::$db->fetch_array($event_get)) {
if($event['dateline_to'] == 0 )
{
$format = sprintf(" ");
// $format = sprintf("On %s",date('jS M Y',$event['dateline_from'])); <-- broken/disabled
} else {
$format = sprintf("From %s to %s",date('jS M Y',$event['dateline_from']),date('jS M Y',$event['dateline_to']));
}
$output_bits .= sprintf('
<div class = "cms_widget_post_bit"><center><a href="calendar.php?do=getinfo&e=%d"><h4 class="cms_widget_post_header"><font size="2">%s</font></a></h4>
<p class="cms_widget_post_content"><font size="1">%s </font></p><p><font size="1"> </font></p></center>
</div>
',$event['eventid'],$event['title'],$format);
}
$output = $output_bits;
ob_end_clean();
return $output;