The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Upcoming Events Details »» | |||||||||||||||||||||||||||
Upcoming Events
Released 28/12/2009 By Vikas - http://www.ngcoders.com Installation
PHP Code PHP Code:
Screenshots
Show Your Support
|
2 благодарности(ей) от: | ||
level8, Toorak Times |
Comments |
#92
|
|||
|
|||
Quote:
Thanks |
#93
|
|||
|
|||
Hi
Firstly, I love the widget and so far it (kind of) works. The small problem I have is that it does not seem to adjust for my Default Time Zone Offset, which is GMT + 10. So the homepage says an event is on the 10th and the calendar says it is on the 11th depending on the time of day you visit the site. Check it out here: http://www.2cv.com.au/content.php and here http://www.2cv.com.au/calendar.php?do=getinfo&e=1 Any fixes anybody ? UPDATE: The answer is in this post: https://vborg.vbsupport.ru/showpost....8&postcount=33 I just replaced the code provided by NGCoders with the code provided by NicForce and all is good! |
#94
|
|||
|
|||
I get the following parsing error
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/rat10541/public_html/forum2010/includes/class_core.php(4033) : eval()'d code on line 14 Can anyone help? |
#95
|
||||
|
||||
Quote:
|
#96
|
|||
|
|||
I'm using a hybrid of NicForce's code (formatted to provide the date format that I want), but I noticed that if you are not logged on, the dates are 24 hours ahead (so a July 3rd event will show on July 4), but if you log on, the dates are correct.
here is my code, but I still can figure this out. I don't see anything that tells me to be logged in or not. ob_start(); // %d $show_count = 15; $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)) { $tz_offset = 86400; if($event['dateline_to'] == 0 ) { $format = sprintf("On %s", vbdate(VB::$vbulletin->options['dateformat'],$event['dateline_from']+$tz_offset)); } else { $format = sprintf("From %s to %s", vbdate(VB::$vbulletin->options['dateformat'],$event['dateline_from']), vbdate(VB::$vbulletin->options['dateformat'],$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 in advance. |
#97
|
|||
|
|||
Not that I really understand anything of this, but the major difference between the original code and NicForce's is that the code adds +1 to the date from and the date to. It seems you do not make a time adjustment like that, if I look over your code (not that I understand the coding).
I set it at +1 although my GMT = +10. Maybe the +1 refers to a date (a day) and not an hour. I also found that when you use an event which covers more than one day, you might have to be creative with the begin and end dates. |
#98
|
|||
|
|||
You are correct, I do not use the plus one, because that was giving me the reverse effect.
|
#99
|
||||
|
||||
Seems to be working for me, thank you!
|
#100
|
|||
|
|||
I tried this widget using the default code at Post #1. Setting an event say from 2 April 2010 to 4 April 2010; when 2 April comes (ie today) the whole event no longer appears.
Shouldn't it only disappear after 4th april? |
#101
|
|||
|
|||
Quote:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|