How to add TalkAbout (Comments only) to an existing cloudscribe site

This page documents the steps required to manually install only the TalkAbout Comments System into an existing cloudscribe solution (without the Forum component).

Note: If you want both Comments and Forums, see the full TalkAbout Installation Guide.

Overview

TalkAbout Comments provides a self-hosted, GDPR-friendly comment system for blog posts and pages, as an alternative to third-party services like Disqus.

Prerequisites

  • An existing cloudscribe solution (ASP.NET Core 8.0)
  • Access to modify project files and configuration
  • Database access (MSSQL in this example)

Step 1: Add NuGet Package References

Add the following package references to your .csproj file in the <ItemGroup Label="Package References"> section:

<!-- TalkAbout Comments System -->
<PackageReference Include="cloudscribe.TalkAbout.Web" Version="8.6.*" />
<PackageReference Include="cloudscribe.TalkAbout.Comments.Integration.CloudscribeCore" Version="8.6.*" />
<PackageReference Include="cloudscribe.TalkAbout.Web.Bootstrap5" Version="8.6.*" />
<PackageReference Include="cloudscribe.TalkAbout.Storage.EFCore.MSSQL" Version="8.6.*" />
<PackageReference Include="cloudscribe.TalkAbout.Integration.CloudscribeCore" Version="8.6.*" />

Location in file: Add these after the existing cloudscribe packages (around line 75 in the reference project).

Note: Adjust the Version to match your cloudscribe version. If using a different database provider (PostgreSQL, MySQL, SQLite), replace the MSSQL storage package accordingly.

What's Different from Full Install: We're NOT including the three Forum packages:

  • cloudscribe.TalkAbout.Forum.Web
  • cloudscribe.TalkAbout.Forum.Web.Bootstrap5
  • cloudscribe.TalkAbout.Forum.Storage.EFCore.MSSQL

Step 2: Update Config/CloudscribeFeatures.cs

2.1 Add Database Storage Configuration

In the SetupDataStorage method, add the following line before the QueryToolEFStorageMSSQL line:

// Add after DynamicPolicyEFStorageMSSQL and before QueryToolEFStorageMSSQL

services.AddCommentStorageMSSQL(connectionString);

Location: Around line 36-38 in CloudscribeFeatures.cs

What's Different: We're NOT adding services.AddForumStorageMSSQL(connectionString);

2.2 Add Service Registration

In the SetupCloudscribeFeatures method, add the following lines after the DynamicPolicy configuration and before the QueryTool line:

// Add after AddDynamicAuthorizationMvc and before AddScoped<IQueryTool>

services.AddTalkAboutCloudscribeIntegration(config);

services.AddTalkAboutCommentsCloudscribeIntegration(config);
services.AddTalkAboutServices(config)
    .AddTalkAboutNotificationServices(config);

Location: Around line 68-78 in CloudscribeFeatures.cs

What's Different: We're NOT adding:

// ❌ DON'T ADD THESE (Forum-specific):
services.AddTalkAboutForumServices(config)
    .AddTalkAboutForumNotificationServices(config);

Important: Note that AddTalkAboutCloudscribeIntegration (without "Comments" or "Forum") IS included - it's shared infrastructure.


Step 3: Update Program.cs

In the EnsureDataStorageIsReady method, add database initialization call after DynamicPolicyEFCore and before QueryToolStartup:

// Add after DynamicPolicyEFCore.InitializeDatabaseAsync

CommentsDatabase.InitializeDatabaseAsync(scopedServices).Wait();

// Before QueryToolStartup.InitializeDatabaseAsync

Location: Around line 57-58 in Program.cs

What's Different: We're NOT adding ForumDatabase.InitializeDatabaseAsync(scopedServices).Wait();

Important: This line creates the necessary database tables for comments on first run.


Step 4: No Routing Changes Required

Unlike the full TalkAbout installation, you do NOT need to modify Config/RoutingAndMvc.cs at all.

The forum routes (AddForumRoutes()) are only needed for the Forum system. Comments integrate directly into existing blog and page views without requiring routing changes.


Step 5: Update appsettings.json

5.1 Add Summernote Configuration for Comments

Add the following configuration section after the PolicyManagementOptions section:

"SummernoteOptions_TalkaboutComments": {
    "CustomConfigPath": "/talk/js/summernote-talkabout-comments-config.json",
    "CustomToolbarConfigPath": "/talk/js/summernote-talkabout-comments-toolbar-config.json",
    "FileBrowseUrl": "",
    "ImageBrowseUrl": "",
    "VideoBrowseUrl": "",
    "AudioBrowseUrl": "",
    "DropFileUrl": "",
    "CropFileUrl": "",
    "LanguageCode": ""
},

Location: Around line 46 in appsettings.json (after line 43, before SmtpOptions)

