I downloaded the 3.02.03 source and built it, then created an install package and uploaded it to my local DNN 4.4.0 site. Unfortunately, nothing would display. So I checked the MediaModule.ascx.vb file, and noticed the following line added after the line which converts the media file string to lower case:
MediaSrc = LinkClick(MediaSrc, TabId, ModuleId, False)
When I select a JPG file to display, I get the following pointer to the file:
http://localhost/DNN/Portals/0//DNN/LinkClick.aspx?link=nuumart_sitebanner.jpg&tabid=36&mid=373
which is wrong, but what I would expect to be returned from the LinkClick function. So I commented this line out, which seemed to correct the problem, except that the image still didn't appear. Then I noticed the following code had been changed from 3.02.02:
The problem here is that the IndexOf method is an array method, so it returns a 0-origin result. In other words, the check for a string not being present returns a -1, not a 0 as with the InStr function which was used previously. Changing all of the 0s to -1s in the code created a functioning module.
Please let me know if I am simply missing something in the original code. Thanks!
If MediaSrc.IndexOf("://") = 0 Then
MediaSrc = PortalSettings.HomeDirectory & MediaSrc
End If