Skip to content

Commit d318791

Browse files
authored
Merge pull request #1329 from DNNCommunity/dev
Syncing branches for the 8.2.6 release
2 parents 5be4751 + 0d48c67 commit d318791

24 files changed

+270
-182
lines changed

Dnn.CommunityForums/DnnCommunityForums.dnn

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<dotnetnuke type="Package" version="5.0">
22
<packages>
3-
<package name="Active Forums" type="Module" version="08.02.05">
3+
<package name="Active Forums" type="Module" version="08.02.06">
44
<friendlyName>DNN Community Forums</friendlyName>
55
<description>DNN Community Forums: The official online forums module for the DNN Community.</description>
66
<iconFile>DesktopModules/ActiveForums/images/branding/logo/DNN-Community-Forums-Icon-64px.png</iconFile>
@@ -86,7 +86,7 @@
8686
<assembly>
8787
<name>DotNetNuke.Modules.ActiveForums.dll</name>
8888
<sourceFileName>bin\DotNetNuke.Modules.ActiveForums.dll</sourceFileName>
89-
<version>08.02.05</version>
89+
<version>08.02.06</version>
9090
</assembly>
9191
</assemblies>
9292
</component>
@@ -417,7 +417,7 @@
417417
<script type="UnInstall">
418418
<path>sql</path>
419419
<name>Uninstall.SqlDataProvider</name>
420-
<version>08.02.05</version>
420+
<version>08.02.06</version>
421421
</script>
422422
</scripts>
423423
</component>
@@ -460,7 +460,7 @@
460460
</components>
461461
</package>
462462

463-
<package name="Active Forums What's New" type="Module" version="08.02.05">
463+
<package name="Active Forums What's New" type="Module" version="08.02.06">
464464

465465
<friendlyName>DNN Community Forums What's New</friendlyName>
466466
<foldername>ActiveForumsWhatsNew</foldername>
@@ -530,7 +530,7 @@
530530
</components>
531531
</package>
532532

533-
<package name="Active Forums Viewer" type="Module" version="08.02.05">
533+
<package name="Active Forums Viewer" type="Module" version="08.02.06">
534534
<friendlyName>DNN Community Forums Forums Viewer</friendlyName>
535535
<foldername>ActiveForumsViewer</foldername>
536536
<description>DNN Community Forums: Display any forum topic view on any page within your site.</description>

Dnn.CommunityForums/DnnCommunityForums_Symbols.dnn

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<dotnetnuke type="Package" version="5.0">
22
<packages>
3-
<package name="Active Forums_Symbols" type="Library" version="08.02.05">
3+
<package name="Active Forums_Symbols" type="Library" version="08.02.06">
44

55
<friendlyName>DNN Community Forums Symbols</friendlyName>
66
<description>DNN Community Forums: The official online forums module for the DNN Community.</description>
@@ -15,7 +15,7 @@
1515
<releaseNotes src="ReleaseNotes.txt" />
1616
<azureCompatible>True</azureCompatible>
1717
<dependencies>
18-
<dependency type="managedPackage" version="8.2.5">Active Forums</dependency>
18+
<dependency type="managedPackage" version="8.2.6">Active Forums</dependency>
1919
</dependencies>
2020
<components>
2121
<component type="ResourceFile">

Dnn.CommunityForums/Properties/AssemblyInfo.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@
5252
// You can specify all the values or you can default the Build and Revision Numbers
5353
// by using the '*' as shown below:
5454

55-
[assembly: AssemblyVersion("08.02.05")]
55+
[assembly: AssemblyVersion("08.02.06")]
5656

57-
[assembly: AssemblyFileVersion("08.02.05")]
57+
[assembly: AssemblyFileVersion("08.02.06")]
5858

5959
[assembly: WebResource("DotNetNuke.Modules.ActiveForums.CustomControls.Resources.cb.js", "text/javascript")]
6060
[assembly: WebResource("DotNetNuke.Modules.ActiveForums.scripts.afadmin.properties.js", "text/javascript")]

