我搜索了“ajax-event-calendar”支持论坛和常见问题解答。但是,还没有得到解决方案。我想在输出中显示场地详细信息。 ajax 事件日历
问问题
178 次
1 回答
0
我自己得到了解决方案。转到插件文件夹 -> ajax 事件日历 -> ajax-event-calendar.php -> 行号。820
函数 render_eventlist_events($events, $whitelabel, $limit) { usort($events, array($this, 'array_compare_order')); $rows = $this->convert_array_to_object($events); $out = ''; foreach ($rows as $count => $row) { global $wpdb; $id1 = $row->id; //回显$id1; $result1 = $wpdb->get_results("选择场地从 wp_aec_event WHERE id ='$id1'"); foreach ( $result1 as $result2 ) { $venue_name = $result2->venue; } //if ($count < $limit) { if (!$limit || $count < $limit) {
// split database formatted datetime value into display formatted date and time values $row->start_date = $this->convert_date($row->start, AEC_DB_DATETIME_FORMAT, AEC_WP_DATE_FORMAT); $row->start_time = $this->convert_date($row->start, AEC_DB_DATETIME_FORMAT, AEC_WP_TIME_FORMAT); $row->end_date = $this->convert_date($row->end, AEC_DB_DATETIME_FORMAT, AEC_WP_DATE_FORMAT); $row->end_time = $this->convert_date($row->end, AEC_DB_DATETIME_FORMAT, AEC_WP_TIME_FORMAT); // link to event $class = ($whitelabel) ? '' : ' ' . $row->className; $out .= '<span class="fc-event-time">'; $out .= $row->start_date; if (!$row->allDay) { $out .= ' ' . $row->start_time; } $out .= '</span>'; $out .= '<div class="fc-event' . $class . '" onClick="jQuery.aecDialog({\'id\':' . $row->id . ',\'start\':\'' . $row->start . '\',\'end\':\'' . $row->end . '\'});">'; $out .= '<div class="fc-event-title">' . $this->render_i18n_data($row->title) . '</div>'; echo '<script type="text/javascript">'; echo 'if ($(window).width() < 980) {'; $out .= '<div class="fc-event-mobile">' . $row->start_time . ' | ' . $venue_name . '</div>'; echo '}'; echo '</script>'; $out .= '</div>'; } } return $out;
}
必须在星号中包含代码以进行场地显示。
于 2013-08-21T13:15:22.193 回答