Skip to content

Commit fde903e

Browse files
authored
Merge pull request #259 from DNNCommunity/dev
07.00.05 release merge
2 parents afeac7c + 05075a6 commit fde903e

17 files changed

+333
-141
lines changed

ActiveForums.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -644,7 +644,7 @@
644644
<None Include="sql\06.04.01.SqlDataProvider" />
645645
<None Include="sql\07.00.02.SqlDataProvider" />
646646
<None Include="sql\07.00.00.SqlDataProvider" />
647-
<None Include="sql\07.00.02.SqlDataProvider" />
647+
<None Include="sql\07.00.05.SqlDataProvider" />
648648
<None Include="sql\Enterprise.sql" />
649649
<Content Include="config\templates\ModAlert_text.txt" />
650650
<Content Include="config\templates\ModEmail_text.txt" />

ActiveForums.dnn

Lines changed: 27 additions & 17 deletions
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="07.00.04">
3+
<package name="Active Forums" type="Module" version="07.00.05">
44
<friendlyName>Active Forums</friendlyName>
55
<description>Community Forums: The official online forums module for the DNN Community.</description>
66
<iconFile>DesktopModules/ActiveForums/images/af6_icon.jpg</iconFile>
@@ -73,7 +73,7 @@
7373
<attributes>
7474
<businessControllerClass>DotNetNuke.Modules.ActiveForums.TopicsController, DotNetNuke.Modules.ActiveForums</businessControllerClass>
7575
<desktopModuleID>[DESKTOPMODULEID]</desktopModuleID>
76-
<upgradeVersionsList>06.04.00,06.04.01,06.05.00,06.05.01,06.06.00,07.00.00,07.00.01,07.00.04</upgradeVersionsList>
76+
<upgradeVersionsList>06.04.00,06.04.01,06.05.00,06.05.01,06.06.00,07.00.00,07.00.01,07.00.02,07.00.03,07.00.04,07.00.05</upgradeVersionsList>
7777
</attributes>
7878
</eventMessage>
7979
</component>
@@ -84,7 +84,7 @@
8484
<assembly>
8585
<name>DotNetNuke.Modules.ActiveForums.dll</name>
8686
<sourceFileName>bin\DotNetNuke.Modules.ActiveForums.dll</sourceFileName>
87-
<version>07.00.04</version>
87+
<version>07.00.05</version>
8888
</assembly>
8989
</assemblies>
9090
</component>
@@ -329,20 +329,30 @@
329329
<name>06.04.01.SqlDataProvider</name>
330330
<version>06.04.01</version>
331331
</script>
332-
<script type="Install">
333-
<path>sql</path>
334-
<name>07.00.00.SqlDataProvider</name>
335-
<version>07.00.00</version>
336-
</script>
337-
<script type="Install">
338-
<path>sql</path>
339-
<name>07.00.04.SqlDataProvider</name>
340-
<version>07.00.04</version>
341-
</script>
342-
<script type="UnInstall">
332+
<script type="Install">
333+
<path>sql</path>
334+
<name>07.00.00.SqlDataProvider</name>
335+
<version>07.00.00</version>
336+
</script>
337+
<script type="Install">
338+
<path>sql</path>
339+
<name>07.00.02.SqlDataProvider</name>
340+
<version>07.00.02</version>
341+
</script>
342+
<script type="Install">
343+
<path>sql</path>
344+
<name>07.00.04.SqlDataProvider</name>
345+
<version>07.00.04</version>
346+
</script>
347+
<script type="Install">
348+
<path>sql</path>
349+
<name>07.00.05.SqlDataProvider</name>
350+
<version>07.00.05</version>
351+
</script>
352+
<script type="UnInstall">
343353
<path>sql</path>
344354
<name>Uninstall.SqlDataProvider</name>
345-
<version>07.00.04</version>
355+
<version>07.00.05</version>
346356
</script>
347357
</scripts>
348358
</component>
@@ -378,7 +388,7 @@
378388
</components>
379389
</package>
380390

381-
<package name="Active Forums What's New" type="Module" version="07.00.04">
391+
<package name="Active Forums What's New" type="Module" version="07.00.05">
382392
<friendlyName>Active Forums What's New</friendlyName>
383393
<foldername>ActiveForumsWhatsNew</foldername>
384394
<description>Community Forums: Display the most recent topics or replies from selected forums on any page within your site.</description>
@@ -447,7 +457,7 @@
447457
</components>
448458
</package>
449459

