This is if you want an external link added (as well as a new calendar icon that is not a link itself... perhaps a bit more 'pleasing to the eye' to some (I also edited out the 'On' preceeding the date because it bugged me

)
PHP Code:
ob_start();
global $db,$vbulletin;
$mydate = mktime(0, 0, 0, date("m"), date("d")-1, date("Y"));
$calendarid="1";
$show_count =6;
$query = sprintf(" SELECT * FROM ".TABLE_PREFIX."event
WHERE visible = 1
AND calendarid='".$calendarid."'
AND (dateline_from >= '$mydate' || (dateline_from >= '$mydate' AND dateline_to <= '$mydate' ) || ('$mydate' BETWEEN dateline_from AND dateline_to))
ORDER BY dateline_from ASC LIMIT $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("%s",vbdate('m/d/Y',$event['dateline_from'],false,true,false,true));
} else {
$format = sprintf("From %s to %s",vbdate('m.d',$event['dateline_from'],false,true,false,true),vbdate('m.d',$event['dateline_to'],false,true,false,true));
}
$output_bits .= sprintf('
<div class="cms_widget_post_bit">
<h4 class="cms_widget_post_header">
<table>
<tbody>
<tr>
<td><img src="images/*****/cal.png" align:"center"=""
v-align:"middle"=""> </td>
<td><a href="calendar.php?do=getinfo&e=%d">%s</a><br>
<small><small><a href="http://*********">External Link</a></small></small>
<p class="cms_widget_post_content">%s</p>
</td>
</tr>
<tr align="center">
<td colspan="2" style="vertical-align: top;">
<h4 class="cms_widget_post_header"><img alt="line"
src="images/*****/hz-line.png" align="middle"></h4>
</td>
</tr>
</tbody>
</table>
</h4>
</div>
',$event['eventid'],$event['title'],$format); }
$output = $output_bits;
ob_end_clean();
Also attaching new calendar image and a 'shorter' hz-line image as the previous one was too wide to display correctly in the widget when on certain size sidebars/columns