cannot display ''today'' in Calendar module

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
Foton
Forum Members
Forum Members
Posts: 32
Joined: Fri May 05, 2006 10:41 pm

cannot display ''today'' in Calendar module

Post by Foton »

Just installed the Calendar module. It's a pitty there is no manual, but through this forum I got it up and running (thanks to Mark!)
There is only 1 thing I am looking for over hours now;
I just want to change te background of today's day.
It is called ''calendar-today'' and I changed the css like this;
#cmscal .calendar-today{
color: red; font-weight:bold;
}
and I used the tag;
{cms_module module="Calendar" table_id="cmscal"}
but it will not change. Has anyone got it working or can point me to the right direction?
Cheers & regards.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: cannot display ''today'' in Calendar module

Post by Dr.CSS »

Try background-color...

#cmscal .calendar-today{
background-color: red; font-weight:bold;
}
Foton
Forum Members
Forum Members
Posts: 32
Joined: Fri May 05, 2006 10:41 pm

Re: cannot display ''today'' in Calendar module

Post by Foton »

Sorry, but the real question/problem is that in the calendar-template there is no ''calendar-today'' So the stylesheet is OK, but there is no request for calendar-today...
I hope I made myself clear.
Thanks for the quick response!
Dee
Power Poster
Power Poster
Posts: 1197
Joined: Sun Mar 19, 2006 8:46 pm
Location: the Netherlands

Re: cannot display ''today'' in Calendar module

Post by Dee »

In the default installed template the current day is shown as so, I'm styling it with:

Code: Select all

table.calendar .calendar-today
{
  background-color: #8080ff;
}
The class is not added in the template, but in the module code (function.display.calendar.php, line 193)

Code: Select all

$today = date('j');
$days[$today]['class'] .= ' calendar-today';
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: cannot display ''today'' in Calendar module

Post by Dr.CSS »

Well if you did a default install and you copied the CSS rules from the calendar module and used the tag...

{cms_module module="Calendar" table_id="cmscal"}

Then you should get this, I used your tag with your styling...

http://multiintech.com/cmsms4/index.php?page=calendar
Foton
Forum Members
Forum Members
Posts: 32
Joined: Fri May 05, 2006 10:41 pm

Re: cannot display ''today'' in Calendar module

Post by Foton »

Well, I re-installed the module and used the ''help - part 2'' again. Now the background is showing up again. So I probably messed up something during re-designing the template/stylesheet. I realy do not know what I messed up, nut I will try to get the same result again.
Thanks everybody for your help. Very appreciated!  8)
Foton
Forum Members
Forum Members
Posts: 32
Joined: Fri May 05, 2006 10:41 pm

Re: cannot display ''today'' in Calendar module

Post by Foton »

I inserted a linebreak before an if/else-statement. That killed the backgroundcolor....
Post Reply

Return to “Modules/Add-Ons”