本文介绍了如何添加图像到特定的事件,jquery完整日历的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有wp自定义的帖子类型,并且有自定义的分类标准,其中有一个额外的字段,它是表示分类标准的图标。所以我可以查询从wpdb和通过所有必要的东西jQuery完整的日历使用JSON。

但由于目前它没有imgage字段,因此无法通过feed显示图像src。 Currrenlt它有标题,网址,start_date,end_date和其他几个,但它没有图像。

我的要求是:每个事件属于特定类别,并且每个类别有它自己的图像/图标,所以我不想在日历上显示evnent标题,我只想显示它的类别图像



如下所示:

$ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $' 'image'=> $ img_var,
'start'=> $ stime,
'textColor'=>'#757770',
'backgroundColor'=>'#e8e8e8 '
);

我知道jquery完整日历中没有图像键,但我认为我们可能需要修改fullcalendar。 js文件。



所以问题是有没有人已经修改了这个?

解决方案

我回答了类似的问题 - 我认为它也适用于此:





请看一看,让我知道它是否有帮助!


I have wp custom post type, and have custom taxonomy, there is one extra field in it which is icon that represents of the taxonomy.

So I can query from wpdb and pass all th necessry stuffs to jquery full calendar using json.

But cant display image src through feed as currently it doesnt have imgage field. Currrenlt it has title, url, start_date, end_date and few others but it lacks image.

My requirement is: each event falls to specific category, and each category has its own image/icon, so rather than displaying evnent title on calendar, i just want to display its category's image

I was wonderirng if it like as follows:

$jsonevents[] = array(
            'title' => $new_term,
            'image'=> $img_var,
            'start'  => $stime,
            'textColor' => '#757770',
            'backgroundColor' =>'#e8e8e8'
           );

I know there is no image key in jquery full calendar but i think we may need to modify fullcalendar.js file.

So question is is there anyone who already modified this?

解决方案

I answered something similar a while back - I think it applies here too:

full calendar - associate clickable icons with events?

Take a look and let me know if it helps!

这篇关于如何添加图像到特定的事件,jquery完整日历的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-29 12:06
查看更多