Note: This configuration is for the rich text editor used in comments.

5.2 Update ContentSettingsUIConfig

CHANGE the ContentSettingsUIConfig section to show comment settings:

"ContentSettingsUIConfig": {
    "ShowCommentSettings": true,
    "ShowDefaultContentType": false
},

Location: Around line 153-155 in appsettings.json

Change: Set "ShowCommentSettings": true (was false or missing in vanilla install)

5.3 Configure Authorization Policies (Optional but Recommended)

In the PolicyManagementOptions section, you can pre-configure comment-related policies:

"PolicyNamesToConfigureAsAllowAnonymous": [
    "BlogViewPolicy"
],

Note: Forum-related policies (ForumViewPolicy, ForumPostPolicy) are not needed for comments-only installation.


Step 6: Add Required View Files

Why View Files Are Required

TalkAbout requires specific view files to integrate comments into blog posts and pages. These files cannot be reliably delivered via NuGet packages because they override views that already exist in cloudscribe.SimpleContent.CompiledViews.Bootstrap5.

For the complete explanation of why these can't be in NuGet packages, see the full installation guide.

How to Obtain the View Files

The recommended approach is to create a reference installation using the cloudscribe project template:

  1. Create a new cloudscribe project using the Visual Studio template or CLI
    • When prompted, select TalkAbout for installation
    • Choose Bootstrap 5 for the theme
    • Select your database provider (should match your existing project)
  2. Build the reference project to ensure it's working
  3. Copy the view files from the reference project to your existing project:

    Copy these directories:

    ReferenceProject/Views/Blog/     → YourProject/Views/Blog/
    ReferenceProject/Views/Page/     → YourProject/Views/Page/

    Copy these specific files from ReferenceProject/Views/Shared/ to YourProject/Views/Shared/:

    • CommentScriptsPartial.cshtml
    • CommentStylePartial.cshtml
    • TalkAboutCoreImageModalContent.cshtml
    • TalkAboutImageModalContent.cshtml

    Note: Do NOT copy _ViewImports.cshtml or _ViewStart.cshtml - those already exist in your project and contain project-specific configuration.

Complete List of Required Files

