FORUM INTEGRATION

Please note: only per-page comments are currently supported.

Before you set up the forum integration, make sure you've completed the forms integration.

Prerequisites

Siteprofile changes:

<apply> 
  <to type="file" />
  <forumplugin type="comments" usecaptcha="1" />
</apply>

Add the proper JavaScript libraries:

import * as dompack from 'dompack';
import * as googlerecaptcha from "@mod-socialite/js/google/recaptcha";
import ForumCommentsWebtool from "@mod-publisher/js/webtools/forumcomments";

dompack.register('.wh-forumcomments', node => new ForumCommentsWebtool(node));
googlerecaptcha.setup();

Add to your design library:

LOADLIB "mod::publisher/lib/webtools/forum.whlib";

PUBLIC OBJECTTYPE MyWebdesign ...
< ...
  UPDATE PUBLIC RECORD FUNCTION GetPageconfig()
  {
    OBJECT anyforumplugin := GetForumPluginForWebdesign(this);
    ...
    RETURN [ ...
           , commentsblock := ObjectExists(anyforumplugin) 
                                ? PTR anyforumplugin->EmbedComments() 
                                : DEFAULT MACRO PTR
           ];
  }
>;

And add to your Witty:

...
  [contents]
  [commentsblock]
...

Now, setup your recaptcha (or remove all references to it) in Modules > Socialite > Configuration and write somse CSS styling!

Comments