Sorry Brian - but you could have just removed the wording and not the whole post
Anyway, took me a while to remember exactly what I did as I made the change over 2 months ago and didn't take notes, so I've had to take a good look again.
2 things need to be done - change the display of the day numbers from plain text to "a href" elements and to provide the target of those hrefs with the day value, aswell as the month and year value.
How I did it was to modify 2 sections of the code in functions/escal.php as follows:
Find:
Code:
echo " title=\"$et[$daycount]\" onClick=\"popupEvent($daycount,$popupWidth,$popupHeight)\" style=\"cursor:hand;\"";} } echo ">$cd</td>\n";$daycount++;$cd++;}
Replace with:
Code:
echo " title=\"$et[$daycount]\" onClick=\"window.location.href='$thisFile?mo=$mo&yr=$yr&day=$cd'\" style=\"cursor:hand;\"";} } echo "><a class='today' href='$thisFile?mo=$mo&yr=$yr&day=$cd'>$cd</a></div>\n";$daycount++;$cd++;}
Find:
Code:
echo " title=\"$et[$daycount]\" onClick=\"popupEvent($daycount,$popupWidth,$popupHeight)\" style=\"cursor:pointer;cursor:hand;\"";} } echo ">$cd</td>\n";$daycount++;}
Replace with:
Code:
echo " title=\"$et[$daycount]\" onClick=\"window.location.href='$thisFile?mo=$mo&yr=$yr&day=$cd'\" style=\"cursor:pointer;cursor:hand;\"";} }
echo "><a class='s2$bgc[$daycount]' href='$thisFile?mo=$mo&yr=$yr&day=$cd'>$cd</a></div>\n";$daycount++;}
NB: I had an issue with the way the $thisFile value was being presented by the code and couldn't work around it so had to hard code my domain into the links. Be aware of that if you have problems - replace the $thisFile values with http://yourdomain.com$thisFile.
|