Previous Thread
Next Thread
Print Thread
Rate Thread
#265155 12/22/2003 3:00 PM
Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
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..

Sponsored Links
Entire Thread
Subject Posted By Posted
IIP Eventspal.php scroungr 12/22/2003 11:00 PM
Re: IIP Eventspal.php scroungr 12/22/2003 11:01 PM
Re: IIP Eventspal.php JoshPet 12/22/2003 11:46 PM
Re: IIP Eventspal.php scroungr 12/23/2003 12:03 AM
Re: IIP Eventspal.php scroungr 12/23/2003 12:25 AM
Re: IIP Eventspal.php JoshPet 12/23/2003 12:30 AM
Re: IIP Eventspal.php JoshPet 12/23/2003 12:31 AM
Re: IIP Eventspal.php scroungr 12/23/2003 12:41 AM
Re: IIP Eventspal.php scroungr 12/23/2003 2:42 AM
Re: IIP Eventspal.php JoshPet 12/23/2003 3:23 AM
Re: IIP Eventspal.php scroungr 12/23/2003 6:46 AM
Re: IIP Eventspal.php JoshPet 12/23/2003 6:48 AM
Re: IIP Eventspal.php scroungr 01/02/2004 7:57 AM
Re: IIP Eventspal.php scroungr 01/02/2004 7:59 AM
Re: IIP Eventspal.php JoshPet 01/02/2004 7:59 AM
Re: IIP Eventspal.php JoshPet 01/02/2004 8:01 AM
Re: IIP Eventspal.php scroungr 01/02/2004 8:02 AM
Re: IIP Eventspal.php Ian_W 01/02/2004 12:42 PM
Re: IIP Eventspal.php scroungr 01/02/2004 3:30 PM
Re: IIP Eventspal.php scroungr 01/07/2004 8:52 AM
Re: IIP Eventspal.php JoshPet 01/07/2004 9:16 AM
Re: IIP Eventspal.php scroungr 01/12/2004 8:01 AM
Re: IIP Eventspal.php JoshPet 01/12/2004 8:51 AM
Re: IIP Eventspal.php Medar 02/05/2004 12:08 AM
Re: IIP Eventspal.php scroungr 02/05/2004 12:20 AM
Re: IIP Eventspal.php Medar 02/05/2004 1:03 AM

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
• Shock Hosting
• Stable Host
• bluehost
• InterServer
Visit us on Facebook
Member Spotlight
Ruben Rocha
Ruben Rocha
Lutz,FL,USA
Posts: 253
Joined: January 2000
Forum Statistics
Forums63
Topics37,583
Posts293,957
Members13,826
Most Online151,614
Nov 14th, 2025
Today's Statistics
Currently Online 2042
Topics Created 0
Posts Made 0
Users Online 1
Birthdays 30
Top Posters
AllenAyres 21,080
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,834
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2026 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20261026)