About a month ago I inserted a post at Sourceforge, looking for developers to give a hand with CMapp. At that stage a buggy prelimiary version of CMapp had been released and I was under pressure with a second version. Since then, six new developers have signed up and are actively helping to develop CMapp further. The CMapp project no longer relies on simple .tar.gz snapshots, but now has a full working CVS repository on Sourceforge to really speed up and help team development.
I’m starting working on some project milestones for this and future CMapp releases. I’d like to take this opportunity to say a big thank you to all the CMapp developers!
November 13, 2010 at 5:24 pm
Hi there Ciaran,
I tried to e-mail this to you but got a “No such user here” back from the babelworx server… so here it is :
Sorry to bother you, my name is Mark, and I have been using your php/mysql calendar in a project I am currently working on.
In order to obtain the results I want I have had to edit calendar.class.php a little, and I have run into some difficulties.
To be precise I am trying to tweek what happens when the user clicks on a day for wich the database table contains one or more events. But I am having trouble understanding how you have set up the definition of this particular link. For instance it seems to me that the following code contains an inconsistency : (these are lines 441 to 466 of calendar.class.php as I have it)
[CODE]
// How does the user want the links to open?
if($openLinkEvent == “window.location”){ // different formatting needed for window.location
$buildLinkRef = “a href=\”javascript:window.location=’{$eventLink}’ {$openLinkBehaviour}\”"; // the javascript parameters for the ahref
}else{
$buildLinkRef = “a href=\”javascript:{$openLinkEvent}(‘{$eventLink}’ {$openLinkBehaviour})\”"; // the javascript parameters for the ahref
}
// For more accuracy, manually create the timestamps to define today
$todayArray = $gather_conn_eff[$date];
$today = date(“Y-m-d”,time());
$startToday = “{$today} 00:00:00″;
$startStamp = strtotime($startToday);
$endToday = “{$today} 23:59:59″;
$endStamp = strtotime($endToday);
if(is_array($todayArray)){ // for days without events this is_array test would otherwise give a warning
foreach($todayArray as $key => $value){
$actualArray = $value; // This overwrites itself – but test stays true for each event on the particular date
######## EVENT IS IN THE PAST ############
if($startStamp>strtotime($actualArray[eventStart])) { // Event occurred in the past //
if($useOverlib != “yes”){ // if we are not using overlib
$eventLink = “{$date}”;
}else{ // if we are using overlib to display mouseOver event information (see README for other changes which have to be made beforehand)
$eventLink = “{$date}”;
}
}
[/CODE]
If you look at what the var $eventLink contains, you notice it contains a call to $buildLinkRef, but $buildLinkRef (although it is defines inside a conditional structure and can take on many different vallues) calls back to $eventLink… I’m amazed that the php server will actually compute that sort of thing without giving an error… but it does, so it’s just a problem of my brain not being able to compute it I guess! Do you think you could explain to me what I’m not getting here, and what $buildLinkRef and $eventLink actually contain by the time the function has been called?
And while I’m at it, is this really the right way to go about what I’m trying to do or would there be a simpler way to modify what the link of an “eventful” day is?
Frankly, other than this part which I just can’t figure out, the script is remarquably well writen, and your comments and clarity of coding make it a pleasure to work around what you’ve created. So anyhow, thanks a lot for your good work!
Any info you can give me on this would be a great help.
Regards,
Mark.