Ok I found the issue with the eventspal not only showing the next upcoming events but also grouping them by month so it shows all of January 2003-2007 and then all of february.. it exists in this lines
[]
// Only continue if we still need more events to display - this will save the query
// if you have lots of events in the current month
if ($count < $totaldisplay) {
// Formulate the Query for the way future
$query = "
SELECT C_Date,C_Month,C_Year,C_Brief,C_Notes
FROM {$config['tbprefix']}Calendar
WHERE C_Type = 'public'
AND C_Year > $year
ORDER BY C_Month, C_Date, C_Year ASC
";
$sth = $dbh -> do_query($query);
while(list($dy,$mn,$yr,$brief,$notes) = $dbh -> fetch_array($sth)) {
// Only display if we still need events to display
if ($count < $totaldisplay) {
// Display the date if it's not a repeat of the date above
if (($mn != $oldmn) || (($mn == $oldmn) && ($dy != $olddy)) ) {
$output .= "<i>$mn/$dy/$yr</i><br />";
}
// If we are doing the mouseover preview, figure it out here
if ($mousepreview) {
$notes = strip_tags($notes);
$notes = htmlspecialchars($notes);
if (strlen($notes) > 100) {
$notes = substr($notes,0,100);
$notes .= " ...";
}
$title = "title="$notes" ";
}
// Output the name of the event here
$output .= " ·<a href="{$config['phpurl']}/showday.php?Cat=$Cat&day=$dy&month=$mn&year=$yr" $title>$brief</a><br />";
// set the current date so we can compare on the next run through
$olddy = $dy;
$oldmn = $mn;
$count++;
}
}
} // End of the query for the future
[/]
Now I changed the sql query to
[]
$query = "
SELECT C_Date,C_Month,C_Year,C_Brief,C_Notes
FROM {$config['tbprefix']}Calendar
WHERE (C_Type = 'public' AND C_Year > $year)
|| (C_Type = 'public' AND C_Recurring = 'yearly')
ORDER BY C_Year, C_Month, C_Date ASC
";
[/]
but that now outputs it as all recurring for 2003 and then all the rest of the dates after 2003 as it should.. my issue is that since your recurring dates go in as the year you entered them so that say you put Xmas on Dec 25th and that starts on 2003, it puts it as Dec 25th 2003 and then ALL of 2004 except for xmas since its a rcurring.. now I was thinking.. I need to change the date on the recurring holidays to the year I am in so that if the getdate() function says 2009 as the year the recurring should be reflected as 2009..
so I hope you understand so far.. My quandry is should I update the recurring in the tables to reflect 2009 which will make it ok and I will then reflect all events correctly but that will require a table insert.. or should I do it yet another table for all things in the year which will mean another table.. which will need to be updated as things are inputted or should I do it all through an array that takes all 2003's and turns them into the proper year and then resort that array? Hmmm that sounds like the hardest but the easiest..