SweCastel
08-19-2011, 04:48 PM
Hi,
After the 4.1.5 update I do got error in my phpscript who writes out the requested calendar events.
It did work perfect before the update. I have tried fix it myself. But with no luck.
I do attatch the code and the a screen shot of the error.
ob_start();
// %d
$calendarid = 14;
$show_count = 50;
$query = sprintf("SELECT * FROM ".TABLE_PREFIX."event WHERE visible = 1 AND calendarid = $calendarid 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("Den %s",date('jS M Y',$event['dateline_from']));
} else {
$format = sprintf("Fr?n %s till %s",date('jS M Y',$event['dateline_from']),date('jS M Y',$event['dateline_to']));
}
$output_bits .= sprintf('
<div class = "cms_widget_post_bit"><h4 class="cms_widget_post_header"><a href="calendar.php?do=getinfo&e=%d">%s</a></h4>
<p class="cms_widget_post_content">%s</p>
</div>
',$event['eventid'],$event['title'],$format);
}
$output = $output_bits;
ob_end_clean();
Thanks
Daniel
EDIT: I did fix it by deleting the old static page, and creating a new one. Then it did work!
After the 4.1.5 update I do got error in my phpscript who writes out the requested calendar events.
It did work perfect before the update. I have tried fix it myself. But with no luck.
I do attatch the code and the a screen shot of the error.
ob_start();
// %d
$calendarid = 14;
$show_count = 50;
$query = sprintf("SELECT * FROM ".TABLE_PREFIX."event WHERE visible = 1 AND calendarid = $calendarid 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("Den %s",date('jS M Y',$event['dateline_from']));
} else {
$format = sprintf("Fr?n %s till %s",date('jS M Y',$event['dateline_from']),date('jS M Y',$event['dateline_to']));
}
$output_bits .= sprintf('
<div class = "cms_widget_post_bit"><h4 class="cms_widget_post_header"><a href="calendar.php?do=getinfo&e=%d">%s</a></h4>
<p class="cms_widget_post_content">%s</p>
</div>
',$event['eventid'],$event['title'],$format);
}
$output = $output_bits;
ob_end_clean();
Thanks
Daniel
EDIT: I did fix it by deleting the old static page, and creating a new one. Then it did work!