diff --git a/NuGet.config b/NuGet.config
index e189d65c..d2ad30f3 100644
--- a/NuGet.config
+++ b/NuGet.config
@@ -1,7 +1,7 @@
-
+
-
+
\ No newline at end of file
diff --git a/OurUmbraco.Site/OurUmbraco.Site.csproj b/OurUmbraco.Site/OurUmbraco.Site.csproj
index 363623dd..5c9ca4d3 100644
--- a/OurUmbraco.Site/OurUmbraco.Site.csproj
+++ b/OurUmbraco.Site/OurUmbraco.Site.csproj
@@ -1853,6 +1853,7 @@
+
diff --git a/OurUmbraco.Site/Views/MacroPartials/Members/PublicProfile.cshtml b/OurUmbraco.Site/Views/MacroPartials/Members/PublicProfile.cshtml
index cf4bc8fd..b3d6f730 100644
--- a/OurUmbraco.Site/Views/MacroPartials/Members/PublicProfile.cshtml
+++ b/OurUmbraco.Site/Views/MacroPartials/Members/PublicProfile.cshtml
@@ -202,7 +202,7 @@
Unblock this member
Member is blocked
}
-
+
All threads this member was involved in (created or commented)
@foreach (var topic in allTopics)
@@ -213,22 +213,22 @@
}
- if (currentMember.IsHq())
- {
-
- }
- }
- }
+
+ }
+ }
+}
\ No newline at end of file
diff --git a/OurUmbraco.Site/Views/MacroPartials/Spam/Overview.cshtml b/OurUmbraco.Site/Views/MacroPartials/Spam/Overview.cshtml
new file mode 100644
index 00000000..df90d489
--- /dev/null
+++ b/OurUmbraco.Site/Views/MacroPartials/Spam/Overview.cshtml
@@ -0,0 +1,22 @@
+@using uForum.Extensions
+@using uForum.Services
+@inherits Umbraco.Web.Macros.PartialViewMacroPage
+@{
+ var memberService = UmbracoContext.Application.Services.MemberService;
+ var memberCount = 50;
+ var newMembers = memberService.GetMembersByMemberType("member").OrderByDescending(m => m.CreateDate).Take(memberCount);
+ var topicService = new TopicService(UmbracoContext.Application.DatabaseContext);
+}
+@if(Members.IsAdmin())
+{
+ @memberCount newest members
+
+}
\ No newline at end of file
diff --git a/OurUmbraco.Site/web.template.config b/OurUmbraco.Site/web.template.config
index 40842158..d4268dc8 100644
--- a/OurUmbraco.Site/web.template.config
+++ b/OurUmbraco.Site/web.template.config
@@ -81,7 +81,7 @@
-
+
diff --git a/our.umbraco.org/MigrationsHandler.cs b/our.umbraco.org/MigrationsHandler.cs
index 217eeebb..931cd446 100644
--- a/our.umbraco.org/MigrationsHandler.cs
+++ b/our.umbraco.org/MigrationsHandler.cs
@@ -20,6 +20,7 @@ namespace our
{
EnsureMigrationsMarkerPathExists();
MemberActivationMigration();
+ SpamOverview();
}
private void EnsureMigrationsMarkerPathExists()
@@ -84,5 +85,51 @@ namespace our
LogHelper.Error(string.Format("Migration: '{0}' failed", migrationName), ex);
}
}
+
+ private void SpamOverview()
+ {
+ var migrationName = MethodBase.GetCurrentMethod().Name;
+
+ try
+ {
+ var path = HostingEnvironment.MapPath(MigrationMarkersPath + migrationName + ".txt");
+ if (File.Exists(path))
+ return;
+
+ var macroService = UmbracoContext.Current.Application.Services.MacroService;
+ var macroAlias = "AntiSpam";
+ if (macroService.GetByAlias(macroAlias) == null)
+ {
+ // Run migration
+
+ var macro = new Macro
+ {
+ Name = "[Spam] Overview",
+ Alias = macroAlias,
+ ScriptingFile = "~/Views/MacroPartials/Spam/Overview.cshtml",
+ UseInEditor = true
+ };
+ macro.Save();
+ }
+
+ var contentService = UmbracoContext.Current.Application.Services.ContentService;
+ var rootNode = contentService.GetRootContent().OrderBy(x => x.SortOrder).First(x => x.ContentType.Alias == "Community");
+
+ var antiSpamPageName = "AntiSpam";
+ if(rootNode.Children().Any(x => x.Name == antiSpamPageName) == false)
+ {
+ var content = contentService.CreateContent(antiSpamPageName, rootNode.Id, "Textpage");
+ content.SetValue("bodyText", string.Format("", macroAlias));
+ contentService.SaveAndPublishWithStatus(content);
+ }
+
+ string[] lines = { "" };
+ File.WriteAllLines(path, lines);
+ }
+ catch (Exception ex)
+ {
+ LogHelper.Error(string.Format("Migration: '{0}' failed", migrationName), ex);
+ }
+ }
}
}
diff --git a/uForum/Extensions/ForumExtensions.cs b/uForum/Extensions/ForumExtensions.cs
index 5293ca79..1ab8de97 100644
--- a/uForum/Extensions/ForumExtensions.cs
+++ b/uForum/Extensions/ForumExtensions.cs
@@ -161,7 +161,7 @@ namespace uForum.Extensions
foreach (var role in roles)
{
- if(role == "standard" || role.StartsWith("201") || role.ToLowerInvariant().Contains("vendor".ToLowerInvariant()) || role.ToLowerInvariant().Contains("wiki".ToLowerInvariant()))
+ if(role == "standard" || role.StartsWith("201") || role.ToLowerInvariant().Contains("vendor".ToLowerInvariant()) || role.ToLowerInvariant().Contains("wiki".ToLowerInvariant()) || role.ToLowerInvariant().Contains("potentialspam".ToLowerInvariant()))
continue;
if (role == "CoreContrib")