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
Tokens to be used in templates
Daylight Saving Time
How do I show the same events on two pages
Install module for Development

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 uses the languages set in the users profile - User Settings/Manage Profile
The way to set this up correctly is to:
  1. Install Language
    • 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
  2. Configure your Site
    • 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
  3. Configure your Users
    • 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

How do I show the same events on two pages

The Events module is able to show the same events on two pages using the sub-calendars feature of the module. This allows an event editor to include the events into one module instance, and then display them in a second module instance, potentially using a different theme and layout.
Follow the following steps to achieve this:-
  • Set up your primary events module instance, where you will add all your events
  • Set up your secondary events module instance, this can be on the same page or on a separate page to your primary as instance as desired
  • Go to the Sub-calendar settings - described here - include the primary instance into the secondary one as a sub-calendar
Note that you can edit events via either instance, and users can enroll and request notifications via either, but you should always add events via the primary instance because events added via the secondary one will not display in the primary.

Go to Top

Install module for Development

The Events team provides the source code for this module by two mechanisms.
  • Firstly you can download from CodePlex using standard CodePlex mechanism. For development purposes we develop within a live website, so the root of the module should be in the folder webroot\DesktopModules\Events.
  • Secondly we provide an installation source package. This will not only install a working module, but also set up the source in the correct place on your website. Just install in the same way you would normally install a standard module.
When using either of these mechanism, you then just need to open the module solution (.sln) file in visual studio. Always check that project references are correct within the two projects, and relink to the relevant files if needed. Please also note the other development requirements identified here - https://dnnevents.codeplex.com/documentation

Note:- Currently the module uses MSBuild for building the module. This is supplemented by DNNtc MSBuild to automatically create the installation and source packages when you do a Release build. The link to DNNtc MSBuild can be found on the documentation page, and a link to MSBuild can be found in the installation instructions of DNNtc MSBuild. DNN Events up to version 6.1.3 uses DNNTc MSBuild1.9.0.
If you want to remove the dependency from the automatic build with this MS Build structure, just remove all calls to the DNNtc attribute, remove the project.targets as file and remove the reference to the DNNtc in the solution file.

Go to Top

Last edited May 14, 2015 at 11:16 AM by EPT, version 63

Comments

weldonr30 Apr 30, 2015 at 8:32 PM 
Beware it looks like the module installer loads a different version of DotNetNuke.Modules.Events.dll assembly than what the source code creates upon build. We were trying to determine why EventDateBegin and EventDateEnd columns were null in some DNN sites but being completed in others and this appears to be why. It does not appear to affect the functionality of the module any but only when examining the data table will you see the difference.

mkormendy Jun 23, 2014 at 3:35 PM 
How would Google Events be tied to this?

tusharpatel80 May 23, 2014 at 7:04 AM 
Can I show Google Calender Events?