Free-Conversant Support / D.G. Navigation Calendar
 Home   About Conversant   Free Sites   Hosting   Support   XML-RPC 

Search



Documentation >> Misc. >> D.G. Navigation Calendar

Navigation Calendar

The Navigation Calendar is the little calendar that appears by default at the top of the "calendar" page of your site, and that allows you to browse the discussion group by date.

It now has several templates and properties that allow you to control more fully how it looks.

Contents

Features

The Discussion Group Nav Calendar has several interesting features:

  • the navigation calendar may be displayed in any page of your site (not only in the DG Calendar page)
  • on a calendar page sorted differently than the default sort order, clicking on the nav calendar (to view a different day) maintains the current sort order
  • full control over the HTML of the calendar via templates and stylesheets
  • day and month names can be localized
  • define if the week starts on Sunday or on Monday

Preferences

Everything is controlled from the Default DG plugin's preferences screen. Thus, these preferences apply to every navigation calendars in this conversation.

Go to: "/yourSite/admin/conversations/yourSite/preferences/$conversation=yourSite&plugin;=Default%20DG"

Scroll the window down until you find the "Available Preferences" section.

  • Navigation Calendar day names
    These are the day names to use in the navigation calendars of this conversation. You may use any language you want, but you must start with what correspond to Sunday.

  • Navigation Calendar month names
    These are the month names to use in the navigation calendars. You may use any language you want, but you must start with what correspond to January.

  • First Day of week
    From here you choose which day the week starts with. It may be Sunday (or the first item in your Navigation Calendar day names), or Monday (the second item in day names).

  • Navigation Calendar rows height
    You may set here the height that will be added to the <tr> tags of the navigation calendar's html table (it's added to every row but the very first one). If you left this value empty, no height attribute will be added to the <tr> tags.

  • Navigation Calendar's table tag
    The navigation calendar must be contained in an html table. This textarea allows you to define the opening <table> tag of that table (the closing <table> tag will be added automatically).

  • Navigation Calendar's header (month and year)
    This textarea lets you edit the <td>'s of the first row of the calendar (the one that displays the month and year). The colspan will be added automatically if needed, so you don't have to put it in there. But you must include the <!--#value--> macro call which will be replaced with the actual month and year. Also, this field must start with an opening <td> tag and finish with a closing one.

  • Navigation Calendar's sub header (day names)
    This textarea lets you edit the <td>'s of the second row of the calendar (the one that displays the day names). You must include the <!--#value--> macro call which will be replaced with a day name (more exactly with the first three characters of the name). Also, this field must start with an opening <td> tag and finish with a closing one.

  • Navigation Calendar's content cells
    This textarea lets you edit the <td>'s of the content of the calendar (the one used for each day). Since the CSS classes to use may change with the day (to show weekends), you have a couple of optional macro calls that you can use to insert the CSS classes: <!--#navCalDayCellClass-->, and <!--#navCalDayTextClass-->. You still must use the <!--#value--> macro call that will be replaced with the date, and this field too must start with an opening <td> tag and finish with a closing one.

  • Navigation Calendar's footer (prev/next month)
    This textarea lets you edit the <td>'s of the last row of the calendar (the one that displays the link to previous and next month). If you don't use a colspan it will be added automatically, but you must use the <!--#value--> macro call which will be replaced with the prev/next links. Again, the field must start with an opening <td> tag and finish with a closing one.

Displaying Navigation Calendars

Now that you may have several DG Calendar pages in your site, you may need several navigation calendars, each one pointing to a different DG Calendar page. You may also want to display the navigation calendar not only in DG Calendar pages, but maybe in any DG page (messages, threads, etc).

The navigation calendar is inserted into the page with a macro call. The macro is called "navCalendar" and may have an optional "path" parameter. Examples:

<!--#navCalendar-->
<!--#navCalendar path="calendar"-->

The path parameter gives the path, starting from your site's root, to the DG Calendar page to point to. In the previous example, this page is at "yourSite/calendar". If the DG Calendar page you wanted to point to was at yourSite/discussions/fr/calendar", you'd use:
<!--#navCalendar path="discussions/fr/calendar"-->

Note: When using the parameter, it must be enclosed in double quotes and preceded by "path=".

This macro call may be in any "general" template of your site, or in the DG Calendar's page template. If you put it in a "general" template and don't set its parameter, the navigation calendar will be displayed only when a DG Calendar page is viewed. If you set the parameter, the navigation calendar will be displayed in any page passing thru this template.

If you want to display several different Navigation Calendars pointing to several different DG Calendar pages, and if you want to display them only in DG Calendar pages, put the macro call without parameter in each DG Calendar's page template.

If you want to display several different Navigation Calendar pointing to several different DG Calendar pages, and if you want to display them not only in DG Calendar pages, put the macro calls in general templates and use the parameter.

For example, imagine you want two different interfaces for the discussion group, one with a simplified interface that shows only messages subjects, and another with the full interface that displays all the infos. You could then have a folder named "simple" and a folder named "full", and each of this folder would contain its own DG Calendar page, with its own properties. Each of these folders would also use a different "general" template, and each of these templates would contain a navCalendar macro call that has a parameter. So the template used for "yourSite/simple/" would contain <!--#navCalendar path="simple/calendar"--> and the template used for "yourSitefull/" would contain <!--#navCalendar path="full/calendar"-->.

Caching

The output of the <!--#navCalendar--> macro is cached for each page on which it is requested, and different versions are cached for different levels of user access (guests, members, and admins). This greatly increases the efficiency of the macro, as it only has to run once for multiple requests of the same page, and results in a DG Calendar page with much better performance.

The entire cache for this macro (for all pages and dates, and all users) is reset (destroyed) whenever a message is created, edited, or deleted in your conversation. So, the calendar will always be re-cached the first time it's requested after a message has been changed.

There are four optional macro attributes you can use to control the caching of the calendar: allowCache, allowGuestCache, allowMemberCache, and allowAdminCache. All of them are boolean parameters (true or false), and they all default to "true." Setting any of them to false will shut off some or all of the caching. For example:

<!--#navCalendar allowAdminCache="false"-->

... would prevent Conversant from caching the calendar for any administrators (site owners/editors). This means that whenever an admin requests a page with a nav calendar, the calendar will always be rebuilt. View in DG


This site managed with Conversant, © Copyright 2008 Macrobyte Resources