Help - Search - Members - Calendar
Full Version: Calendar as an eventlist?
Movable Type Community Forum > Additional Resources > Tips and Tricks
patricken
Hello,

* Would it be possible to use the calendar in some form of "eventlist"?
Like if I have some upcoming events in this and next year, put them in the calendar, could one make an "eventlist" of all events, in rowformat?


Year (2002)
month (for instance august)
...event
...event
...

month (for instance september)
...event
...event
...


...


Year (2003)
month (for instance september)
...event
...event
...

* Perhaps one could also export the whole eventslist lika a Excel file/ CSV or whatsoever?

Cheers,
Patricken

(yup, it's a blog but MT i t's pretty advanced in it self!)
smile.gif
kadyellebee
So do you actually want this in a calender (with dates and cells for each day) format, or just a list of the upcoming entries?

Just thought I'd clairfy before I started looking for old posts smile.gif

Kristine
patricken
A plain list would be nice! biggrin.gif


Here's some happy smiles for all your efforts in my stupid questions!   smile.gif  :)

Cheers,
Patricken
kadyellebee
Hmmm....

Well, I played with this for a while, and I'm not finding exactly what I think you are looking for.  I can't seem to get things to go with the older posts on top, and I am not sure how to filter out *just* the upcoming posts.

But, I'll share what I did come up with, maybe it will help you, or it will help someone else help from here!! smile.gif
CODE
<MTArchiveList archive_type="Monthly" sort_order="descend">
<b><$MTArchiveTitle$></b><br>
<ul><MTEntries><li><$MTEntryTitle$><br></MTEntries></ul>
<br>
</MTArchiveList>


Kristine
TomKWS
Has anyone else ever had any luck getting their calendar (list format or otherwise) to show only upcoming events? I recall it was suggested aeons ago as a possible future MTEntries parameter, e.g. upcoming=x, but can't seem to find anything else on this.

Any help would be greatly appreciated,
Tom
tima
This is a hack that I have not fully tested, but setting days to -1 produces all entries with a future timestamp.

CODE
<MTEntries days="-1">
<a href="<$MTEntryLink$>"><$MTEntryTitle></a><br/>
</MTEntries>


Hope that helps.
frugle
Try this...

Create a new index template that you can include with SSI or PHP

CODE
<div class="head">Events - <$MTDate format="%B %Y"$></div>
<div class="body">
<MTCalendar month="200207" category="Events">
    <MTCalendarWeekHeader>
    </MTCalendarWeekHeader>

<MTCalendarIfEntries>
<MTEntries lastn="1">
<$MTCalendarDay$> <a href="<$MTEntryLink$>"><$MTEntryTitle$></a><br />
</MTEntries>
</MTCalendarIfEntries>
<MTCalendarIfNoEntries>
<$MTCalendarDay$><br />
</MTCalendarIfNoEntries>
<MTCalendarWeekFooter></MTCalendarWeekFooter>
</MTCalendar>
</div>


Notes:
Omiting month= will display current month.
Omitting category= will display all categories

If you're making "older" records they won't need updating every time you rebuild, so uncheck it when you create the template.

Hope this helps, and let me know where you use it tongue.gif

Frugle
trailgirl
If you have php: this article explains how to post entries but not have them show up until a specific date in the future: http://www.scriptygoddess.com/archives/001243.php For a list of upcoming events all you have to do is reverse the date checking: use less than instead of greater than
CODE
<?
if (time() < strtotime ("<$MTEntryDate format="%B %e, %Y %I:%M %p"$>"))
{
?>
Now an entry for an upcoming event shows up but not if the event date has passed.
TomKWS
Thanks for your prompt replies, my friends.

The days="-1" hack is probably the simplest solution to this problem (no PHP on the host, I believe), and it does work like a charm. Unfortunately, because it must be the only MTEntries parameter when used, I can't show, for example, only the next three upcoming events; by default, it displays all of them, and that can be a very long list.

I'm looking into frugle's calendar implementation now, and will let you all know how it turns out.

Thanks again,
Tom
TomKWS
frugle, your code simply displays the month's events in list format, regardless of whether the event has passed or not.

I'll figure this out somehow goshdarnit,
Tom
frugle
QUOTE
frugle, your code simply displays the month's events in list format, regardless of whether the event has passed or not.

I was looking into a MySQL script (to be cron'd) that at 00:01 will move any "event" status to draft OR change the category to "Past Events", knocking it off the event calendar.

I came across the following problem (also posted to "bugs"):

In the MySQL Database, each mt_entry line has a entry_category_id which is NULL.

How does MT know what category an article is assigned to?
kadyellebee
With the addition of multiple categories, the databases have the category info in a different table - mt_placement has the info for each entry_id's category that is assigned, and if you need to know specific data about the category id, you can check out mt_category.

Hope that helps!
Kristine
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.