Dnn.CommunityForums/ReleaseNotes.txt

+8-5
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
<hr />
9090

9191
<h3>
92-
08.02.05
92+
08.02.06
9393
</h3>
9494
<p>
9595
<b>THANK YOU</b> for all of the valuable contributions by <a href="https://github.com/johnhenley" target="_blank">@johnhenley</a>,
@@ -102,8 +102,7 @@
102102

103103
<h4>New Features &amp; Enhancements</h4>
104104
<ul>
105-
<li>Improved User Experience When Placing the Module on a Page (<a href="https://github.com/DNNCommunity/Dnn.CommunityForums/issues/1305">Issue 1305</a>)</li>
106-
<li>Improved User Experience When Placing the Module on Blue Backgrounds (<a href="https://github.com/DNNCommunity/Dnn.CommunityForums/issues/1304">Issue 1304</a>)</li>
105+
<li>UPDATE: Removed Search Text from Views on Mobile Browsers (<a href="https://github.com/DNNCommunity/Dnn.CommunityForums/issues/1281">Issue 1281</a>)</li>
107106
<!--
108107
<li>UPDATE: (<a href="https://github.com/DNNCommunity/Dnn.CommunityForums/issues/">Issue </a>)</li>
109108
<li>None at this time.</li>
@@ -112,7 +111,11 @@
112111

113112
<h4>Bug Fixes</h4>
114113
<ul>
115-
<li>FIXED: Topics Not Showing to Anonymous Visitors (<a href="https://github.com/DNNCommunity/Dnn.CommunityForums/issues/1301">Issue 1301</a>!)</li>
114+
<li>FIXED: Module Intitilization Overwrites Bootstrap Theme (<a href="https://github.com/DNNCommunity/Dnn.CommunityForums/issues/1312">Issue 1312</a>!)</li>
115+
<li>FIXED: New Users Unable to Create New Posts Due to Flood Control (<a href="https://github.com/DNNCommunity/Dnn.CommunityForums/issues/1319">Issue 1319</a>!)</li>
116+
<li>FIXED: Unable to Press Enter to Start Searching (<a href="https://github.com/DNNCommunity/Dnn.CommunityForums/issues/1311">Issue 1311</a>!)</li>
117+
<li>FIXED: Child Forums Not Aligned with Other Forums (<a href="https://github.com/DNNCommunity/Dnn.CommunityForums/issues/1303">Issue 1303</a>!)</li>
118+
<li>FIXED: Icons Not Aligned Properly in the Forum View (<a href="https://github.com/DNNCommunity/Dnn.CommunityForums/issues/1322">Issue 1322</a>!)</li>
116119
<!--
117120
<li>FIXED: (<a href="https://github.com/DNNCommunity/Dnn.CommunityForums/issues/">Issue </a>!)</li>
118121
<li>None at this time.</li>
@@ -121,7 +124,7 @@
121124

122125
<h4>Tasks / Development Updates (and Technical Debt)</h4>
123126
<ul>
124-
<li>Release Prep: 08.02.05 (<a href="https://github.com/DNNCommunity/Dnn.CommunityForums/issues/1313">Issue 1313</a>)</li>
127+
<li>Release Prep: 08.02.06 (<a href="https://github.com/DNNCommunity/Dnn.CommunityForums/issues/1327">Issue 1327</a>)</li>
125128
<!--
126129
<li>TASK: (<a href="https://github.com/DNNCommunity/Dnn.CommunityForums/issues/">Issue </a>)</li>
127130
<li>None at this time.</li>

Dnn.CommunityForums/class/ForumsConfig.cs