450-
<package name="Active Forums Viewer" type="Module" version="07.00.04">
460+
<package name="Active Forums Viewer" type="Module" version="07.00.05">
451461
<friendlyName>Active Forums Viewer</friendlyName>
452462
<foldername>ActiveForumsViewer</foldername>
453463
<description>Community Forums: Display any forum topic view on any page within your site.</description>

ActiveForums_Symbols.dnn

Lines changed: 2 additions & 2 deletions
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="07.00.04">
3+
<package name="Active Forums_Symbols" type="Library" version="07.00.05">
44
<friendlyName>Active Forums Symbols</friendlyName>
55
<description>Community Forums: The official online forums module for the DNN Community.</description>
66
<iconFile>DesktopModules/ActiveForums/images/af6_icon.jpg</iconFile>
@@ -14,7 +14,7 @@
1414
<releaseNotes src="ReleaseNotes.txt" />
1515
<azureCompatible>True</azureCompatible>
1616
<dependencies>
17-
<dependency type="managedPackage" version="7.0.4">Active Forums</dependency>
17+
<dependency type="managedPackage" version="7.0.5">Active Forums</dependency>
1818
</dependencies>
1919
<components>
2020
<component type="ResourceFile">

App_LocalResources/SharedResources.resx

Lines changed: 50 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1589,42 +1589,69 @@ From,
15891589
<value>Split mode:</value>
15901590
</data>
15911591
<data name="ActiveTopics-15min.Text" xml:space="preserve">
1592-
<value>Last 15 minutes</value>
1593-
</data>
1592+
<value>Last 15 minutes</value>
1593+
</data>
15941594
<data name="ActiveTopics-30min.Text" xml:space="preserve">
1595-
<value>Last 30 minutes</value>
1596-
</data>
1595+
<value>Last 30 minutes</value>
1596+
</data>
15971597
<data name="ActiveTopics-45min.Text" xml:space="preserve">
1598-
<value>Last 45 minutes</value>
1599-
</data>
1598+
<value>Last 45 minutes</value>
1599+
</data>
16001600
<data name="ActiveTopics-60min.Text" xml:space="preserve">
1601-
<value>Last hour</value>
1602-
</data>
1601+
<value>Last hour</value>
1602+
</data>
16031603
<data name="ActiveTopics-120min.Text" xml:space="preserve">
1604-
<value>Last 2 hours</value>
1605-
</data>
1604+
<value>Last 2 hours</value>
1605+
</data>
16061606
<data name="ActiveTopics-360min.Text" xml:space="preserve">
1607-
<value>Last 6 hours</value>
1608-
</data>
1607+
<value>Last 6 hours</value>
1608+
</data>
16091609
<data name="ActiveTopics-720min.Text" xml:space="preserve">
1610-
<value>Last 12 hours</value>
1611-
</data>
1610+
<value>Last 12 hours</value>
1611+
</data>
16121612
<data name="ActiveTopics-1440min.Text" xml:space="preserve">
1613-
<value>Last day</value>
1614-
</data>
1613+
<value>Last day</value>
1614+
</data>
16151615
<data name="ActiveTopics-2880min.Text" xml:space="preserve">
1616-
<value>Last 2 days</value>
1617-
</data>
1616+
<value>Last 2 days</value>
1617+
</data>
16181618
<data name="ActiveTopics-10080min.Text" xml:space="preserve">
1619-
<value>Last week</value>
1620-
</data>
1619+
<value>Last week</value>
1620+
</data>
16211621
<data name="ActiveTopics-20160min.Text" xml:space="preserve">
1622-
<value>Last 2 weeks</value>
1622+
<value>Last 2 weeks</value>
16231623
</data>
16241624
<data name="ActiveTopics-40320min.Text" xml:space="preserve">
1625-
<value>Last month</value>
1625+
<value>Last month</value>
16261626
</data>
16271627
<data name="ActiveTopics-80640min.Text" xml:space="preserve">
1628-
<value>Last 2 months</value>
1628+
<value>Last 2 months</value>
1629+
</data>
1630+
<data name="[RESX:NewPost].Text" xml:space="preserve">
1631+
<value>new post</value>
1632+
</data>
1633+
<data name="[RESX:NewReply].Text" xml:space="preserve">
1634+
<value>new reply</value>
1635+
</data>
1636+
<data name="[RESX:SubscribedForumName].Text" xml:space="preserve">
1637+
<value>Subscribed Forum {0}</value>
1638+
</data>
1639+
<data name="[RESX:SubscribedForum].Text" xml:space="preserve">
1640+
<value>Subscribed Forum</value>
1641+
</data>
1642+
<data name="[RESX:SubscribedTopicSubject].Text" xml:space="preserve">
1643+
<value>Subscribed Topic {0}</value>
1644+
</data>
1645+
<data name="[RESX:SubscribedTopic].Text" xml:space="preserve">
1646+
<value>Subscribed Topic</value>
1647+
</data>
1648+
<data name="[RESX:SubscribedTopicForumName].Text" xml:space="preserve">
1649+
<value>Subscribed Topic {0} on Forum {1}</value>
1650+
</data>
1651+
<data name="[RESX:postedIn.Text]" xml:space="preserve">
1652+
<value>posted in</value>
1653+
</data>
1654+
<data name="[RESX:repliedto.Text]" xml:space="preserve">
1655+
<value>replied to</value>
16291656
</data>
16301657
</root>

