now a selector in the template would be great to see only the events of a certain category.
Cause I only know php, not js, is there a easy way to implement that in your code?
or - i’m asking for all of my luck of today at once - is it already implemented?
GREAT!!
it works just “right out of the box”.
thanks a lot.
I just needed to be aware of lower/uppercase for event_option - must not use uppercase (we love that in germany ).
Yes! This does work great! The only way I can think that this would work better is if the for the filter selection menu were populated by reading what categories are available.
Since my client might want to set up a temporary set of categories (e.g. for a time-limited set of events) I’d rather not force them to hire me to manually modify the as described upthread.
Any suggestions on reading from the DB for populating the ?? Or should I give up on that?
Maybe as part of the next version
Standalone version of scheduler has some built-in functionality, which can be used to manipulate with options list, but it requires not so simple coding, to achieve the same in case of plugins.
Nice thread all. I am using some of the tools mentioned in the posts and those are really good but I don’t know where to find the Wordpress company articles for read. We’ll try to throw this a reference on our Wordpress company blog. Ta Wordpress Company
I did one small adjustment to make it independent of the plugin files - so if I need to update DHTMLXscheduler I won’t overwrite the change. In an external javascript file, I added:
[code]jQuery(document).ready(function($){
//Create custom tabs on the top of the calendar for each Sala
scheduler.attachEvent("onTemplatesReady",function(){
//Create the filters for the Calendar by Sala
scheduler._filter_by = '';
scheduler.filter_day = scheduler.filter_week = scheduler.filter_month = function(id){
if (!scheduler._filter_by) return true;
if (scheduler.getEvent(id).sala == scheduler._filter_by) return true;
return false;
};
//Create dropdown menu markup
$dropdown_html = "<select onchange='scheduler._filter_by = this.value;scheduler.setCurrentView(scheduler._date);' class='dropdown'>";
$dropdown_html += "<option value=''>Todos</option>";
$dropdown_html += "<option value='sala_0'>Escuela</option>";
$dropdown_html += "<option value='sala_1'>Circo</option>";
$dropdown_html += "<option value='sala_2'>Teatro</option>";
$dropdown_html += "<option value='sala_3'>Sum</option>";
$dropdown_html += "<option value='sala_4'>Música</option>";
$dropdown_html += "<option value='sala_5'>JPC</option>";
$dropdown_html += "</select>";
//insert the Dropdown in the header of the calendar
$('#scheduler_here .dhx_cal_date').after($dropdown_html);
});
});[/code]
Obviously, change anywhere that says “sala” to whichever custom type you’re working with.
I’ve implemented this category sorting dropdown, but I’m also looking for a solution that would pull the custom fields automatically from the database. I need to allow my client to add/remove a custom field and for the sorting dropdown to automatically update. Any ideas?
If that’s not an option, when a custom field is deleted, is the category id# changed or does it stay the same? (ie. id category_0 is deleted, does category_1 become category_0 now, or stay the same?)
Thanks!
Get a guaranteed answer from DHTMLX technical support team
under the most suitable support plan