![]() |
answered my own question sorta
Please test this version out i beleive it account for DST and time zones Code:
ob_start(); |
Just tried tomsch's last version and the dates are showing correctly.
|
Guys, is there a way I can show a link at the end of the widget that says "More..." and it has a link to my calendars?
|
1 Attachment(s)
I have tried all the ones everyone has posted and can't get ant to show at all. just nothing. I can switch it to text and it will show it then, as text of couse, but when set to php I get nothing..
Attachment 129072 |
All installed and working correctly
Installed as per the code in tomsch's post |
Quote:
PHP Direct Execution widget and paste the code in my earlier post |
I'm after showing dates & times in English.....this is the current code in use:
ob_start(); // %d $show_count = 5; $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("<b>Am:</b> %s", vbdate(VB::$vbulletin->options['dateformat'],$event['dateline_from'])); } else { $format = sprintf("<b>Vom:</b> %s<br /><b>Bis:</b> %s", vbdate(VB::$vbulletin->options['dateformat'] . ' ' . VB::$vbulletin->options['timeformat'],$event['dateline_from']), vbdate(VB::$vbulletin->options['dateformat'] . ' ' . VB::$vbulletin->options['timeformat'],$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 |
Quote:
https://vborg.vbsupport.ru/showpost....&postcount=211 |
Alas, this code shows up all the old data which i dont want displayed
|
Quote:
|
All times are GMT. The time now is 08:18 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|