Will "the Mighty" Strohl

Media Module Released with Social Integration and Now in C#

DotNetNuke Media Module

I couldn’t believe it when I saw it, but the last official release of the Media Module for DotNetNuke was in January of this year!  That is way too long for this module to go without having a release.  Therefore, I am very excited to get this release out the door, and even more excited about the nature of the updates that can be found in this release.

PLEASE NOTE:  The Forge where the module is hosted will take up to 24 hours before the release is reflected.

If you are not aware, the Media Module began several years ago and was called the Image Module.  All it could do was allow you to choose or upload an image.  Not the most exciting module out there, I know.  Later, the module included support for rendering the appropriate HTML for videos and Flash and was renamed as the Media Module.  It wasn’t long after this when I took over the project.  There have (in my opinion) been some great releases since then adding things like oEmbed support, and more.  These kinds of upgrades really redefined what the module allowed you to do since now “media” could be anything.  It could be embed codes from your favorite site, or content from well over 200 websites that support oEmbed

Today, I am excited to announce some very exciting updates that have just been rolled out in this release which I hope you will enjoy to take your media integration and features to the next level…

C# Conversion

This release marks the very first release of the Media Module written in C#.  All prior versions was written in VB.  There were no ideological reasons for this.  The reason was simple…  I was about to speak at a C# user group – so I needed to either build a new module in C#, or convert an existing project to C#.  With the core of DotNetNuke being written in C# now, it made sense to convert this module due to it historically being included with the core. 

Media Module C# Conversion

I used a tool called Instant C# to convert the project, and it did amazingly well.  This project isn’t huge with only 2,600 lines of code, but I was still impressed that I only needed to resolve 18 errors in the entire project.  They were very easy things too.  Mostly, it was adding appropriate references to the class files.  The only other thing I had an issue with were the user controls.  I kept trying to build the project, but the designer files for the user controls were not properly picking up the correct types.  After way too much troubleshooting and trickery, I finally found that the class files for the user controls had been turned into abstract classes.  Once I fixed that, the module was already usable with the existing features from the earlier release.

Media now Includes SOCIAL

Part of the reasons I chose to update this module was to integrate it with the social features in the 06.02.00 release of DotNetNuke.  This means that you cannot install this release on any prior versions of DNN.  However, the integration is pretty nice (and fairly easy to do). 

Media Module Social Integration

Administrators can set a site-wide setting to determine whether updates to the media module are posted to the journal as a status update.  You can also set another site-wide setting to notify site administrators when the media module has been updated.  This could be a useful feature, if you want to keep an eye on what media people are posting on your site.

Media HTML Generation Now an API

Part of the roadmap for the Media Module has always been to take the HTML logic out of the views in such a way that it could be an API for another other module to use.  This would allow other modules to also display media in the same way this module does.  Thanks to the social features and how the integration was needed to be done, this has been done as of this release.  As long as this module is installed on your development site, you can program against the Media Module to easily display any content using a simple API call.  Just make sure when you redeploy your own modules, that you also redeploy this one too.

Get HTML from Media Module

The code sample above literally returns either a useful error, or the HTML you want to display.  This is abstracted a level further in the actual Media Module business controller class.

Other Updates

Media Module BrandingAll of the other updates are pretty minor.  The module is now branded with the DNN-colored M for “Media.”  When you choose to edit this module on your site, or add it to a page, look for this logo.

I thought I had support for MPG in the past, but as it turned out, there was a bug in a very specific spot that would actually ignore the MPG files entirely.  Now, these files are fully supported.

There was another nasty bug that I didn’t anticipate on sites where the original superuser/host account had been deleted from a site.  On any site with this configuration, the module actually wouldn’t install properly.  This issue has been fixed for this release.  However, it is not back-ported to prior releases.

Download the Media Module

PLEASE NOTE: The Forge where the module is hosted will take up to 24 hours before the release is reflected.

blog comments powered by Disqus