A solution, at least in my DNN 4.9, is to make some small modifications in the following 4 stored procedures in de DDN-database:
dnn_Blog_GetComment, dnn_Blog_ListComments, dnn_Blog_Upgrade_ListComments, dnn_Blog_AddComment.
The first three stored procedures retrieve comment-data from the database for displaying purposes in the page where your blog is. The original queries retrieve the UserName. The modification in all the three procedures is to let them retrieve the DisplayName as username. This works for new and old comments.
The fourth stored procedure saves a new comment in the table 'dnn_Blog_Comments'. Originally it stores the username the field 'Author'. Here, the modification is to retrieve the DisplayName from the table 'dnn_users' and save this in the field 'Author' of the table 'dnn_Blog_Comments'. Because the exsisting comment still have the username in the field 'Author', this works only for newly added comments.
See below for the modified stored procedures.
Arnout Esser
This solution may be cheap, but at least it's free :)
dnn_Blog_GetComment
SELECT C.CommentID, C.EntryID, C.UserID, C.Title, C.Comment, C.AddedDate, U.FirstName + ' ' + U.LastName AS UserFullName, C.Author, C.Approved, U.DisplayName AS UserName
FROM dbo.dnn_Blog_Comments C LEFT OUTER JOIN dbo.dnn_Users U ON C.UserID = U.UserID
WHERE (C.CommentID = @CommentID)
dnn_Blog_ListComments
SELECT C.CommentID, C.EntryID, C.UserID, C.Title, C.Comment, C.AddedDate, U.FirstName + ' ' + U.LastName AS UserFullName, C.Author, C.Approved, U.DisplayName AS UserName
FROM dbo.dnn_Blog_Comments C LEFT OUTER JOIN dbo.dnn_Users U ON C.UserID = U.UserID
WHERE (C.EntryID = @EntryID) AND (C.Approved = 1 OR C.Approved <> @ShowNonApproved)
dnn_Blog_Upgrade_ListComments
SELECT C.CommentID, C.EntryID, C.UserID, C.Title, C.Comment, C.AddedDate, U.FirstName + ' ' + U.LastName AS UserFullName, U.DisplayName AS UserName
FROM dbo.dnn_NewBlog_Comments C LEFT OUTER JOIN dbo.dnn_Users U ON C.UserID = U.UserID
WHERE (EntryID = @EntryID)
dnn_Blog_AddComment
ALTER PROCEDURE dbo.dnn_Blog_AddComment
@EntryID int,
@UserID int,
@Title nvarchar(255),
@Comment ntext,
@Author nvarchar(50),
@Approved bit
AS
DECLARE @Author2 AS nvarchar(50)
SELECT @Author2=DisplayName FROM dnn_Users WHERE (dnn_Users.UserID = @UserID)
INSERT INTO dbo.dnn_Blog_Comments (
[EntryID],
[UserID],
[Title],
[Comment],
[Author],
[Approved],
[AddedDate]
) VALUES (
@EntryID,
@UserID,
@Title,
@Comment,
@Author2,
@Approved,
GetUTCDate()
)
select SCOPE_IDENTITY()