Frequently asked questions

Description of the Events Module Settings
Date format
Display Event dates without time
Display Event details in place or not
Purge Old Events
Creating custom Event Themes
Select Category via URL
Select Start Date via URL
How to use RSS in the Events module
iCal support
Creating an Upcoming Events View
How to use the Repeater view
Video Tutorials
How to open a Location URL in a new page
Templates and where they are used

Date format

One of the most commonly asked questions on this forum is how to get the date format to be something other than mm/dd/yy.

It should be noted that this is not controlled by the Events Module. The module formats dates using standard date strings which present date according the Culture or Language specified in the user or portal settings. Therefore the module can be presented to users in multiple languages with dates being presented as appropriate for all users.

Language detection works differently for users who are logged in or not:
  • Not logged in - DNN will by default check the browser language, which is often set to en-US by default. Enable Browser Language Detection can be found in the Language Settings dialogue in Admin/Languages in DNN 5.x. Other than that it will use the portal default settings set in Admin/Languages.
  • Logged in - it users the languages set in the users profile - User Settings/Manage Profile
The way to set this up correctly is to:
  • Install the languages you require via the Languages dialogue (DNN 4.x in the Host menu, DNN 5.x/6.x in the Admin menu) or ask your service provider to add any that you need. For UK English you will need to install English (UK) - en-GB
  • In this dialogue I typically disable browser language detection, because often browsers are configured to en-US as default
  • In DNN 4/5 in the Site Settings dialogue in the Admin menu, under Advanced Settings, then Other Settings, configure the default language
  • In DNN 6 in the Admin/Language dialogue set the Site Default
  • For each user (and this is best done when you first set up the site, because they pick up the default you just specified in the Site Settings), change the Preferred Locale in the Manage Profile section of their user profile.
Dates should now dsplay in the correct format. For the UK (and I'm sure for other counries as well), it will also show weeks starting on a Monday rather than a Sunday which is the norm in the US.

Go to Top

Display Display Event date without time

Is it possible to format the DateTime of the Start & End Dates of the Events Module? It depends where you want to change the format. All changes are made in the templates sesction of the module settings:
  • In list/day views, edit the List//Day Start/End Date Formats - use 'd' instead of 'g' to show the date
  • In other views you can change [event:startdate] to [event:startdate|d]
Look here for date format strings - MSDN

Go to Top

Display Event details in place or not

The Events module in effect has three options currently:
  • Display the detail page in place, in which case it replaces the the month view. This happens when Event Detail New Page is unticked.
  • Display on a new empty page, when Event Detail New Page is ticked. This page is then formatted in one of two ways.
    • Using the site admin skin - when Use Module Container & Skin is unticked
    • Using the page skin, and module container from the page the month view is displayed on - if Use Module Container & Skin is ticked
When displaying on a new page, it places the module content into the ContentPane, which is the way that the DNN core handles it, and is not controlled by the module (unless we completely re-worked how the module works for this functionality).

Go to Top

Purge old events

There is an option Expire Events Older Than x Days in the module settings. Enter a number of days and it does what it says automatically.

Go to Top

How do I create custom Events Themes?

Essentially, an Events theme is a folder that contains all elements that make up the theme: at least 1 css file, but most of the time also some bitmap files that are used in the graphics of the theme.

In order to make it work, the name of the folder must be the same as the name of the theme .css file. So if you want to have a theme named ThisIsMyTheme, you should have a folder named ThisIsMyTheme and a .css file within this folder named ThisIsMyTheme.css.

For standard installed Event themes, the folders can be found in the DesktopModules\Events\Themes. In this folder you will find subfolders named Default, Events, etc. In fact, all names of the standard themes supplied in the PA pack of Events. The name of the folder = the name of the theme.

Custom Event themes are located in the standard Portal file folders, which you can reach using the Admin File Manager. There should be a main folder DNNEvents, with a subfolder Themes. From there on, it works like the standard themes. To work it out for your custom theme ThisIsMyTheme, there should be (at minimum) the file in a folder DNNEvents\Themes\ThisIsMyTheme\ThisIsMyTheme.css. All necessary additional bitmaps and/or other files for your theme should be located in the same folder.

As for the structure of the .css theme file. The best way to start is to create a copy of one of the standard Event themes, e.g. Events.css and also have a look at another one, e.g. Events-Green.css.

Class names in the .css file are prefixed with the name of the theme. If you compare the 2 standard themes, the naming convention can be easily detected. The reason for this is that the Events module supports the option to have 2 instances on the same page, each having a different theme as well as the fact that the caldendar control we use (which we inhertited a long time ago) is build this way.

Go to Top

Select Category via URL

You can include a category in the url to a page, to have the events displayed filtered by that category e.g. http://mysite.com/calendar.aspx?category=training
(Note - this feature is available in version 5.1.0 onwards)

Go to Top

Select Start Date via URL

You can include a start date in the url to a page, to have the Month or Week views start from that month http://mysite.com/calendar.aspx?selecteddate=20100529. Date is accepted in the format yyyyMMdd (or a valid date format for your current culture).
(Note - this feature is available in version 5.1.0 onwards)

Go to Top

Video Tutorials

Aderson Oliveira has created a number of video's on how to use the Events module. Have a look at the following URL's:-
Go to Top

How to open a Location URL in a new page

The default templates use the token [event:location] for display of the Location information. This has the result of displaying the location as a hyperlink (if the URL is provided) which will open the url in the current browser window. Sometimes you may wish to open this in a new windows. In which case you can change the template to use the following structure instead of the [event:location] token - <a target="_blank" href="[event:locationurl]">[event:locationname]</a>

Go to Top

Last edited Apr 13, 2012 at 12:49 PM by RogerSelwyn, version 52

Comments

No comments yet.