PDA

View Full Version : Calendar Events on NON vB Page


Hamma
02-25-2002, 12:11 AM
Is it possible to display the current days events on a non vB page? Id like to have a block at the top of my page that says whats going on for that particular day.

I did a search, but didnt see anything. Any ideas?

WebMasterAJ
03-08-2002, 12:08 AM
Is this possible?

N!ck
03-08-2002, 02:09 AM
i THINK this works ;) haven't tested it myself though


<table border=0 cellpadding=0 cellspacing=0>
<tr><td><b>Event Name</b></td><td><b>Event Date</b></td></tr>
<?
require("./forums/global.php");
$events = $DB_site->query("SELECT eventid, eventdate, subject FROM calendar_events ORDER BY eventdate LIMIT 10");
while ($event = $DB_site->fetch_array($events)) {
echo "<tr><td><a href=\"http://www.url.com/forums/calendar.php?s=&action=getinfo&eventid=" . $event['eventid'] . "\">" . $event['subject'] . "</a></td><td>" . $event['eventdate'] . "</td></tr>";
}
?>
</table>

WebMasterAJ
03-08-2002, 01:24 PM
Excellent, however, they are displaying the first event last.

http://www.finheaven.com/boardvb2/calendar.php

How would I make it so the first event comes first?

Thanks for the help!

WebMasterAJ
03-17-2002, 06:59 PM
Ok, I see what it is doing now.

Calendar (http://www.finheaven.com/boardvb2/calendarfront.php)

You see, its grabbing dates since the beginning. How can I make it grab from a curtain time frame?

Like, tell it to grab all dates within a week or month.

Thanks!

WebMasterAJ
03-17-2002, 08:09 PM
Alright, I did a heavy search and found that this was already asked for and someone already made the hack... it was a REALLY long time ago, and the URL to the hack lead to the vbulletion.com site instead of .org. Anyways, I found what I was looking for.

Thanks for your time!

Logician
03-26-2002, 12:10 PM
You can do it with WebTemplates Hack by creating a webquery for this query.

Besides by adding ASC or DESC after "ORDER BY eventdate" in Nicksauder's code, you can change the order of retrieved data.