Webmastersite.net
Register Log In

Calendar questions

Comments on Calendar questions

webflair
Forum Regular

Usergroup: Customer
Joined: Nov 27, 2006

Total Topics: 187
Total Comments: 465
Posted Feb 15, 2009 - 10:07 PM:

I am working on a site where the calendar will be very important, the calendar works fine but I have some questions...


How can I create a toplist of the five events that are closest to todays date? I have tried this but cannot get it to work, it always shows events that have already gone by.

Is there a variable to show todays date and time?

How can I create a direct like to todays calendar date. A link that updates to todays date automatically.

How would I rewrite the URLs of calendar dates so that they have this (or a similar) format... calendar-{DAYID}-{MONTHID}-{YEARID}

Thanks

Jon
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Feb 16, 2009 - 6:50 AM:

The events starting soonest? Use the toplist condition
starttime > {TIME}
and order by starting time ascending.

Today's date and time requires a PHP call:
Today's date and time is <?php echo showdate("%B %d, %y - %l:%M %P", time()); ?>.
(Formatting comes from http://www.php.net/strftime )

To link to today's daily calendar event list page, this is a little messy looking but you can use
<a href="calendar.php?dayID=<?php echo showdate("%d", time()); ?>&monthID=<?php echo showdate("%m", time()); ?>&yearID=<?php echo showdate("%Y", time()); ?>">Today's events</a>


Calendar URL rewriting would require custom PHP work, estimate 2-4 hours ($100-$200).
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



Sorry, you don't have permission to post posts. Log in, or register if you haven't yet.