I’m attempting to set up a calendar in wordpress… and need to do various tweeks in the templates. On this page docs.dhtmlx.com/doku.php?id=dhtm … om_styling there are bits of code like:
scheduler.templates.event_class=function(start,end,event){
if (start < (new Date())) //if date in past
return “past_event”; //then set special css class for it
}
Which look like they will do the job. Whereabouts do I put this code though? Is there a file somewhere?
re: Tutorials - that’s about 12 long pages of stuff… the one that looks like it’s about the scheduler is written for ASP, and seems to want me to put the JS in an “index” file, which appears not to exist in the Wordpress version, which lives in a “views” folder, which also appears not to exist in the Wordpress version.
So… thanks for your help, but it would kindof be more useful just to know which file
scheduler.templates.event_class=function(start,end,event){
if (start < (new Date())) //if date in past
return “past_event”; //then set special css class for it
}
If that’s the case, I would refer you to the Lessons for Theme Development of the http://codex.wordpress.org/WordPress_Lessons pages… I am certain you’ll find the best way to customize your WP site with dhtmlx there
I am not familiar with WP development myself so I guess that would be a great place to start.
scheduler.templates.event_class=function(start,end,event){
if (start < (new Date())) //if date in past
return “past_event”; //then set special css class for it
}
?
Do I just copy and paste it into the template in the admin form? If so, where? Because I’ve tried that, and it throws an error… of the type that would indicate that this is not in fact where the code needs to go.
Is there someone here who actually knows how to add the code above… as outlined here?