+37-38
Original file line numberDiff line numberDiff line change
@@ -334,48 +334,47 @@ internal void Install_Or_Upgrade_MoveTemplates_080000()
334334
if (!System.IO.Directory.Exists(themeFolder.FullName + "/templates"))
335335
{
336336
System.IO.Directory.CreateDirectory(themeFolder.FullName + "/templates");
337-
}
338-
}
339-
340-
TemplateController tc = new TemplateController();
341-
foreach (TemplateInfo templateInfo in tc.Template_List(-1, -1))
342-
{
343-
/* during upgrade, explicitly (re-)load template text from database rather than Template_List API since API loads template using fallback/default logic and doesn't yet have the upgraded template text */
344-
/* if installing version 8.2 or greater, only convert these specific templates */
345-
if ((new Version(DesktopModuleController.GetDesktopModuleByFriendlyName(Globals.ModuleFriendlyName).Version) < new Version(8, 2)) ||
346-
((templateInfo.TemplateType == Templates.TemplateTypes.ForumView) ||
347-
(templateInfo.TemplateType == Templates.TemplateTypes.TopicView) ||
348-
(templateInfo.TemplateType == Templates.TemplateTypes.TopicsView) ||
349-
(templateInfo.TemplateType == Templates.TemplateTypes.TopicForm) ||
350-
(templateInfo.TemplateType == Templates.TemplateTypes.Profile) ||
351-
(templateInfo.TemplateType == Templates.TemplateTypes.PostInfo) ||
352-
(templateInfo.TemplateType == Templates.TemplateTypes.QuickReplyForm)))
353-
{
354-
IDataReader dr = DataProvider.Instance().Templates_Get(templateInfo.TemplateId, templateInfo.PortalId, templateInfo.ModuleId);
355-
while (dr.Read())
337+
TemplateController tc = new TemplateController();
338+
foreach (TemplateInfo templateInfo in tc.Template_List(-1, -1))
356339
{
357-
try
340+
/* during upgrade, explicitly (re-)load template text from database rather than Template_List API since API loads template using fallback/default logic and doesn't yet have the upgraded template text */
341+
/* if installing version 8.2 or greater, only convert these specific templates */
342+
if ((Globals.ModuleVersion < new Version(8, 2)) ||
343+
((templateInfo.TemplateType == Templates.TemplateTypes.ForumView) ||
344+
(templateInfo.TemplateType == Templates.TemplateTypes.TopicView) ||
345+
(templateInfo.TemplateType == Templates.TemplateTypes.TopicsView) ||
346+
(templateInfo.TemplateType == Templates.TemplateTypes.TopicForm) ||
347+
(templateInfo.TemplateType == Templates.TemplateTypes.Profile) ||
348+
(templateInfo.TemplateType == Templates.TemplateTypes.PostInfo) ||
349+
(templateInfo.TemplateType == Templates.TemplateTypes.QuickReplyForm)))
358350
{
359-
/* convert only legacy html portion of the template and save without encoding */
360-
string template = Convert.ToString(dr["Template"]).Replace("[TRESX:", "[RESX:");
361-
if (template.Contains("<html>"))
351+
IDataReader dr = DataProvider.Instance().Templates_Get(templateInfo.TemplateId, templateInfo.PortalId, templateInfo.ModuleId);
352+
while (dr.Read())
362353
{
363-
string sHTML;
364-
var xDoc = new System.Xml.XmlDocument();
365-
xDoc.LoadXml(template);
366-
System.Xml.XmlNode xNode;
367-
System.Xml.XmlNode xRoot = xDoc.DocumentElement;
368-
xNode = xRoot.SelectSingleNode("/template/html");
369-
sHTML = xNode.InnerText;
370-
template = sHTML;
354+
try
355+
{
356+
/* convert only legacy html portion of the template and save without encoding */
357+
string template = Convert.ToString(dr["Template"]).Replace("[TRESX:", "[RESX:");
358+
if (template.Contains("<html>"))
359+
{
360+
string sHTML;
361+
var xDoc = new System.Xml.XmlDocument();
362+
xDoc.LoadXml(template);
363+
System.Xml.XmlNode xNode;
364+
System.Xml.XmlNode xRoot = xDoc.DocumentElement;
365+
xNode = xRoot.SelectSingleNode("/template/html");
366+
sHTML = xNode.InnerText;
367+
template = sHTML;
368+
}
369+
370+
templateInfo.Template = System.Net.WebUtility.HtmlDecode(template);
371+
tc.Template_Save(templateInfo);
372+
}
373+
catch (Exception ex)
374+
{
375+
DotNetNuke.Services.Exceptions.Exceptions.LogException(ex);
376+
}
371377
}
372-
373-
templateInfo.Template = System.Net.WebUtility.HtmlDecode(template);
374-
tc.Template_Save(templateInfo);
375-
}
376-
catch (Exception ex)
377-
{
378-
DotNetNuke.Services.Exceptions.Exceptions.LogException(ex);
379378
}
380379
}
381380
}

Dnn.CommunityForums/class/Globals.cs

+3
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
namespace DotNetNuke.Modules.ActiveForums
2222
{
2323
using System;
24+
using DotNetNuke.Entities.Modules;
2425

2526
#region Enumerations
2627

@@ -174,6 +175,8 @@ public static string DefaultAnonRoles
174175
public const string LikeNotificationTypeDescription = Globals.ModuleFriendlyName + " Like Notification";
175176
public const string PinNotificationType = "DCF-PinNotification";
176177
public const string PinNotificationTypeDescription = Globals.ModuleFriendlyName + " Pin Notification";
178+
179+
public static Version ModuleVersion => new Version(DesktopModuleController.GetDesktopModuleByFriendlyName(Globals.ModuleFriendlyName).Version);
177180
}
178181

179182
public class SettingKeys

Dnn.CommunityForums/class/Utilities.cs

+3-2
Original file line numberDiff line numberDiff line change
@@ -191,15 +191,16 @@ internal static bool HasFloodIntervalPassed(int floodInterval, DotNetNuke.Module
191191
3) user is an admin or superuser
192192
4) user is designated as a trusted user for the forum
193193
5) user has moderator (edit, delete, approve) permissions for the forum
194-
6) time span for since user's last post or reply exceeds flood interval
195-
*/
194+
6) user has never posted
195+
7) time span for since user's last post or reply exceeds flood interval*/
196196
return floodInterval <= 0
197197
|| forumUser == null
198198
|| forumUser.IsAnonymous
199199
|| forumUser.IsAdmin
200200
|| forumUser.IsSuperUser
201201
|| Utilities.IsTrusted((int)forumInfo.FeatureSettings.DefaultTrustValue, userTrustLevel: forumUser.TrustLevel, DotNetNuke.Modules.ActiveForums.Controllers.PermissionController.HasPerm(forumInfo.Security.Trust, forumUser.UserRoles), forumInfo.FeatureSettings.AutoTrustLevel, forumUser.PostCount)
202202
|| DotNetNuke.Modules.ActiveForums.Controllers.PermissionController.HasPerm(forumInfo.Security.Moderate, forumUser.UserRoles)
203+
|| (forumUser.DateLastPost == null)
203204
|| (forumUser.DateLastPost != null && SimulateDateDiff.DateDiff(SimulateDateDiff.DateInterval.Second, (DateTime)forumUser.DateLastPost, DateTime.UtcNow) > floodInterval)
204205
|| (forumUser.DateLastReply != null && SimulateDateDiff.DateDiff(SimulateDateDiff.DateInterval.Second, (DateTime)forumUser.DateLastReply, DateTime.UtcNow) > floodInterval);
205206
}
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,31 @@
1+
<script type="text/javascript">
2+
//prevent submit from Enter key
3+
$(document).ready(function () {
4+
$(window).keydown(function (event) {
5+
if (event.keyCode === 13) {
6+
event.preventDefault();
7+
return false;
8+
}
9+
});
10+
});
11+
function CheckEnterPressed(a, e) {
12+
if (e.keyCode === 13) {
13+
// Enter pressed
14+
document.getElementById('btnSearch').click();
15+
}
16+
};
17+
</script>
118
<div class="dcf-quick-search aftb-search" data-searchurl="[AF:TB:SearchURL]">
219
<span class="dcf-search-link aftb-search-link">
320
<span>
4-
<i class="fa fa-search fa-fw fa-blue"></i>&nbsp;[AF:TB:SearchText]
21+
<i class="fa fa-search fa-fw fa-blue"></i><span class="dcf-search-link-text">[AF:TB:SearchText]</span>
522
</span>
623
<span class="ui-icon ui-icon-triangle-1-s"></span>
724
</span>
825
<div class="dcf-search-popup aftb-search-popup">
926
<div class="dcf-search-input">
10-
<input class="dcf-search-input" type="text" placeholder="[RESX:SearchFor]" maxlength="50">
11-
<button class="dcf-search-button">[RESX:Search]</button>
27+
<input class="dcf-search-input" type="text" placeholder="[RESX:SearchFor]" maxlength="50" onkeydown="CheckEnterPressed(this, event)">
28+
<button id="btnSearch" class="dcf-search-button">[RESX:Search]</button>
1229
</div>
1330
<div class="dcf-search-options">
1431
<a class="dcf-search-option-advanced" href="[AF:TB:AdvancedSearchURL]">[RESX:SearchAdvanced]</a>
@@ -20,4 +37,4 @@
2037
</span>
2138
</div>
2239
</div>
23-
</div>
40+
</div>

