在ajax-event-calendar的输出中显示“places”

时间:2013-08-20 06:41:01

标签: wordpress wordpress-plugin

我搜索了“ajax-event-calendar”支持论坛和FAQ.But,还没有得到解决方案。 我想在输出中显示场地细节。 ajax-event-calendar

1 个答案:

答案 0 :(得分:0)

  1. 我自己得到了解决方案。转到插件文件夹 - > ajax事件 日历 - > ajax-event-calendar.php - >行号820

    function 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){     全球$ wpdb;     $ id1 = $ row-> id;     // echo $ id1;         $ result1 = $ wpdb-> get_results(“SELECT venue FROM wp_aec_event WHERE id ='$ id1'”);         foreach($ result1 as $ result2){             $ venue_name = $ result2->场地;         }         // 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;
    

    }

  2. 必须将代码包含在星空中以便进行场地显示。