Can you share your code? I had a very brief flash of an idea, but without seeing the actual code it’s refusing to come out into the clear.
Well, to be honest, I’m not happy with using the "pub_date" and "unpub_date" for the event itself; I would prefer to see those used for what they are supposed to be used for, namely when to show and when to stop showing a document. For example, announcing an event of some sort a month before the event, then having it automatically go away the day after the event. If the pub_date/unpub_date were used properly, this could be done a year in advance and then it would automatically come and go in the calender as desired. And this feature can be ignored if that kind of behavior is not needed.
I’m going to look into using TVs for setting the actual start date/end date of the event. But that’s going to take fully understanding how this works, and rewriting a lot of the core of it.
In the meantime, I’ll look at ways to force the document to show.
-
- 23 Posts
What I ended up doing is always keeping events published (un-published date is empty), except for events that have not come up so they will always link to the event page and not the "not found page". For events that are coming up and have not been published becuase of the date (I also set the unpublish date as the same day and time), to make it so people don’t get redirected to the "not found page", I edited the code below They still get the popup saying what the event is for that date.
// If chosen make days with events linkable
if(($links=="1") and ($monthEvent["id"]<>’’) and ($monthEvent["unpub_date"]==0))
{
$dd = ’<a href="’.$url.’index.php?id=’.$monthEvent["id"].’">’.$dd.’</a>’;
$monthEvent["id"]=’’;
}
// Display
echo $dd;
-
- 23 Posts
Or you can do this and only use weblinks to pdfs or other documents with information and then you never have to worry about the link working for a publishing date:
// If chosen make days with events linkable
if(($links=="1") and ($monthEvent["id"]<>’’) )
{
$dd = ’<a href="’.$monthEvent["content"].’">’.$dd.’</a>’;
$monthEvent["id"]=’’;
}
// Display
echo $dd;
I’m still poking around in this every now and then with the intention of converting the usage of the publish and unpublish dates to startDate and endDate TVs, and leave the publish/unpublish dates to their original purpose.