Views/Blog/ (create this directory if it doesn't exist)

  • CommentWrapperPartial.cshtml

Views/Page/ (may already exist with other customizations)

  • CommentWrapperPartial.cshtml
  • EditCommentsEnabledPartial.cshtml
  • EditWithTemplateCommentsEnabledPartial.cshtml
  • PageScriptsPartial.cshtml

Views/Shared/ (add to your existing Shared folder)

  • CommentScriptsPartial.cshtml
  • CommentStylePartial.cshtml
  • TalkAboutCoreImageModalContent.cshtml
  • TalkAboutImageModalContent.cshtml

Total: 9 view files across 3 directories (same as full install - the Forum doesn't require additional views beyond its controllers)

Alternative: Manual Creation

If you cannot create a reference project, you can find these view files in:

  • The cloudscribe.TalkAbout source repository: src/sourceDev.WebApp/Views/
  • Any existing cloudscribe installation that has TalkAbout installed

However, using the template is recommended as it ensures you get the correct versions for your cloudscribe/TalkAbout version.


Step 7: Update navigation.xml

Add Comment System Settings (Admin Menu)

Add the Comment System Settings node in the Administration section, after the ContentHistory node and before the LoginPageInfo node:

     </NavNode>
 </NavNode>

<!-- ADD COMMENT SYSTEM SETTINGS HERE -->
<NavNode key="CommentSystemSettings"
                     controller="Talk"
                     action="Config"
                     text="Comment System Settings"
                     preservedRouteParameters=""
                     iconCssClass="fas fa-cog fa-fw"
                     componentVisibility="breadcrumbs,childtree,parenttree"
                     authorizationPolicy="CommentAdminPolicy">
           <Children></Children>
         </NavNode>

<!-- EXISTING LOGINPAGEINFO NODE FOLLOWS -->
       <NavNode key="LoginPageInfo"

Location: Around line 480-487 in navigation.xml (after ContentHistory, before LoginPageInfo)

What's Different: We're NOT adding the Forum navigation section (ForumIndex, ForumSettings, ForumTags, etc.) to the public navigation menu.


Step 8: No Changes Required

The following files require NO CHANGES when installing TalkAbout Comments:

  • Startup.cs - No modifications needed
  • Config/Authorization.cs - No modifications needed (policies are managed dynamically)
  • Config/DataProtection.cs - No modifications needed
  • Config/Localization.cs - No modifications needed
  • Config/RoutingAndMvc.cs - No modifications needed (unlike full install!)

Step 9: Restore and Build

After making all the above changes:

  1. Restore NuGet packages:
    dotnet restore
  2. Build the solution:
    dotnet build
  3. Run database migrations (on first run, the database initialization code will create the necessary tables)

Step 10: Configure TalkAbout Authorization Policies

After the first run, TalkAbout will create the following authorization policy automatically (due to AutoCreateMissingPolicies: true in appsettings.json):

  • CommentAdminPolicy - Automatically created

You can manage this policy through the UI at:
Administration → Authorization Policies
(Assuming you have the cloudscribe 'Dynamic Authorization Policies component installed - which we recommend that you do).

Recommended Policy Configuration

Via the UI, set the following policy:

  1. CommentAdminPolicy: Require Role "Administrators"

What's Different: Forum-related policies (ForumViewPolicy, ForumPostPolicy, ForumAdminPolicy) will NOT be created since we didn't install the Forum component.


Verification Checklist

After installation, verify the following:

  • Solution builds without errors
  • Application starts without errors
  • Database tables created:
    • talk_Comment
    • talk_CommentThread
    • (and related comment tables)
    • Note: Forum tables (forum_Post, forum_Thread) will NOT be created
  • "Comment System Settings" appears in admin menu
  • Authorization policy CommentAdminPolicy created in Policy Management
  • Comments appear on blog posts when enabled
  • Comments appear on pages when enabled
  • No forum link appears in main navigation (expected - we didn't install it)

Database Providers

This guide uses MSSQL. For other database providers, replace the storage package:

PostgreSQL

<PackageReference Include="cloudscribe.TalkAbout.Storage.EFCore.PostgreSql" Version="8.6.*" />

And in CloudscribeFeatures.cs:

services.AddCommentStoragePostgreSql(connectionString);

MySQL

<PackageReference Include="cloudscribe.TalkAbout.Storage.EFCore.MySQL" Version="8.6.*" />

And in CloudscribeFeatures.cs:

services.AddCommentStorageMySql(connectionString);

Troubleshooting

Build Errors

Problem: Package not found errors
Solution: Ensure you have the correct NuGet feed configured and version numbers match your cloudscribe version

Runtime Errors

Problem: Database tables not created
Solution: Check that CommentsDatabase.InitializeDatabaseAsync call is added to Program.cs

Problem: Authorization errors
Solution: Check that CommentAdminPolicy is configured in Administration → Authorization Policies

Problem: Comments not appearing on blog posts or pages
Solution:

  1. Verify all 9 view files were copied to your project
  2. Check that you didn't accidentally copy _ViewImports.cshtml (which would break namespaces)
  3. Ensure ShowCommentSettings is set to true in appsettings.json
  4. Enable comments on individual blog posts/pages via the edit screen

Summary of Changes

File Changes Required
.csproj Add 5 NuGet package references (comments-only)
Config/CloudscribeFeatures.cs Add comment storage (1 line) and comment services (3 lines)
Program.cs Add comment database initialization (1 line)
Config/RoutingAndMvc.cs No changes
appsettings.json Add SummernoteOptions section, update ContentSettingsUIConfig
Views/ folders Add 9 view files for comment integration
navigation.xml Add comment settings admin menu item (no public forum navigation)
Startup.cs No changes
Config/Authorization.cs No changes

Common Installation Mistakes to Avoid

  1. Accidentally including Forum packages - Only include the 5 packages listed in Step 1
  2. Adding Forum services - Don't add AddTalkAboutForumServices or AddForumStorageMSSQL
  3. Adding Forum database init - Don't add ForumDatabase.InitializeDatabaseAsync
  4. Adding forum routes - Don't add AddForumRoutes() to RoutingAndMvc.cs
  5. Syntax errors - Double-check parentheses, semicolons, and line endings
  6. Package version mismatch - Ensure all TalkAbout packages use the same version number (e.g., all 8.6.*)
  7. Missing view files - Without the 9 required view files, comments will not appear
  8. Copying _ViewImports.cshtml - Don't copy this file; it contains project-specific namespaces

Upgrading to Full TalkAbout (Adding Forums Later)

If you later decide to add the Forum component, you'll need to:

  1. Add the 3 Forum NuGet packages
  2. Add services.AddForumStorageMSSQL(connectionString); to CloudscribeFeatures.cs
  3. Add the Forum service registration lines to CloudscribeFeatures.cs
  4. Add ForumDatabase.InitializeDatabaseAsync to Program.cs
  5. Add routes.AddForumRoutes() to RoutingAndMvc.cs (in both overloads)
  6. Add Forum navigation to navigation.xml
  7. Configure Forum authorization policies

See the full TalkAbout Installation Guide for complete details.


Document Version: 1.0
Last Updated: 2026-01-14
Based on: cloudscribe 8.6.x with .NET 8.0
Comments-only installation guide