PDA

View Full Version : Icons in the small calendar?


Mad Dog
07-17-2006, 03:07 PM
I have a client who wants to put an icon in the small calendar instead of having it colored to indicate there's an event that date. Can this be done?

Thanks,
Mad Dog

Brian
07-17-2006, 04:07 PM
This isn't "supported" feature, but you may can do it with a little CSS editing...

What mode of the calendar do you want to do this with?

Mad Dog
07-17-2006, 04:34 PM
I'm actually using demo.php (with the "setup", "event" etc taken out). What part of which css file should I look at?

MD

Brian
07-18-2006, 08:19 AM
So, you're using the Normal Mode Calendar...

I haven't done this before, but it should work. You'll need to know a little about CSS to do it.

First, view your calendar page like normal then view the source. In the source you'll see a section of CSS that have several .s elements like this:

<style type="text/css">
<!--
.s22 {background-color: #A4CAE6;}
.s21 {background-color: #F2BFBF;}
.s23 {background-color: #CCFF00;}
.s24 {background-color: #FBF484;}
.s29999 {background-color: #FFC18A;}
-->
</style>Copy and paste this section of code into your calendar page replacing the entire $CSS=1; require("calendar.php"); section.


Next, modify this CSS code in your page to include the image you want displayed.

Mad Dog
07-18-2006, 11:19 AM
I assume this code will change anytime I add or change an Event Category, true?

I could add a background-image: to each CSS style. I wonder though, is there an overriding CSS style that would be the same for all the date cells and I could only put it there? Or add it to "calendar.php" somehow so when it generates the CSS code we're talking about the background-image: was a part of it?

Or am I getting too fancy for my own good?

Thanks!
MD

Brian
07-18-2006, 01:09 PM
Yes, if you change the categories, you'll need to change the code in your page. This is a bit beyond what Version 6 was designed to do. Hopefully the next major release will make this easier.

Mad Dog
07-18-2006, 06:38 PM
Thanks. For the moment I think I'll tell the client we can't do it.

(:})