Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

AspDotNetStoreFront
  Need Help?  
Professional technical support for DotNetNuke is available from DotNetNuke Corporation.
 


  Ads  
r2i.ntegrated
 


  Sponsors  

Meet Our Sponsors

DataSprings - Great Ideas. Always Flowing.
R2integrated - formerly bi4ce
Jango Studios - Skins, Modules and Hosting for DotNetNuke
eUKhost.com is commited to offer exceptional UK Windows Web Hosting solutions with quality 24x7 technical support.Our plans support ASP.Net, ASP, ASP.NET Ajax extensions, XML, MSSQL, MySQL, PHP,DNN, multiple domains and Shared SSL as standard.
SmarterTools
The Official Microsoft ASP.NET Website
 


DotNetNuke Forums
 
  Forum  DotNetNuke® Pro...  Media Module [L...  Media Module 3.02.03 Source Appears Flawed
Previous Previous
 
Next Next
New Post 1/19/2007 5:02 PM
User is offline Rod Campbell
1 posts
10th Ranked


Media Module 3.02.03 Source Appears Flawed 

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 Previous
 
Next Next
  Forum  DotNetNuke® Pro...  Media Module [L...  Media Module 3.02.03 Source Appears Flawed
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, 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 DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


Perpetual Motion Interactive Systems Inc.
A solutions company specializing in Microsoft enterprise technologies.
www.perpetualmotion.ca
Icthus Technologies
Building Faith on the Internet
www.icthustech.com
Efficion Consulting
A premier DotNetNuke consulting firm providing complete DNN services including: custom module development, skinning and design, installation and integration services.
www.efficionconsulting.com

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP