Can't get my Event templates to work in joomla

I have tried these example code from

docs.dhtmlx.com/doku.php?id=dhtm … om_styling

Redefining Content

and I put the same code in my site but still the same old thing… - but it shows up as the standard default look and feel any help on this… not sure what is wrong… thanks

www. chesterfamilycentre.ca/new-calendar#date=2010-11-04,mode=month (remove the space after the www)

any help here is what i have in my Joomla using 2.3

scheduler.templates.event_text=function(start,end,event){

return "Text:<b> "+event.text+"</b><br>"+"Descr."+event.details;

scheduler.templates.event_header=function(start,end,event){

return (event.important?"<img src='important.gif' />":"")+scheduler.templates.hour_scale(start);

scheduler.templates.event_bar_text=function(start,end,event){

var text = event.text.substr(0,20); return "<span title='"+event.text+"'>"+text+"</span>";

Hi
I looked at the 24th nov at the event there in day view
It seems although you have a description in edit view there is an undefined statement showing in event view

ie:- In Day view 24th nov
Text: Family Gym Night
Descr: undefined

No idea why that would be showing as your first template section is identical from the tute on this site
Also ( I maybe wrong ) but if you want it to display in month view you would need to put that code in your third template section (event_bar_text)
Like this

scheduler.templates.event_bar_text=function(start,end,event){

return "Text:<b> "+event.text+"</b><br>"+"Descr."+event.details;

}

According to code, you have named the second field as “newfield1” not the “details” , so changing template to the next must help.

return "Text:<b> "+event.text+"</b><br>"+"Descr."+event.newfield1;

HMM still nothing…

I have a new field here are my 2 of them

Name: Text
Description: Events
Type: Textarea
Height: 150

Name: Newfield1
Description: Description
Type: Textarea
Height: 150

I Change what you said still nothing… as you will see… little lost on this

So i put event.Text not sure why you said the Newfield1 i had a space had to get ride of it didn’t even work…

return "Text:<b> "+event.text+"</b><br>"+"Descr."+event.Text;

Also if you try this one Nov 24 - for the WEEK view

www. chesterfamilycentre.ca/new-calendar#date=2010-11-22,mode=week

It looks better…

but has this

18:30
Text:
undefined
Descr. Every

Why is it showing undefined… what one do i edit?

Hello,

Right now in you database you have following fields:

  1. text - for event text;
  2. newfield1 - for event description.

So you should edit your templates accordingly.

For example, if you have:

return "Text:<b> "+event.text+"</b><br>"+"Descr."+event.Text;

Should be changed to:

return "Text:<b> "+event.text+"</b><br>"+"Descr."+event.newfield1;

Best regards,
Ilya

That didn’t to nothing I have now

scheduler.templates.event_text=function(start,end,event){

return "Text:<b> "+event.text+"</b><br>"+"Descr."+event.newfield1;

why is this so hard… so far this is the hardest Component i have installed… to get things to format right…

But appreciate the help alot…

Now nothing SHOWS up on the Monlhty calander

Weird

You haven’t edited everything i believe.

Change

var text = event.Text.substr(0, 20);

with:

var text = event.text.substr(0, 20);

Best regards,
Ilya

It seems that there is a delay or something… on this compenet… I don’t have caching turing on…

Here are my setting in image


Yes, i missed another problem.

return "<span title='" + event.text + "'>" + Events + "</span>";

Events variable is not defined. Most likely you meant:

var text = event.text.substr(0, 20); return "<span title='" + event.text + "'>" + text+ "</span>";
Hope this helps.

Best regards,
Ilya

Ok did that

now www. chesterfamilycentre.ca/new-calendar#date=2010-11-10,mode=day

doesn’t show anything for 18:30

www. chesterfamilycentre.ca/new-calendar#date=2010-11-10,mode=month
still looks blah… want the family night under the time… like the example…

Its seems that there is some DELAY on the page… I have no clue… i’m so lost at this time…

:cry:

You missed one:

scheduler.templates.event_text = function(start, end, event) { return "<span title='" + event.text + "'>" + Events + "</span>"; };
Change with:

scheduler.templates.event_text = function(start, end, event) { var text = event.text.substr(0, 20); return "<span title='" + event.text + "'>" + text + "</span>"; };

Best regards,
Ilya

ok thats great…

one more thing how do i get the month to look like the rest of the new boxes you gave me?

www. chesterfamilycentre.ca/new-calendar#date=2010-11-10,mode=month

want to look like this week mode…

www. chesterfamilycentre.ca/new-calendar#date=2010-11-10,mode=week

i tired to do this but didn’t work

scheduler.templates.event_header=function(start,end,event){

from this - not sure why there is an image in here??? don’t even need it

return (event.important?"<img src='important.gif' />":"")+scheduler.templates.hour_scale(start);

to this - didn’t do nothing…

var text = event.text.substr(0, 20); return "<span title='" + event.text + "'>" + text + "</span>";

I think the template just need to be tweaked a bit to simply fly it as i really don’t know what box of the 3 does what?

Look here :- docs.dhtmlx.com/doku.php?id=dhtm … _templates
This is why i said your edit needed to go into the scheduler.templates.event_bar_text
But as i’m no expert someone else would have to clarify that

scheduler.templates.event_header - defines text label in header of event (date);
scheduler.templates.event_text - defines text in middle part of event (text);
scheduler.templates.event_bar_date - defines date for event bars in month view;
scheduler.templates.event_bar_text - defines text for event bars in month view.
scheduler.templates.lightbox_header - defines top line of lightbox window.