If it posts ok this is ControlSlideshow.ascx.vb with my changes hacked straight in marked with 'JM: (quick hack not intended as ideal solution).
[I still can't use this module though, too many other problems - seriously thinking about investing my time in Sharepoint customisations instead, the image library module there is pretty good really]
'
' DotNetNuke - http://www.dotnetnuke.com
' Copyright (c) 2002-2005
' by Shaun Walker ( sales@perpetualmotion.ca ) of Perpetual Motion Interactive Systems Inc. ( http://www.perpetualmotion.ca )
'
' Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
' documentation files (the "Software"), to deal in the Software without restriction, including without limitation
' the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
' to permit persons to whom the Software is furnished to do so, subject to the following conditions:
'
' The above copyright notice and this permission notice shall be included in all copies or substantial portions
' of the Software.
'
' THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
' TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
' THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
' CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
' DEALINGS IN THE SOFTWARE.
'
Option Strict On
Imports System.Text
Imports System.IO
Imports system.xml
Imports DotNetNuke.Common.Globals
Imports DotNetNuke.Modules.Gallery.Utils
'JM:
Imports DotNetNuke.Entities.Portals
Imports DotNetNuke.Entities.Modules
Namespace DotNetNuke.Modules.Gallery.WebControls
Public Class Slideshow
Inherits System.Web.UI.UserControl
Protected WithEvents ClientJavascript As System.Web.UI.WebControls.Label
Protected WithEvents ImageSrc As System.Web.UI.WebControls.Label
Protected WithEvents pnlModuleContent As System.Web.UI.WebControls.Panel
Protected WithEvents ErrorMessage As System.Web.UI.WebControls.Label
Protected WithEvents btnBack As System.Web.UI.WebControls.ImageButton
Private mModuleID As Integer
Private mGalleryConfig As DotNetNuke.Modules.Gallery.Config
Private mRequest As GalleryUserRequest
Private mSort As Config.GallerySort
Protected WithEvents celPicture As System.Web.UI.HtmlControls.HtmlTableCell
'JM:
Private _portalSettings As PortalSettings = PortalController.GetCurrentPortalSettings
Private mSortDESC As Boolean
#Region " Web Form Designer Generated Code "
'This call is required by the Web Form Designer.
Private Sub InitializeComponent()
End Sub
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
If Not Request.QueryString("mid") Is Nothing Then
mModuleID = Int16.Parse(Request.QueryString("mid"))
End If
mGalleryConfig = Config.GetGalleryConfig(mModuleID)
mSort = Utils.GetSort(mGalleryConfig)
mSortDESC = Utils.GetSortDesc(mGalleryConfig)
End Sub
#End Region
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
ErrorMessage.Visible = False
mRequest = New GalleryUserRequest(mModuleID)
If Not mRequest.Folder.IsPopulated Then
Response.Redirect(ApplicationURL)
End If
'JM:
_portalSettings = PortalController.GetCurrentPortalSettings
If mRequest.Folder.IsBrowsable Then
celPicture.Width = mGalleryConfig.FixedWidth.ToString
celPicture.Height = mGalleryConfig.FixedHeight.ToString
Dim albumPath As String = mRequest.Folder.Path
Dim slideSpeed As String = CType(mGalleryConfig.SlideshowSpeed, String)
Dim sb As New StringBuilder
Dim StartImage As String
'Generate Clientside Javascript for Slideshow
Dim JavaScript As String = ""
Dim Count As Integer
sb.Append("")
ClientJavascript.Text = sb.ToString
'JM: ImageSrc.Text = "" 'style='border-color:#D1D7DC;border-width:2px;border-style:Outset;'>"
ImageSrc.Text = "" 'style='border-color:#D1D7DC;border-width:2px;border-style:Outset;'>"
Else
ErrorMessage.Visible = True
ErrorMessage.Text = "Album contents no image!"
End If
End Sub
'JM:
Protected Function ImageURL(ByVal image As GalleryFile) As String
On Error Resume Next
Dim RequestURL As String = Request.Url.ToString
Dim url As String
'Dim _portalSettings As PortalSettings = PortalController.GetCurrentPortalSettings
url = Page.ResolveUrl("Image.aspx?tabid=" & _portalSettings.ActiveTab.TabID & "&mid=" & GalleryConfig.ModuleID.ToString & "&path=¤titem=" & image.Index & "¤tstrip=1")
Return url
End Function
Public ReadOnly Property GalleryConfig() As DotNetNuke.Modules.Gallery.Config
Get
Return mGalleryConfig
End Get
End Property
End Class
End Namespace