Zeile 6 | Zeile 6 |
---|
* Website: http://www.mybboard.net * License: http://www.mybboard.net/about/license *
|
* Website: http://www.mybboard.net * License: http://www.mybboard.net/about/license *
|
* $Id: calendar.php 4081 2008-08-08 01:47:02Z Tikitiki $
| * $Id: calendar.php 4269 2008-11-13 05:48:19Z Tikitiki $
|
*/
define("IN_MYBB", 1);
| */
define("IN_MYBB", 1);
|
Zeile 14 | Zeile 14 |
---|
$templatelist = "calendar_weekdayheader,calendar_weekrow_day,calendar_weekrow,calendar_eventbit_public,calendar_eventbit_private,calendar"; $templatelist .= ",calendar_weekview_day,calendar_weekview_day_event,calendar_mini_weekdayheader,calendar_mini_weekrow_day,calendar_mini_weekrow,calendar_mini,calendar_weekview_month,calendar_weekview,calendar_eventbit,calendar_addeventlink";
|
$templatelist = "calendar_weekdayheader,calendar_weekrow_day,calendar_weekrow,calendar_eventbit_public,calendar_eventbit_private,calendar"; $templatelist .= ",calendar_weekview_day,calendar_weekview_day_event,calendar_mini_weekdayheader,calendar_mini_weekrow_day,calendar_mini_weekrow,calendar_mini,calendar_weekview_month,calendar_weekview,calendar_eventbit,calendar_addeventlink";
|
$templatelist .= ",calendar_event_editbutton,calendar_event_modoptions,calendar_event,calendar_dayview_event,calendar_dayview,codebuttons,smilieinsert,calendar_editevent";
| $templatelist .= ",calendar_event_editbutton,calendar_event_modoptions,calendar_event,calendar_dayview_event,calendar_dayview,codebuttons,smilieinsert,calendar_editevent,calendar_dayview_birthdays_bday,calendar_dayview_birthdays,calendar_dayview_noevents,calendar_dayview_noevents";
|
require_once "./global.php";
| require_once "./global.php";
|
Zeile 1793 | Zeile 1793 |
---|
// So now we have the start day of this week to show $start_day = $day-$php_weekday; $mybb->input['week'] = gmmktime(0, 0, 0, $month, $start_day, $year);
|
// So now we have the start day of this week to show $start_day = $day-$php_weekday; $mybb->input['week'] = gmmktime(0, 0, 0, $month, $start_day, $year);
|
| } else { $mybb->input['week'] = (int)str_replace("n", "-", $mybb->input['week']);
|
} // This is where we've come from and where we're headed
| } // This is where we've come from and where we're headed
|
Zeile 1893 | Zeile 1897 |
---|
{ // Event runs all day if($start_time == 0000)
|
{ // Event runs all day if($start_time == 0000)
|
{ $time_period = $lang->all_day; }
| { $time_period = $lang->all_day; }
|
else { $time_period = $lang->starts.gmdate($mybb->settings['timeformat'], $event['starttime_user']);
| else { $time_period = $lang->starts.gmdate($mybb->settings['timeformat'], $event['starttime_user']);
|
Zeile 2060 | Zeile 2064 |
---|
$month_start_weekday = gmdate("w", gmmktime(0, 0, 0, $month, $calendar['startofweek']+1, $year)); // This is if we have days in the previous month to show
|
$month_start_weekday = gmdate("w", gmmktime(0, 0, 0, $month, $calendar['startofweek']+1, $year)); // This is if we have days in the previous month to show
|
if($month_start_weekday != $weekdays[0])
| if($month_start_weekday != $weekdays[0] || $calendar['startofweek'] != 0)
|
{ $day = gmdate("t", gmmktime(0, 0, 0, $prev_month['month'], 1, $prev_month['year'])); $day -= array_search(($month_start_weekday), $weekdays);
| { $day = gmdate("t", gmmktime(0, 0, 0, $prev_month['month'], 1, $prev_month['year'])); $day -= array_search(($month_start_weekday), $weekdays);
|
Zeile 2100 | Zeile 2104 |
---|
{ $weekday_name = fetch_weekday_name($weekday); eval("\$weekday_headers .= \"".$templates->get("calendar_weekdayheader")."\";");
|
{ $weekday_name = fetch_weekday_name($weekday); eval("\$weekday_headers .= \"".$templates->get("calendar_weekdayheader")."\";");
|
| } // Fix offset for Start Of Week being Saturday if($calendar_month == $prev_month['month'] && $calendar['startofweek'] > 0) { $day -= 7; // Lets make sure we don't have a whole extra column for the last month if($prev_month_days-7 >= ($day-1)) { $day += 7; }
|
}
for($row = 0; $row < 6; ++$row) // Iterate weeks (each week gets a row) { foreach($weekdays as $weekday_id => $weekday)
|
}
for($row = 0; $row < 6; ++$row) // Iterate weeks (each week gets a row) { foreach($weekdays as $weekday_id => $weekday)
|
{
| {
|
// Current month always starts on 1st row if($row == 0 && $day == $calendar['startofweek']+1) {
| // Current month always starts on 1st row if($row == 0 && $day == $calendar['startofweek']+1) {
|
Zeile 2163 | Zeile 2179 |
---|
foreach($events_cache["$day-$calendar_month-$calendar_year"] as $event) { $event['eventlink'] = get_event_link($event['eid']);
|
foreach($events_cache["$day-$calendar_month-$calendar_year"] as $event) { $event['eventlink'] = get_event_link($event['eid']);
|
$event['name'] = htmlspecialchars_uni($event['name']); $event['fullname'] = $event['name'];
| $event['fullname'] = htmlspecialchars_uni($event['name']);
|
if(my_strlen($event['name']) > 15) { $event['name'] = my_substr($event['name'], 0, 15) . "...";
|
if(my_strlen($event['name']) > 15) { $event['name'] = my_substr($event['name'], 0, 15) . "...";
|
}
| } $event['name'] = htmlspecialchars_uni($event['name']);
|
if($event['private'] == 1) { $event_class = " private_event";
| if($event['private'] == 1) { $event_class = " private_event";
|
Zeile 2183 | Zeile 2199 |
---|
} eval("\$day_events .= \"".$templates->get("calendar_eventbit")."\";"); }
|
} eval("\$day_events .= \"".$templates->get("calendar_eventbit")."\";"); }
|
}
| }
|
}
// Birthdays on this day?
| }
// Birthdays on this day?
|
Zeile 2202 | Zeile 2218 |
---|
}
$day_link = get_calendar_link($calendar['cid'], $calendar_year, $calendar_month, $day);
|
}
$day_link = get_calendar_link($calendar['cid'], $calendar_year, $calendar_month, $day);
|
|
|
// Is the current day if($day.$calendar_month.$year == $today && $month == $calendar_month) {
| // Is the current day if($day.$calendar_month.$year == $today && $month == $calendar_month) {
|