PDA

View Full Version : Hack help on calendar events for a non VB Page


Steph
10-30-2001, 08:38 PM
Right before the forums were moved, I discovered a thread regarding this type of hack but I can't find it anymore. Thanks to whoever initially posted this! The initial hack was the following:



<?php

include('./global.php');

$events = $DB_site->query("SELECT event, eventdate, eventid, subject
FROM calendar_events
WHERE public = 1 AND eventdate >= '".vbdate('Y-m-d',time())."'
ORDER BY eventdate LIMIT 5");
if ($DB_site->num_rows($events)) {
echo "Next Five Events:<br>";
while ($event = $DB_site->fetch_array($events)) {
echo "<a href='calendar.php?s=$session[sessionhash]&action=getinfo&eventid=".$event['eventid']."'>".$event['subject']."</a><br>";
}
} else {
echo "No Events";
}
?>



This shows the next XX events from the calendar. Again, Thanks to whoever did this. I'd like to edit this hack a little bit.

How would I call up the date of the event??

Id like to either display the date next to the event or organize the events by date. That little piece of info will help me immensely!

Thanks, Steph

Steph
11-01-2001, 02:48 PM
I figured it out! Thanks anyways :)

Steph