Page 1 of 1
cmCalendar problem
Posted: Thu 20. Dec 2012, 21:23
by imsir
Hello. I have a problem with my Calendar module.
When I make an event, and setup span of my event to 2 days, I don't get end date in front end for some months.
For example if I choose August, September and October and setup event with span of 2 days I will get:
20.08 - 00.00
Wednesday
11.09 - 00.00
Monday
Etc.
You see, end date does not work. What do I have to fix? If I choose other months I get end date with no problem. Is it bug in script? I tried to check cmCalendar module and database inserts. Database has start date and than script works as START DATE + SPAN(if there is span) for printing end date.
Any help is appreciated.
Thank you,
Imsir
Re: cmCalendar problem
Posted: Sat 22. Dec 2012, 00:44
by thoblerone
Hi Ismir,
sorry that I can only guess, but your details are quite too few for more than a couple of thoughts.
I don't think that your issue is a problem of the module itself and I have problems to imagine why it should behave different for 2 day events in different months.
What are you trying to show? I'd guess an event listing. So to get over your problem, start with changing the template of your event listing. For example, you may like to use this one of mine:
http://www.stadtjugendring-meerbusch.de ... easer.tmpl
How are you doing your event end-date calculation? In the template there is no such field as well there is no such thing in the database entry for it. If necessary, you will have to set up some php calculation based on the start date. If you would show us your template, this could be very helpful.
regards
Thomas
Re: cmCalendar problem
Posted: Sat 22. Dec 2012, 16:47
by breitsch
at least a link to the website is ALWAYS needed! PM if necessary, but then WITH backend access.
Furthermore, you're in the wrong category here!
Re: cmCalendar problem
Posted: Sun 23. Dec 2012, 21:04
by imsir
I will try those suggestions.
Re: cmCalendar problem
Posted: Mon 24. Dec 2012, 01:56
by breitsch
sorry, support only when I have access to the template used.
There is something wrong in the template, and unvalid html as well:
Code: Select all
<span class="termindate">- 00.00.</span><br \="">
Re: cmCalendar problem
Posted: Mon 24. Dec 2012, 21:33
by imsir
Thanks my friend. I will check the template, when I find its location!
Re: cmCalendar problem
Posted: Fri 28. Dec 2012, 13:25
by imsir
Greetings, this is my template I use:
http://pastebin.com/ssgxPnEe
Re: cmCalendar problem
Posted: Fri 28. Dec 2012, 18:12
by breitsch
try this
Code: Select all
[PHP]
$day = '{FORMAT_DATE:l}';
$year = '{FORMAT_DATE:Y}';
$startday = '{FORMAT_DATE:j}';
$startmonth = '{FORMAT_DATE:m}';
$duration = '{CALENDAR_SPAN}';
$duration = preg_replace('/[^\d]/', '', $duration);
$endday = '0';
$endmonth = '0';
but I still think, there have been other changes in your script
{CALENDAR_SPAN} returns 'duration xx days' by default, it should fail in every case in your listing
so try it, if it still fails i'll need FTP access to your server, please via PM
Re: cmCalendar problem
Posted: Sun 30. Dec 2012, 12:30
by imsir
Thank you, that worked sir.