Dnn.CommunityForums/themes/community-bootstrap/_src/scss/parts/_toolbar.scss

+9
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,15 @@
6464
cursor: pointer;
6565
}
6666

67+
// Hide search text on mobile
68+
.dcf-search-link-text{
69+
display:none;
70+
@media screen and (min-width: $break-tablet){
71+
display:inline;
72+
margin-left: 0.2em;
73+
}
74+
}
75+
6776
.dcf-search-popup {
6877
background: white;
6978
border: solid 1px #eee;

Dnn.CommunityForums/themes/community-bootstrap/_src/scss/theme.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@
1616
@import "parts/_topics-view.scss";
1717
@import "parts/_topic-view.scss";
1818

19-
}
19+
}

Dnn.CommunityForums/themes/community-bootstrap/templates/ForumView.ascx

+5-6
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
<tr class="dcf-table-body-row">
4949
<td class="dcf-col dcf-col-text">
5050
<div class="d-flex">
51-
[FORUM:FORUMICONCSS|<div class="dcf-forum-icon pe-2"><i class="fa {0} fa-2x"></i></div>
51+
[FORUM:FORUMICONCSS|<div class="dcf-forum-icon pr-2 pe-2"><i class="fa {0} fa-2x"></i></div>
5252
]
5353
<div class="dcf-forum-title-text">
5454
<h4 class="dcf-forum-title h5 mt-0 mb-2">[FORUM:FORUMLINK|
@@ -78,15 +78,14 @@
7878
</tr>
7979

8080
[SUBFORUMS]
81-
<tr class="dcf-table-body-row dcf-sub-forums">
82-
<td class="dcf-col dcf-col-icon"></td>
83-
<td class="dcf-col" colspan="5">
84-
<h5 class="dcf-sub-forum-title">[RESX:Child] [RESX:FORUMS]</h5>
81+
<tr class="dcf-table-body-row dcf-sub-forums">
82+
<td class="dcf-col pl-5 px-5" colspan="5">
83+
<h5 class="dcf-sub-forum-title h6 my-1">[RESX:Child] [RESX:FORUMS]</h5>
8584
</td>
8685
</tr>
8786
<tr class="dcf-table-body-row dcf-sub-forums">
8887

89-
<td class="dcf-col dcf-col-text">
88+
<td class="dcf-col dcf-col-text pl-5 ps-5">
9089
<span class="dcf-forum-title h6">[FORUM:FORUMLINK|
9190
<a href="{0}" class="dcf-forum-link">[FORUM:FORUMNAME]</a>
9291
]</span>
Binary file not shown.

Dnn.CommunityForums/themes/community-bootstrap/theme.css

+9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)