DotNetNuke 6.1 Developer Quick Start

Return to previous page

  • 4/7/2015
  • 5052 Views

Comments

5052 Views

DotNetNuke 6.1 Developer Quick Start

Last updated 5 years ago

Comments

Common

(Enter the content of this article below)

Advanced

 
The DotNetNuke 6.1 Developer Quick Start page is intended to be used as a resource that can help get DotNetNuke extension developers up to speed on the latest offerings available in 6.1. If you are new to Skin Object, Module or Provider development in DotNetNuke, you may wish to visit the Module Development page for further details. In addition to the Module Development page, you may also wish to review the items that were new to 6.0 by viewing the DotNetNuke 6 Developer Quick Start Wiki Page. There were many additions to 6.0 that developers and designers can take advantage of so please visit that page if you haven't already!


Image





Client Resource Management

Resources:


Mobile API - Client Capability / Device Detection

There are new APIs available in 6.1 to find out the Device Capabilities of the device being used to access content. The device detection is based on User Agent sent by browser.

  • Namespace: DotNetNuke.Services.ClientCapability namespace
  • IClientCapability device = ClientCapabilityProvider.CurrentClientCapability

IClientCapability provides capabilities supported by the http requester (e.g. Mobile Device, TV, Desktop). IClientCapability has the following properties:

  • IsMobile – Is this a Mobile Device.
  • IsTablet – Is this a Table Device
  • IsTouchScreen – Does client have Touch capabilities
  • SupportsFlash – Does client support Flash
  • FacebookRequest – Is the client coming through FaceBook fan page. If yes, you can obtain FaceBook related information, such as FaceBook Userid
  • ScreenResolutionWidthInPixels – Screen Width
  • ScreenResolutionHeightInPixels – Screen Height
  • UserAgent – Client’s user agent.
  • Capabilities - A key-value collection containing all capabilities supported by client

Resources:


Mobile API - Site Redirection Management

Following APIs can be used to perform CRUD (Create Read Update Delete) operation on Site Redirection settings.

  • Namespace: DotNetNuke.Services.Mobile
  • Class: RedirectionController

Following methods perform CRUD operation:

  • GetAllRedirections - Get all redirection rules defined in the system (all portals)
  • GetRedirectionsByPortal - Get redirection rule for a portal
  • GetRedirectionById - Get redirection rule by rule id
  • Save - Save (Update / Create) a redirection rule
  • Delete - Delete a redirection rule
  • DeleteRule - Delete a rule's matching criteria
  • PurgeInvalidRedirections - Deletes all redirection rules that were set for pages that have been soft or hard deleted. This method should be called prior to load of Site Redirection UI to clear bad data in the rules.

Following methods can be used to obtain Redirect Url based on client's user agent (capabilities) and configured site redirection rules:

  • GetRedirectUrl(string userAgent) - Get Redirection Url based on UserAgent.
  • GetRedirectUrl(string userAgent, int portalId, int currentTabId) - Get Redirection Url based on Http Context and Portal Id.
  • GetFullSiteUrl - Get Url for the equivalent full site based on the current page of the mobile site
  • GetFullSiteUrl(int portalId, int currentTabId) - Get Url for the equivalent full site based on the current page of the mobile site
  • GetMobileSiteUrl - Get Url for the equivalent mobile site based on the current page of the full site
  • GetMobileSiteUrl(int portalId, int currentTabId) - Get Url for the equivalent mobile site based on the current page of the full site

Resources:

Mobile API - Device Preview Management

Following APIs can be used to perform CRUD (Create Read Update Delete) operation on Device Preview settings.

  • Namespace: DotNetNuke.Services.Mobile
  • Class: PreviewProfileController

Following methods perform CRUD operation:

  • GetProfilesByPortal - Get list of preview profiles for a portal
  • GetProfileById - Get preview profile by id
  • Save - Save (Update / Create) a preview profile
  • Delete - Delete a preview profile

Resources:

Mobile API - Facebook Fan Page

The FacebookRequest property of IClientCapability (see above) provides Facebook related information if the current page is being used to serve Facebook fan pages. FacebookRequest essentially exposes all the properties that Facebook has documented here https://developers.facebook.com/docs/authentication/signed_request/. The most useful property is PageLiked. FacebookRequest has the following properties:

Note: FacebookRequest does not expose or reveal any personal details (e.g. Name, Email, Date Of Birth, etc.)

  • PageLiked - Has the user liked the page. Only available if your app is an iframe loaded in a Page tab. This property can be used to serve different content based on Like status. For e.g. message 'Like this page to get access to special content" can be dynamically shown if person has not yet liked your page.
  • Algorithm - Mechanism used to sign the request
  • OauthToken - Token you can pass to the Graph API or the Legacy REST API.
  • Expires - DateTime when the oauth_token expires
  • IssuedAt - DateTime when the request was signed.
  • UserID - Facebook user identifier (UID) of the current user. This is not Facebook username or email address.
  • UserLocale - User's locale.
  • UserCountry - User's country.
  • UserMinAge - User's minimum age range.
  • UserMaxAge - User's maximum age range.
  • PageId - Page's Id. Only available if your app is an iframe loaded in a Page tab.
  • PageUserAdmin - Is the page user Admin of the page. Only available if your app is an iframe loaded in a Page tab.
  • ProfileId - Page ID if your app is loaded within. Only available if your app is written in FBML and loaded in a Page tab.
  • AppData - Content of a query string parameter also called app_data. Usually specified when the application built the link to pass some data to itself. Only available if your app is an iframe loaded in a Page tab.
  • RawSignedRequest - Raw signed request coming from FaceBook in Post
  • IsValid - Is this a valid FaceBook Request. Check this value prior to accessing any other property

Mobile Skin Objects

There are two new skin objects to provide links back and forth between Desktop and Mobile sites.

  • LinkToFullSite - Skin object to be added in the footer of a skin being used on Mobile site.
  • LinkToMobileSite - Skin object to be added in the footer of a skin being used on Desktop site.

Once a user goes from mobile site to full site using the LinkToFullSite skin object, no further redirection happens until the browser is closed or user is logged out.

Skin objects are located under \Website\admin\skins folder

Resources:



Site Groups

Many organizations leverage the multi-site capability in DotNetNuke to manage departmental websites or micro-sites. This functionality provides a great way to utilize a single installation to manage multiple sites while also keeping various content items isolated. There are also cases when an organization wants to keep the content isolated and not have to maintain independent user accounts for every site. DotNetNuke Professional and Enterprise edition allows organizations to define a group of sites so that user authentication and profile information can be shared across sites within the group.

Reference: DotNetNuke 6.1 blog
Contents
No sections defined
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out