
Giorgos - 2005-03-05 09:44:25 -
In reply to message 1 from John Fugate
Thank you for using the Active Calendar class. I am glad that it may be useful for your work!
1. Setting images for the navigation links:
Letīs say you want to use the following images for your navigation links:
(make sure, there are XHTML conform)
$backArrow="<img src=\"images/left.gif\" border=\"0\" alt=\"<<\" />";
$forwArrow="<img src=\"images/right.gif\" border=\"0\" alt=\">>\" />";
There are 2 ways of setting them (e.g month view):
a.
$cal->monthNavBack = $backArrow;
$cal->monthNavForw = $forwArrow
b.
$cal->enableMonthNav($_SERVER['PHP_SELF'], $backArrow, $forwArrow);
2. Modifying the layout of the links:
Well, I suppose there are 2 ways of setting the layout of the navigation links, depending if the previous or next month contain incomplete tasks or not:
a. Use a different image link, if a month contains incomplete tasks e.g:
$backArrowIncompl="<img src=\"images/leftincompl.gif\" border=\"0\" alt=\"<<\" />";
(set the image link, as shown above)
b. Use different CSS
This method would be a bit more complicated, as the class currently generates the same CSS class for the back and forward link (default: var $cssMonthNav = "monthnavigation"). So the code needs to be a bit hacked...
You should modify the code by first setting e.g:
var $cssMonthNavBack="monthnavigation";
var $cssMonthNavForw="monthnavigation";
Then you should modify the private method mkMonthTitle():
line: $out="<tr><td class=\"".$this->cssMonthNav."\" colspan=\"2\">";
to: $out="<tr><td class=\"".$this->cssMonthNavBack."\" colspan=\"2\">";
line: $out.="<td class=\"".$this->cssMonthNav."\" colspan=\"2\">";
to: $out.="<td class=\"".$this->cssMonthNavForw."\" colspan=\"2\">";
So. now you could set e.g:
$cal->cssMonthNavBack="plincomplete";
(if the previous month contains incompleted tasks)
I hope I could help you. Please inform me, if you have further questions or if my suggestions would not work...
Giorgos