2

Is there any comments module in Dotnetnuke that can work with the journal module? I mean, if a user comments on a page, the journal module on his profile displays that this user has commented on this page? Or, could there be an item having a link to that page? Just like we have in facebook? I hope you understand my question.

WEFX
  • 8,298
  • 8
  • 66
  • 102
Waqas Ahmed
  • 88
  • 1
  • 1
  • 5

1 Answers1

0

There is no such module. You would have to write your own

This is some sample code from the upcoming Announcements module:

        public static void AddAnnouncementToJournal(AnnouncementInfo announcement, int tabId)
    {
        JournalItem item2 = new JournalItem
        {
            PortalId = announcement.PortalID,
            ProfileId = announcement.LastModifiedByUserID,
            UserId = announcement.LastModifiedByUserID,
            ContentItemId = announcement.ContentItemID,
            Title = announcement.Title
        };
        ItemData data = new ItemData
        {
            Url = announcement.Permalink()
        };
        item2.ItemData = data;
        item2.Summary = HtmlUtils.Shorten(HtmlUtils.Clean(System.Web.HttpUtility.HtmlDecode(announcement.Description), false), 250, "...");
        item2.Body = null;
        item2.JournalTypeId = 33;
        item2.SecuritySet = "E,";
        JournalItem journalItem = item2;

        JournalController.Instance.SaveJournalItem(journalItem, tabId);

    }

Important to note: you need to define your own JournalType (in the sample above, this is not fully implemented yet, and using a hard coded value of 33). Basically, what you need is a new record in the JournalTypes table, defining your own journalType

erikvb
  • 104
  • 2