CustomControls/ServerControls/QuickReply.cs

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -188,21 +188,12 @@ private void ambtnSubmit_Click(object sender, System.EventArgs e)
188188
#region Private Methods
189189
private void SaveQuickReply()
190190
{
191-
int iFloodInterval = MainSettings.FloodInterval;
192-
if (iFloodInterval > 0)
191+
ForumController fc = new ForumController();
192+
Forum forumInfo = fc.Forums_Get(SiteId, InstanceId, ForumId, this.UserId, true, false, TopicId);
193+
if (!Utilities.HasFloodIntervalPassed(floodInterval: MainSettings.FloodInterval, user: ForumUser, forumInfo: forumInfo))
193194
{
194-
UserProfileController upc = new UserProfileController();
195-
UserProfileInfo upi = upc.Profiles_Get(SiteId, InstanceId, this.UserId);
196-
if (upi != null)
197-
{
198-
if (SimulateDateDiff.DateDiff(SimulateDateDiff.DateInterval.Second, upi.DateLastPost, DateTime.UtcNow) < iFloodInterval)
199-
{
200-
Controls.InfoMessage im = new Controls.InfoMessage();
201-
im.Message = "<div class=\"afmessage\">" + string.Format(Utilities.GetSharedResource("[RESX:Error:FloodControl]"), iFloodInterval) + "</div>";
202-
plhMessage.Controls.Add(im);
203-
return;
204-
}
205-
}
195+
plhMessage.Controls.Add(new InfoMessage { Message = "<div class=\"afmessage\">" + string.Format(GetSharedResource("[RESX:Error:FloodControl]"), MainSettings.FloodInterval) + "</div>" });
196+
return;
206197
}
207198
//TODO: Fix for anon
208199
//If Not Current.Request.IsAuthenticated Then
@@ -222,9 +213,7 @@ private void SaveQuickReply()
222213
// ui.TrustLevel = -1
223214

224215
//End If
225-
ForumController fc = new ForumController();
226-
Forum forumInfo = fc.Forums_Get(SiteId, InstanceId, ForumId, this.UserId, true, false, TopicId);
227-
bool UserIsTrusted = false;
216+
bool UserIsTrusted = false;
228217
UserIsTrusted = Utilities.IsTrusted((int)forumInfo.DefaultTrustValue, ControlConfig.User.TrustLevel, Permissions.HasPerm(forumInfo.Security.Trust, ForumUser.UserRoles), forumInfo.AutoTrustLevel, ControlConfig.User.PostCount);
229218
bool isApproved = false;
230219
isApproved = Convert.ToBoolean(((forumInfo.IsModerated == true) ? false : true));

CustomControls/UserControls/TopicView.cs

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,14 @@ public class TopicView : ForumBase
5959
private bool _bTrust;
6060
private bool _bDelete;
6161
private bool _bEdit;
62-
private bool _bLock;
63-
private bool _bPin;
6462
private bool _bSubscribe;
6563
private bool _bModApprove;
6664
private bool _bModSplit;
6765
private bool _bModDelete;
6866
private bool _bModEdit;
6967
private bool _bModMove;
68+
private bool _bModLock = false;
69+
private bool _bModPin = false;
7070
private bool _bAllowRSS;
7171
private int _rowIndex;
7272
private int _pageSize = 20;
@@ -353,6 +353,8 @@ private void LoadData(int pageId)
353353
_bTrust = Permissions.HasPerm(_drSecurity["CanTrust"].ToString(), ForumUser.UserRoles);
354354
_bModEdit = Permissions.HasPerm(_drSecurity["CanModEdit"].ToString(), ForumUser.UserRoles);
355355
_bModMove = Permissions.HasPerm(_drSecurity["CanModMove"].ToString(), ForumUser.UserRoles);
356+
_bModPin = Permissions.HasPerm(_drSecurity["CanModPin"].ToString(), ForumUser.UserRoles);
357+
_bModLock = Permissions.HasPerm(_drSecurity["CanModLock"].ToString(), ForumUser.UserRoles);
356358

357359
_isTrusted = Utilities.IsTrusted((int)ForumInfo.DefaultTrustValue, ForumUser.TrustLevel, Permissions.HasPerm(ForumInfo.Security.Trust, ForumUser.UserRoles));
358360

@@ -1332,7 +1334,6 @@ private string ParseContent(DataRow dr, string tempate, int rowcount)
13321334

13331335

13341336

1335-
13361337
// Parse Roles -- This should actually be taken care of in ParseProfileTemplate
13371338
//if (sOutput.Contains("[ROLES:"))
13381339
// sOutput = TemplateUtils.ParseRoles(sOutput, (up.UserId == -1) ? string.Empty : up.Profile.Roles);
@@ -1406,6 +1407,26 @@ private string ParseContent(DataRow dr, string tempate, int rowcount)
14061407
sbOutput = sbOutput.Replace("[ACTIONS:MOVE]", string.Empty);
14071408
}
14081409

