Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsMediaMediaMedia Module 3.02.03 Source Appears FlawedMedia Module 3.02.03 Source Appears Flawed
Previous
 
Next
New Post
1/19/2007 8:02 PM
 

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
 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsMediaMediaMedia Module 3.02.03 Source Appears FlawedMedia Module 3.02.03 Source Appears Flawed


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out