@@ -131,7 +131,7 @@ protected override void OnLoad(EventArgs e)
131
131
else
132
132
{
133
133
134
- string ctlPath = "~/DesktopModules/activeforums/ controls/_default.ascx";
134
+ string ctlPath = Globals . ModulePath + " controls/_default.ascx";
135
135
ForumBase ctlDefault = ( ForumBase ) ( LoadControl ( ctlPath ) ) ;
136
136
ctlDefault . ID = "ctlConfig" ;
137
137
ctlDefault . ModuleConfiguration = this . ModuleConfiguration ;
@@ -166,7 +166,7 @@ private void GetControl(string view, string options)
166
166
}
167
167
else if ( view . ToUpperInvariant ( ) == "ADVANCED" )
168
168
{
169
- ctl = ( ForumBase ) ( LoadControl ( "~/desktopmodules/activeforums/ advanced.ascx") ) ;
169
+ ctl = ( ForumBase ) ( LoadControl ( Page . ResolveUrl ( Globals . ModulePath + " advanced.ascx") ) ) ;
170
170
}
171
171
else if ( ( view . ToUpperInvariant ( ) == Views . Topics . ToUpperInvariant ( ) ) || ( view . ToUpperInvariant ( ) == "topics" . ToUpperInvariant ( ) ) )
172
172
{
@@ -179,7 +179,7 @@ private void GetControl(string view, string options)
179
179
else if ( view . ToUpperInvariant ( ) == "USERSETTINGS" . ToUpperInvariant ( ) )
180
180
{
181
181
string ctlPath = string . Empty ;
182
- ctlPath = "~/DesktopModules/ActiveForums/ controls/af_profile.ascx";
182
+ ctlPath = Globals . ModulePath + " controls/af_profile.ascx";
183
183
if ( ! ( System . IO . File . Exists ( Server . MapPath ( ctlPath ) ) ) )
184
184
{
185
185
ctl = ( ForumBase ) ( new DotNetNuke . Modules . ActiveForums . Controls . ForumView ( ) ) ;
@@ -193,7 +193,7 @@ private void GetControl(string view, string options)
193
193
{
194
194
// this is where af_post.ascx is used
195
195
string ctlPath = string . Empty ;
196
- ctlPath = "~/DesktopModules/ActiveForums/ controls/af_" + view + ".ascx" ;
196
+ ctlPath = Globals . ModulePath + " controls/af_" + view + ".ascx" ;
197
197
if ( ! ( System . IO . File . Exists ( Server . MapPath ( ctlPath ) ) ) )
198
198
{
199
199
ctl = ( ForumBase ) ( new DotNetNuke . Modules . ActiveForums . Controls . ForumView ( ) ) ;
@@ -259,9 +259,9 @@ private void GetControl(string view, string options)
259
259
ctl . Params = options ;
260
260
}
261
261
ControlsConfig cc = new ControlsConfig ( ) ;
262
- cc . AppPath = Page . ResolveUrl ( "~/DesktopModules/ActiveForums/" ) ;
263
- cc . ThemePath = Page . ResolveUrl ( "~/DesktopModules/ActiveForums/themes/ " + MainSettings . Theme + "/" ) ;
264
- cc . TemplatePath = cc . ThemePath + "templates/" ;
262
+ cc . AppPath = Page . ResolveUrl ( Globals . ModulePath ) ;
263
+ cc . ThemePath = Page . ResolveUrl ( MainSettings . ThemesLocation + "/ " + MainSettings . Theme ) ;
264
+ cc . TemplatePath = Page . ResolveUrl ( MainSettings . TemplatesLocation + "/" ) ;
265
265
cc . SiteId = PortalId ;
266
266
cc . PageId = TabId ;
267
267
cc . InstanceId = ModuleId ;
@@ -318,8 +318,8 @@ private void SetupPage()
318
318
//Register theme
319
319
if ( InheritModuleCSS == false )
320
320
{
321
- ClientResourceManager . RegisterStyleSheet ( this . Page , "~/DesktopModules/ActiveForums/themes /" + MainSettings . Theme + "/module.css" ) ;
322
- ClientResourceManager . RegisterStyleSheet ( this . Page , "~/DesktopModules/ActiveForums/themes /" + MainSettings . Theme + "/jquery-ui.min.css" ) ;
321
+ ClientResourceManager . RegisterStyleSheet ( this . Page , MainSettings . ThemesLocation + " /" + MainSettings . Theme + "/module.css" ) ;
322
+ ClientResourceManager . RegisterStyleSheet ( this . Page , MainSettings . ThemesLocation + " /" + MainSettings . Theme + "/jquery-ui.min.css" ) ;
323
323
}
324
324
325
325
string lang = "en-US" ;
@@ -341,22 +341,22 @@ private void SetupPage()
341
341
ClientAPI . RegisterClientReference ( this . Page , ClientAPI . ClientNamespaceReferences . dnn ) ;
342
342
Framework . jQuery . RequestDnnPluginsRegistration ( ) ;
343
343
344
- ClientResourceManager . RegisterScript ( this . Page , "~/desktopmodules/activeforums/ scripts/jquery-searchPopup.js") ;
344
+ ClientResourceManager . RegisterScript ( this . Page , Globals . ModulePath + " scripts/jquery-searchPopup.js") ;
345
345
346
- ClientResourceManager . RegisterScript ( this . Page , "~/desktopmodules/activeforums/ scripts/json2009.min.js") ;
347
- ClientResourceManager . RegisterScript ( this . Page , "~/desktopmodules/activeforums/ scripts/afcommon.js") ;
348
- ClientResourceManager . RegisterScript ( this . Page , "~/desktopmodules/activeforums/ scripts/afutils.js") ;
349
- ClientResourceManager . RegisterScript ( this . Page , "~/desktopmodules/activeforums/ active/amlib.js") ;
346
+ ClientResourceManager . RegisterScript ( this . Page , Globals . ModulePath + " scripts/json2009.min.js") ;
347
+ ClientResourceManager . RegisterScript ( this . Page , Globals . ModulePath + " scripts/afcommon.js") ;
348
+ ClientResourceManager . RegisterScript ( this . Page , Globals . ModulePath + " scripts/afutils.js") ;
349
+ ClientResourceManager . RegisterScript ( this . Page , Globals . ModulePath + " active/amlib.js") ;
350
350
351
351
StringBuilder sb = new StringBuilder ( ) ;
352
- string handlerURL = VirtualPathUtility . ToAbsolute ( "~/desktopmodules/activeforums/ handlers/forumhelper.ashx") + "?TabId=" + TabId . ToString ( ) + "&PortalId=" + PortalId . ToString ( ) + "&moduleid=" + ModuleId + "&language=" + lang ;
352
+ string handlerURL = VirtualPathUtility . ToAbsolute ( Globals . ModulePath + " handlers/forumhelper.ashx") + "?TabId=" + TabId . ToString ( ) + "&PortalId=" + PortalId . ToString ( ) + "&moduleid=" + ModuleId + "&language=" + lang ;
353
353
sb . AppendFormat ( "var afHandlerURL = '{0}';" , handlerURL ) ;
354
- sb . AppendLine ( "var af_imgPath = '" + VirtualPathUtility . ToAbsolute ( "~/DesktopModules/ActiveForums/themes/ " + MainSettings . Theme ) + "';" ) ;
354
+ sb . AppendLine ( "var af_imgPath = '" + VirtualPathUtility . ToAbsolute ( MainSettings . ThemesLocation + "/ " + MainSettings . Theme ) + "/images/ ';" ) ;
355
355
string sLoadImg = "" ;
356
- sLoadImg = "var afSpinLg = new Image();afSpinLg.src='" + VirtualPathUtility . ToAbsolute ( "~/desktopmodules/activeforums/ images/spinner-lg.gif") + "';" ;
357
- sLoadImg += "var afSpin = new Image();afSpin.src='" + VirtualPathUtility . ToAbsolute ( "~/desktopmodules/activeforums/ images/spinner.gif") + "';" ;
356
+ sLoadImg = "var afSpinLg = new Image();afSpinLg.src='" + VirtualPathUtility . ToAbsolute ( Globals . ModulePath + " images/spinner-lg.gif") + "';" ;
357
+ sLoadImg += "var afSpin = new Image();afSpin.src='" + VirtualPathUtility . ToAbsolute ( Globals . ModulePath + " images/spinner.gif") + "';" ;
358
358
sb . AppendLine ( sLoadImg ) ;
359
- sb . AppendLine ( Utilities . LocalizeControl ( Utilities . GetFile ( Server . MapPath ( "~/desktopmodules/activeforums/ scripts/resx.js") ) , false , true ) ) ;
359
+ sb . AppendLine ( Utilities . LocalizeControl ( Utilities . GetFile ( Server . MapPath ( Globals . ModulePath + " scripts/resx.js") ) , false , true ) ) ;
360
360
if ( HttpContext . Current . Request . IsAuthenticated && MainSettings . UsersOnlineEnabled )
361
361
{
362
362
sb . AppendLine ( "setInterval('amaf_pinger()',120000);" ) ;
@@ -370,10 +370,8 @@ private void SetupPage()
370
370
371
371
if ( ForumUser . Profile . IsMod )
372
372
{
373
- ClientResourceManager . RegisterScript ( this . Page , "~/desktopmodules/activeforums/scripts/afmod.js" ) ;
374
- ClientResourceManager . RegisterStyleSheet ( this . Page , "~/DesktopModules/ActiveForums/active/am-ui.css" ) ;
375
-
376
-
373
+ ClientResourceManager . RegisterScript ( this . Page , Globals . ModulePath + "scripts/afmod.js" ) ;
374
+ ClientResourceManager . RegisterStyleSheet ( this . Page , Globals . ModulePath + "active/am-ui.css" ) ;
377
375
}
378
376
379
377
@@ -414,7 +412,7 @@ protected override void OnPreRender(EventArgs e)
414
412
object sToolbar = DataCache . CacheRetrieve ( "aftb" + ForumModuleId ) ;
415
413
if ( sToolbar == null )
416
414
{
417
- sToolbar = Utilities . GetFileContent ( SettingKeys . TemplatePath + "ToolBar.txt" ) ;
415
+ sToolbar = Utilities . GetFileContent ( Globals . DefaultTemplatePath + "ToolBar.txt" ) ;
418
416
DataCache . CacheStore ( "aftb" + ForumModuleId , sToolbar ) ;
419
417
}
420
418
lit . Text = sToolbar . ToString ( ) ;
@@ -430,15 +428,15 @@ protected override void OnPreRender(EventArgs e)
430
428
ctl . Height = "350px" ;
431
429
ctl . Width = "400px" ;
432
430
ctl . Name = Utilities . GetSharedResource ( "[RESX:TopicQuickEdit]" ) ;
433
- ctl . FilePath = "~/desktopmodules/activeforums/ controls/htmlcontrols/quickedit.ascx";
431
+ ctl . FilePath = Globals . ModulePath + " controls/htmlcontrols/quickedit.ascx";
434
432
this . Controls . Add ( ctl ) ;
435
433
436
434
ctl = new Controls . HtmlControlLoader ( ) ;
437
435
ctl . ControlId = "aftopicmove" ;
438
436
ctl . Height = "350px" ;
439
437
ctl . Width = "500px" ;
440
438
ctl . Name = Utilities . GetSharedResource ( "[RESX:MoveTopicTitle]" ) ;
441
- ctl . FilePath = "~/desktopmodules/activeforums/ controls/htmlcontrols/movetopic.ascx";
439
+ ctl . FilePath = Globals . ModulePath + " controls/htmlcontrols/movetopic.ascx";
442
440
this . Controls . Add ( ctl ) ;
443
441
}
444
442
}
0 commit comments