1410+
if (_bModLock)
1411+
{
1412+
//sbOutput = sbOutput.Replace("[ACTIONS:LOCK]", "<a href=\"javascript:void(0)\" onclick=\"javascript:if(confirm('[RESX:Confirm:Lock]')){amaf_modLock([TOPICID]);};\" title=\"[RESX:LockTopic]\" style=\"vertical-align:middle;\"><i class=\"fa fa-lock fa-fw fa-blue\"></i></a>");
1413+
sbOutput = sbOutput.Replace("[ACTIONS:LOCK]", "<li onclick=\"javascript:if(confirm('[RESX:Confirm:Lock]')){amaf_modLock([TOPICID]);};\" title=\"[RESX:Lock]\"><i class=\"fa fa-lock fa-fm fa-blue\"></i>&nbsp;[RESX:Lock]</li>");
1414+
1415+
}
1416+
else
1417+
{
1418+
sbOutput = sbOutput.Replace("[ACTIONS:LOCK]", string.Empty);
1419+
}
1420+
if (_bModPin)
1421+
{
1422+
//sbOutput = sbOutput.Replace("[ACTIONS:PIN]", "<a href=\"javascript:void(0)\" onclick=\"javascript:if(confirm('[RESX:Confirm:Pin]')){amaf_modPin([TOPICID]);};\" title=\"[RESX:Pin]\" style=\"vertical-align:middle;\"><i class=\"fa fa-thumb-tack fa-fw fa-blue\"></i></a>");
1423+
sbOutput.Replace("[ACTIONS:PIN]", "<li onclick=\"javascript:if(confirm('[RESX:Confirm:Pin]')){amaf_modPin([TOPICID]);};\" title=\"[RESX:Pin]\"><i class=\"fa fa-thumb-tack fa-fm fa-blue\"></i>&nbsp;[RESX:Pin]</li>");
1424+
1425+
}
1426+
else
1427+
{
1428+
sbOutput = sbOutput.Replace("[ACTIONS:PIN]", string.Empty);
1429+
}
14091430
sbOutput = sbOutput.Replace("[TOPICID]", TopicId.ToString());
14101431

14111432
// Status

Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
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("07.00.04")]
55+
[assembly: AssemblyVersion("07.00.05")]
5656

57-
[assembly: AssemblyFileVersion("07.00.04")]
57+
[assembly: AssemblyFileVersion("07.00.05")]
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")]

ReleaseNotes.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@
77
<hr/>
88
<div class="dnnClear">
99

10+
<h3>07.00.05</h3>
11+
<h4>Features, Enhancements, and Bug Fixes</h4>
12+
<ul>
13+
<li>NEW: Applies Flood Control to All User Types, Including Admins (<a href="https://github.com/DNNCommunity/Dnn.CommunityForums/issues/95">Issue 95</a>, thanks <a href="https://github.com/johnhenley" target="_blank">@johnhenley</a>!)</li>
14+
<li>NEW: Improved Email Notifications &amp; Tokens (<a href="https://github.com/DNNCommunity/Dnn.CommunityForums/issues/169">Issue 169</a>, thanks <a href="https://github.com/johnhenley" target="_blank">@johnhenley</a>!)</li>
15+
<li>BUG: Copies Missing Moderator Controls to Posts View (<a href="https://github.com/DNNCommunity/Dnn.CommunityForums/issues/153">Issue 153</a>, thanks <a href="https://github.com/johnhenley" target="_blank">@johnhenley</a>!)</li>
16+
</ul>
17+
1018
<h3>07.00.04</h3>
1119
<h4>Features, Enhancements, and Bug Fixes</h4>
1220
<ul>

0 commit comments

Comments
 (0)